Claude Code 1.0.77 - MCP: [DEBUG] MCP server "windmill": No token data found
Even though the MCP is configured with the token, and the token is valid and can be used otherwise,windmill mcp reports errors in claude code.
[DEBUG] MCP server "windmill": Using redirect port: 61290
[DEBUG] MCP server "windmill": Generated new OAuth state
[DEBUG] MCP server "windmill": Starting SDK auth
[DEBUG] MCP server "windmill": Server URL: http://localhost/api/mcp/w/<workspace_redacted>/sse?token=<token_redacted>
[DEBUG] MCP server "windmill": SDK auth error: SyntaxError: Failed to parse JSON
[DEBUG] MCP server "windmill": MCP OAuth server cleaned up
Backend Version: CE v1.523.0-2-g0893ce103
1.0.77 (Claude Code)
5 Replies
the error in the title is in the regular debug output when asking claude to do something with the mcp, the other logs are when using /mcp and going to windmill and triggering authentication manually
the mcp is throwing json errors and token issues even though it has everything it needs, for those that come after, you can have claude.md instructions on how to use the windmill cli to do things instead, it's working fine. (also if you use the github mcp, i find custom instructions for the github cli to work a lot better and faster than the mcp, i dont know if this is the case with windmill since i cant get it to work at all)
@centdix974
Hi ! Can you confirm you are adding the mcp server like this ?
claude mcp add --transport http windmill https://app.windmill.dev/api/mcp/w/<workspace>/sse?token=<token>I have the same problem with Windmill CE v1.563.4, I am embedding my MCP server exactly like the example from Farhad says, with valid token - Claude Code v2.0.24 sees it as connected, but when CC tries to read from the backend, I get API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.29.custom.input_schema: JSON schema is invalid. It must match JSON Schema draft 2020-12 (https://json-schema.org/draft/2020-12). Learn more about tool use at https://docs.claude.com/en/docs/tool-use."},"request_id":"req_011CUN8QkrTuZdvbsXitRrHb"}
When I directed CC to help me investigate it deeper, it reports that:
The issue is that Windmill's MCP server is exposing tools with invalid JSON schemas that violate JSON Schema Draft 2020-12 requirements.
What We Found
When I fetched your Windmill MCP tools from https://xxxx/api/mcp/w/xxxx/list_tools, we discovered 4 tools with schema violations:
1. createResource - Has a value property defined as just {} (empty object, no type field)
2. updateResource - Same issue, value: {}
3. createSchedule - Has a retry property with an unresolved $ref pointing to another OpenAPI file
4. updateSchedule - Same unresolved $ref issue
Why This Breaks Claude
According to JSON Schema Draft 2020-12 (which MCP requires), every property must have a type field. Examples:
- ✅ Valid: "value": { "type": "object" }
- ❌ Invalid: "value": {}
- ✅ Valid: resolved reference with actual schema
- ❌ Invalid: "$ref": "../../some/file#/path" (unresolved reference)
When Claude tries to use your MCP server, it validates all tool schemas. When it hits one of these 4 invalid tools, it rejects the entire tool list with the error you saw.
Root Cause
This is a Windmill backend bug. Their OpenAPI-to-MCP converter doesn't properly:
1. Set default types for empty schema objects
2. Resolve $ref references before exposing schemas to MCP
Solution
Short term: Report this to Windmill (I can help you draft the issue)
Immediate workaround: The MCP should still work for most tools - just these 4 resource/schedule creation tools are broken. Your other scripts and API tools should work fine once Windmill fixes their schema generation.
Hi thanks for the detailed debug, the mcp server exposes these two things:
- your scripts and flows
- some api endpoints to manage your resources, variables and such
The JSON schema issue certainly don't come from the api endpoints, those are the same for everyone and works for other people. The issue is certainly with one of your scripts and flows arguments.
I'll investigate this, but what could help is if you tried with a token that just exposes some of your scripts and flows (you can filter which ones are exposed with the "favorites" scope when generating the mcp token), and tell me which one breaks claude usage