Skip to content

feat: separate token acquisition and application#21

Closed
abdebek wants to merge 2 commits intomainfrom
feature/adb/separate-token-acquisition-and-application
Closed

feat: separate token acquisition and application#21
abdebek wants to merge 2 commits intomainfrom
feature/adb/separate-token-acquisition-and-application

Conversation

@abdebek
Copy link
Owner

@abdebek abdebek commented Jan 27, 2026

feat: separate token acquisition and application (addressing #20)

Add support for a flexible authentication via the TokenSource option, letting you choose where API tokens come from. It allows explicit control over where authentication tokens are obtained: client, server, both, or none, making authentication behavior clearer and more adaptable to different ways of obtaining and passing tokens.

The current default mode is Hybrid (TokenSource.Both), which first attempts to use a token provided by the MCP client and automatically falls back to server-managed authentication when no client token is available. This provides maximum flexibility while remaining fully backward compatible with existing configurations.

Additional modes include Server-managed authentication, where MCPify exclusively handles OAuth flows, token storage, and refresh; Client-managed authentication, where the MCP client is responsible for acquiring and supplying tokens; and No authentication, for public APIs. Together, these options reduce duplicate auth logic, improve interoperability with MCP clients, and make authentication intent explicit per external API.

@abdebek abdebek marked this pull request as ready for review January 27, 2026 20:10
@abdebek abdebek closed this Feb 7, 2026
@abdebek abdebek deleted the feature/adb/separate-token-acquisition-and-application branch February 7, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant