Skip to content

Conversation

@slimslenderslacks
Copy link
Contributor

We can not connect to some MCP servers, such as mongodb and playwright, because we cannot validate against this draft.

panic: adding tool "switch-connection": cannot validate version http://json-schema.org/draft-07/schema#, 
only https://json-schema.org/draft/2020-12/schema

I heard from @jba that we will be moving this module out of the schema, but in the short term, the number of MCP servers that we can be limited.

@jba
Copy link
Contributor

jba commented Aug 1, 2025

Wow, this is amazing! Thanks so much. Can you tell me how you wrote this code? Did you have a draft 07 implementation lying around or did you just read the specs and diff them? Either way, I'm going to read the draft 07 spec carefully myself to check your implementation, and then we'd be very happy to accept it. I hope to get to this early next week.

@slimslenderslacks
Copy link
Contributor Author

slimslenderslacks commented Aug 1, 2025

Honestly, I just had Claude code read the two drafts, asked it to diff them, and then had it update the impl to support both. I had to give it a new test (existing MCPs that were use draft 07), but then I asked it to loop until both the existing and new tests were passing.

I mostly just sanity checked the output but if this is on the right track then I can do some more work.

I think it's probably important for adoption because I'm seeing lots of MCP servers in the wild that will need this support. Over the next few days, I'll have a test base of about 150 MCP servers that I can connect to with this client.

From my tests so far, there are 3 things that come up:

  1. this draft07 schema thing
  2. lots of servers still rely on stdio transport impls dropping non-json messages (when they erroneously log junk to stdout). Other SDKs have not pushed back very hard on this so we are where we are?
  3. resource naming: go-sdk is panicing on quite a few servers because it doesn't like some of the existing resource uri names (I'll put 2 and 3 in separate issues for discussion)

@jba
Copy link
Contributor

jba commented Aug 4, 2025

Sounds good!
I would want to make sure it passes the conformance tests. See https://github.com/modelcontextprotocol/go-sdk/blob/main/jsonschema/testdata/draft2020-12/README.md. That would go a long way towards convincing me, plus we want them for regression anyway.

@findleyr findleyr requested review from samthanawalla and removed request for samthanawalla August 4, 2025 14:38
@jba
Copy link
Contributor

jba commented Aug 11, 2025

@slimslenderslacks Please open this at github.com/google/jsonschema-go. If you don't want to, let me know and I'll do it. But then I will be the committer. (I will make you co-author of course.)

@slimslenderslacks
Copy link
Contributor Author

Cool! Will open this now.

@jba
Copy link
Contributor

jba commented Aug 11, 2025

Thanks. And how about adding the test suite? We can't accept the PR without it.

@slimslenderslacks
Copy link
Contributor Author

Right, I'll try to get back to a test suite later today.
But for now, I've added a draft PR over in the other repo: google/jsonschema-go#6

I guess we'll just close the pull request, right?

@jba
Copy link
Contributor

jba commented Aug 11, 2025

Yup!

@jba jba closed this Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants