[Feature Request] Pin MCP OAuth clients with client ID metadata documents
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- authentication, cli
Research direction
The proposal names HTTP and SSE MCP server configuration, /mcp-config login, OAuth provider lookup, and cached-provider handling; the prepared branch is linked for reference. Start by reviewing the configuration and OAuth service tests mentioned in the validation. Done means the optional clientMetadataUrl selects pinned client identity, omission preserves dynamic registration, and the documented behavior is covered.
Written by the indexing model from the issue text.
Description
Problem
HTTP and SSE MCP servers that require a reviewed OAuth client ID metadata document (CIMD) cannot currently use a stable client identity in Kimi Code. They must use dynamic client registration, which is incompatible with authorization servers that intentionally accept only pinned/reviewed clients.
One concrete use case is Pascal's hosted MCP server: Pascal wants Kimi users to authorize through a reviewed Kimi client identity without enabling open dynamic registration.
Proposal
Add an optional clientMetadataUrl URL field to HTTP and SSE MCP server configuration. When present, its URL becomes the OAuth client_id and dynamic registration is skipped for that server. When omitted, existing dynamic-registration behavior remains unchanged.
The proposed implementation also:
- propagates the field through interactive
/mcp-config loginand token/provider lookup; - recreates cached providers when the configured identity changes;
- invalidates mismatched CIMD or dynamic registrations without disturbing a matching registration;
- supports explicitly returning to dynamic registration when the field is removed;
- documents the field in English and Chinese and publishes a Kimi client metadata document with the CLI documentation site.
A prepared branch is available at https://github.com/Aymericr/kimi-code/tree/feat/pinned-mcp-oauth-clients.
Validation
- OAuth service tests: 50 passed, including CIMD without registration and return to dynamic registration.
- MCP management tests: 61 passed.
- Connection-manager tests: 47 passed.
- Package typecheck and repository lint passed.
The documentation build was attempted but timed out locally; the metadata source file and both documentation pages are included in the branch.
If this direction is acceptable, please /approve this issue so I can open the external feature PR under the repository's contribution policy.
- Dominant language
- TypeScript
- Stars
- 8.3k
- Forks
- 1.4k
- Avg merge
- 12h 6m
- Merged PRs (30d)
- 596
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MoonshotAI/kimi-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MoonshotAI/kimi-code#5539 ·
Maintainers usually reply within 1 day
-
[Bug] Kimi RC workspace folder picker does not display symbolic link directoriesPossibly taken @markankamaransheogarat-sys claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MoonshotAI/kimi-code#5296 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MoonshotAI/kimi-code#5256 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MoonshotAI/kimi-code#5062 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
MoonshotAI/kimi-code#5057 ·
Maintainers usually reply within 1 day
All issues in MoonshotAI/kimi-code
Similar issues
-
Add Alice&BotOpen
Difficulty 1/5 Under an hour Newbie friendliness 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
bot:ai-assisted component:faucet github_actions security status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
midnightntwrk/midnight-faucet-api#215 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NanmiCoder/cc-haha#2034 · 1 comment ·
Maintainers usually reply within 1 day
-
mobile prio:low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
digitalfabrik/entitlementcard#3324 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day