SEP-2633: Standard Client-Side Configuration Format - mcp.json#2633
SEP-2633: Standard Client-Side Configuration Format - mcp.json#2633BobDickinson wants to merge 6 commits into
Conversation
tadasant
left a comment
There was a problem hiding this comment.
High level thought: we should probably propose this as an Extension instead of straight to core (that is likely the direction Server Card is going as well).
|
|
||
| ## Abstract | ||
|
|
||
| The MCP ecosystem has server.json (the MCP Registry package specification), and soon the related ServerCard, for describing how servers can be configured. But there's no standard for the other side: how a client will connect to its servers. |
There was a problem hiding this comment.
| The MCP ecosystem has server.json (the MCP Registry package specification), and soon the related ServerCard, for describing how servers can be configured. But there's no standard for the other side: how a client will connect to its servers. | |
| The MCP ecosystem has [server.json](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/generic-server-json.md) (the MCP Registry package specification), and soon the related [Server Card](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2127), for describing how servers can be configured. But there's no standard for the other side: how a client will connect to its servers. |
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { |
There was a problem hiding this comment.
Do we definitely want/need to define mcpServers like this?
Could we potentially scope this spec down to be "the object you put inside mcpServers"; implying the choice of e.g. mcpServers vs. servers is up to the client?
Maybe that's confusing, because then we're not really replacing what is commonly today called the .mcp.json file, we're more just replacing the object in the mcpServers field... but that also seems potentially cleaner, in that we're not trying to wholesale replace that whole file (what with e.g. VS Code's management of inputs, etc).
And maybe the design goal here is to define the whole file, so you can copy/paste the whole thing... probably don't feel strongly on this, but what do you think?
| } | ||
| ``` | ||
|
|
||
| Server names must match `^[a-zA-Z0-9_\[\]-]+$` (alphanumeric, hyphens, underscores, brackets). |
There was a problem hiding this comment.
We should probably allow for name as defined in server.json, i.e. allow . and / as part of DNS prefixing. But of course this is a "localized" name that doesn't have to align with name.
| } | ||
| ``` | ||
|
|
||
| #### streamable-http — HTTP Streaming |
There was a problem hiding this comment.
| #### streamable-http — HTTP Streaming | |
| #### streamable-http — Streamable HTTP |
|
|
||
| #### streamable-http — HTTP Streaming | ||
|
|
||
| For remote servers using HTTP streaming: |
There was a problem hiding this comment.
| For remote servers using HTTP streaming: | |
| For remote servers using streamable HTTP: |
|
|
||
| | Scheme | Description | Example | | ||
| | ------- | --------------- | ----------------------------- | | ||
| | `env` | Environment var | `env:ENV_VAR_NAME` | |
There was a problem hiding this comment.
Should we still allow for the absence of a scheme to imply env, as is probably convention out there right now, or do you think that's a bad idea for some reason?
|
|
||
| | Scheme | Description | Example | | ||
| | ------- | --------------- | ----------------------------- | | ||
| | `env` | Environment var | `env:ENV_VAR_NAME` | |
There was a problem hiding this comment.
Perhaps ironic given my ask about making this a default: but should we explicitly discourage usage of environment variables as secrets? Typical ways people inject environment variables (i.e. storing in a file and sourcing them) seems to be the pattern by which rogue agents can pick up tokens and make API calls they're not meant to have access to. And thus encouraging clients to support schemes like op might meaningfully nudge along MCP security posture.
Co-authored-by: Tadas Antanavicius <tadas@tadasant.com>
|
looking at some real world use cases, I think the I've written up the publisher-side half of this as a separate SEP — SEP-2742 (the menu shape that a Server Card / The short version of what I think is missing here:
|
The MCP ecosystem has server.json (the MCP Registry package specification), and soon the related ServerCard, for describing how servers can be configured. But there's no standard for the other side: how a client will connect to its servers.
Today every MCP client invents its own format for server configuration. Clients use different file names, and even different file types (JSON, JSONC, and TOML). They use different top-level keys (including "servers" and "mcpServers"). They use different values for the
typefield. They use different mechanisms and encodings for secret interpolation. The list goes on. This makes it hard to share MCP server configurations across clients.mcp.json is a proposal for a minimal, client-side configuration format that any MCP client can adopt, and that will provide interoperability of MCP server configurations across clients.
Note: Initial draft is opinionated with many decisions made by the author. These decisions should be considered a starting point for discussion.