[Feature Request] Pin MCP OAuth clients with client ID metadata documents

Aperta
#5,070 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 login and 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.

Lingua principale
TypeScript
Stelle
8.3k
Fork
1.4k
Merge medio
12h 6m
PR unite (30g)
596

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MoonshotAI/kimi-code

Tutte le issue di MoonshotAI/kimi-code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.