feat: add MCP server subcommand#34
Merged
Merged
Conversation
Add `oidc mcp` subcommand that starts a stdio-based MCP server using the rmcp crate, exposing `list_clients` and `get_token` tools. This allows AI assistants like Claude Code to retrieve OIDC tokens for configured clients. The MCP functionality is behind a default-enabled `mcp` feature flag so it can be excluded when not needed. Also adds cargo-all-features to CI to verify all feature combinations compile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap all config read-modify-write cycles in Config::locked(), which acquires an advisory exclusive lock on a sidecar .lock file. This prevents race conditions when the MCP server and CLI commands run concurrently. Uses std::fs::File::lock() (stable since 1.89) with spawn_blocking and AsyncFnOnce closures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
oidc mcpsubcommand that starts a stdio-based MCP server (usingrmcp), exposinglist_clientsandget_tokentools for AI-assisted token retrievalmcpfeature flag so it can be excluded with--no-default-featurescargo-all-featuresCI job to verify all feature combinations compileTest plan
cargo buildandcargo build --no-default-featuresboth succeedcargo clippy --all-targetspasses cleanly for both feature setscargo testpassesoidc mcp --helpshows the subcommandclaude mcp add oidc -- oidc mcpand verifylist_clients/get_tokenwork🤖 Generated with Claude Code