Skip to content

feat: add MCP server subcommand#34

Merged
ctron merged 3 commits into
mainfrom
feat/mcp-server
Jul 14, 2026
Merged

feat: add MCP server subcommand#34
ctron merged 3 commits into
mainfrom
feat/mcp-server

Conversation

@ctron

@ctron ctron commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add oidc mcp subcommand that starts a stdio-based MCP server (using rmcp), exposing list_clients and get_token tools for AI-assisted token retrieval
  • Gate MCP functionality behind a default-enabled mcp feature flag so it can be excluded with --no-default-features
  • Add cargo-all-features CI job to verify all feature combinations compile
  • Document MCP server usage and Claude Code integration in README

Test plan

  • cargo build and cargo build --no-default-features both succeed
  • cargo clippy --all-targets passes cleanly for both feature sets
  • cargo test passes
  • oidc mcp --help shows the subcommand
  • Register with claude mcp add oidc -- oidc mcp and verify list_clients / get_token work

🤖 Generated with Claude Code

ctron and others added 3 commits July 14, 2026 13:29
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>
@ctron
ctron merged commit 0a73918 into main Jul 14, 2026
9 checks passed
@ctron
ctron deleted the feat/mcp-server branch July 14, 2026 12:21
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