-
Notifications
You must be signed in to change notification settings - Fork 528
First cut at server.json #153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
That's quite a sophistication list that's covering almost everything. But the one thing that could be still useful to add is some info about the supported OAuth Identify Provider(s). Because we are likely going to see a rise of MCP Server with some form of OAuth authentication. Who either require the user to create a user account on a certain website. Or require an OAuth callback configuration from an Identify provider for user identification. |
|
@atrawog yes, that is in:
I think that would cover what you are describing? |
| @@ -0,0 +1,371 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a script that auto-gens the overlapping portion of this from the openapi spec or vise versa? The schema is a little involved and I would not want them to accidentally diverge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely feel that pain: I think I'd rather we have a script that's in CI validating that they are consistent though (e.g. that the OpenAPI spec's /servers/:id returns a shape that is compliant with server.json), rather than literally autogenerate one or the other. Let me know if you feel strongly otherwise
Will add that validation as a third fast follow here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make changes to one or the other, I would prefer not to have to update both YAML and JSON schema to do so. I think a nice autogen story could be good, but we could also go with a validation step and then add that later on if it's a pain point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to use go generate for this, link.
|
I think this looks good overall, one comment :) |
jonathanhefner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
|
Addressed feedback and made some simplifications in 8041f5f. Thanks all for taking a look! |
| @@ -0,0 +1,306 @@ | |||
| { | |||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | |||
| "title": "MCP Server Detail", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add an $id to this JSON schema, ideally pointing to where the this schema hosted (URL & URI), and maybe including a version, such as the date of release (maybe today). This could be included optionally at publish time for improved error experience (other than complaining of some missing property).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the intent of this fast follow:
Add a version to the scheme of server.json itself (#139)
| }, | ||
| "source": { | ||
| "type": "string", | ||
| "enum": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a description of what the main public registry will support? Or what any MCP registry can support including private ones? It seems to me like this should just be a string and the set of allowed values is enforced by a specific registry implementation.
Asked another way, do you expect this JSON schema to be used by other deployments or just the main one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I guess we're going to need two schemas here, similar to how I was thinking we need to separate out the official vs. broader OpenAPI schemas. As-written, this is moreso the public registry one (e.g. constraints like enum on source don't make sense for the generic server.json).
Added ticket: #155
|
@toby or @connor4312 when you get a chance to 👍 we can move this in and then I'll move onto: |
This is a first cut at properly defining the
server.jsonfile. We have been working out details of the shape for a while, but to-date it has only been implicitly documented as the OpenAPI response to/servers/:id, which is not an exact definition due to some registry-specific details (likeidandis_latest).Edit: as-written in this PR, this is a more constrained version of
server.jsonthat the Registry intends to support at-launch. The broaderserver.jsonmay have looser constraints, for example noenumconstraint onsource=github,gitlab. See #155Motivation
There are a variety of use cases where a static representation of an MCP server is necessary:
.well-knownendpointAll of these scenarios (and more) would benefit from an agreed-upon, standardized format that makes it easy to port around and maintain a consistent experience for consumers and developers working with the data. At the end of the day, it's all the same data (or a subset of it). MCP server maintainers should have to manage one copy of this file, and all these use cases can serve that file (or a programmatic derivative/subset of it).
Please note: this is different from the file commonly referred to as
mcp.json, which is an MCP client's configuration file for running a specific set of MCP servers. See this issue.In this PR
There is a JSON schema for the file (
schema.json) and a set of examples for how some servers might look (examples.md).This PR does not add any new features/changes that weren't in the codebase already. There are a handful of improvements we can make quickly, but given a bunch of conversations flying about this concept I wanted to get something in place to point to that isn't an OpenAPI spec. I think eventually this spec might do better to live in
modelcontextprotocol/modelcontextprotolinstead ofmodelcontextprotocol/registry, but the registry is probably the most heavily dependent piece of work related to it, so may as well keep it here for now.Relevant Issues
Issue: #90
Fast follows next up:
server.jsonout from genericserver.json#155There are definitely some pending in the registry backlog that could impact the shape further. Notably at least:
packages#143And some later issues that are not blockers for the registry work but maybe other folks will be interested in seeing them incorporated into this shape: