Repository navigation
Proposal: Standardizing MCP Configuration File Format #681
Closed
msabramo
started this conversation in
Ideas - General
Replies: 2 comments
|
There is an ongoing discussion about this in #292. 😄 |
0 replies
|
Apologies, yes there is a discussion with a lot of the same points in #292 and I promise I searched for existing discussions but apparently my search-fu was not good enough. 😄 I wonder if GitHub Copilot would've done a better job of finding that existing issue as it likely would've been more exhaustive in the keywords it tried... |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Your Idea
Why This Matters
JSON is the current standard for MCP configuration files (often called
mcp.json, typically has anmcpServerskey), and it’s used across tools like Claude Desktop, Cursor, etc. However, I'm not aware of any specification to ensure consistency across implementations (though luckily it seems to have evolved to be rather consistent). Standardizing the JSON format in the MCP spec would prevent future divergence and make it easier to evolve the format over time.JSON example
I think people are pretty familiar with this config file, but I'll include an example to make absolutely sure we're on the same page:
{ "mcpServers": { "computer-control-mcp": { "command": "uvx", "args": ["computer-control-mcp@latest"] }, "playwright": { "command": "npx", "args": [ "@playwright/mcp@latest" ] }, "selenium": { "command": "npx", "args": ["-y", "@angiejones/mcp-selenium"] }, "utc_time": { "url": "http://utc-time-mcp-server.company.com/mcp" }, "adobe_firefly": { "type": "stdio", "env": { "FIREFLY_CLIENT_ID": "xyz", "FIREFLY_CLIENT_SECRET": "123" }, "command": "uvx", "args": [ "--from", "git+https://github.com/msabramo/python-firefly[mcp-server]", "mcp-server" ] }, "postgres": { "url": "http://localhost:3000/mcp" } } }Currently, I have very similar files for Claude Desktop and Cursor, but my fear is that as MCP evolves to have new features, different tools may end up specifying things in different ways and then it will be extra cognitive load to maintain these files.
This format is simple, widely supported, and works well for MCP tools. By formalizing this schema, we can ensure all tools interpret configurations consistently.
Why Standardization Matters
Standardizing the JSON format ensures:
Example of future-proofing: Adding a YAML variant of the same configuration file
While JSON is the current standard, some users might prefer YAML for its flexibility and readability. YAML offers:
For example, the JSON configuration I included above is more readable in YAML:
Aside from looking cleaner, this MCP configuration is easier to maintain, as the need for commas has been removed so we no longer have to worry about pasting a snippet in and having to add or remove commas. Since YAML is a superset of JSON, a snippet that ends with a comma could be pasted in anywhere and it should work. In fact, people that don't love YAML but like some aspects of it, like comments and its forgiveness for extra commas, could opt to still essentially use JSON syntax, but have it be a better JSON.
To be clear, I am not advocating removing the JSON format - I think it should absolutely be kept for backwards compatibility and I don't want to force YAML on anyone as I know a lot of people dislike it. In fact, since YAML is a superset of JSON, it seems it would be pretty easy for clients to support YAML and continue to support the JSON format with little or no changes. I would advocate that any development of this include testing to ensure that current
mcp.jsonfiles still work.Another example of future-proofing: Making it clear that
commandcan have full command and don't have to split out arguments into a list inargsMy examples above separate the
commandandargsbecause this is what I've seen everywhere that I've looked, so I've followed that pattern. One day, I expressed a desire to Cursor devs to simply paste a full shell command into thecommandkey and not mess withargsand I was told (but haven't verified yet) that I can do this very thing in Cursor and it works. E.g.:I think I haven't tried this out in part because I fear that I might get accustomed to it and then find it doesn't work in other MCP tools. So I'd love to see a specification for the configuration file format that makes it clear that this is allowed, because even if all the tools actually support this, it seems to be not well-known.
Note that if we combine this simple command syntax with YAML, then we get something that looks quite nice:
Just a few ideas. Would love to hear other people's thoughts and discuss.
Scope
All reactions