Skip to main content
Solved

MCP server advertises invalid JSON Schema (null inside string enum) — 400s on strict-validating backends

  • April 24, 2026
  • 2 replies
  • 32 views

Forum|alt.badge.img

Hi team, filing this here rather than a support ticket so other users hitting the same opaque 400 can find it.

TL;DR

The create-webhook-integration tool schema served from https://mcp.revenuecat.ai/mcp contains a null literal inside a type: "string" enum. Anthropic’s own endpoint accepts it silently, but any strict JSON Schema validator (e.g. Volcengine Ark Coding Plan with Kimi/GLM/Doubao models) rejects the entire request with 400 InvalidParameter and an empty param field — which is effectively undebuggable without writing a capture proxy.

The Offending Schema

"environment": {  
"anyOf": [
{ "type": "string", "enum": ["production", "sandbox", null] },
{ "type": "null" }
]
}

The null in the third enum slot is invalid (parent type is "string") and redundant ({"type":"null"} sibling already handles nullability).

Minimal Repro

curl -X POST https://ark.cn-beijing.volces.com/api/coding/v1/messages \  
-H 'x-api-key: <ark_key>' \
-H 'anthropic-version: 2023-06-01' \
-H 'content-type: application/json' \
-d '{
"model": "kimi-k2.6",
"max_tokens": 64,
"tools": [{
"name": "create-webhook-integration",
"description": "",
"input_schema": {
"type": "object",
"properties": {
"environment": {
"anyOf": [
{"type": "string", "enum": ["production", "sandbox", null]},
{"type": "null"}
]
}
}
}
}],
"messages": [{"role":"user","content":"hi"}]
}'
# => {"error":{"code":"InvalidParameter","message":"...","param":"","type":"BadRequest"}}

Remove the null from the enum → 200 OK.

User Impact

Any Claude Code user who (1) has the RevenueCat MCP connected and (2) points Claude Code at any strict Anthropic-compatible backend (ark, self-hosted vLLM with strict validation, etc.) gets a hard 400 on every single message. The user has no way to diagnose this without TLS-MITMing their own traffic — I had to spin up a local reverse proxy, dump the 230KB request body, and binary-search through all 147 advertised tools before landing on this one schema.

Suggested Fix

Drop the redundant null from the enum — matches how your other nullable fields in the same tool (authorization_headerapp_idevent_types) are already structured:

"environment": {  
"anyOf": [
{ "type": "string", "enum": ["production", "sandbox"] },
{ "type": "null" }
]
}

Might also be worth a sweep of the other ~70 tools’ schemas for the same null-in-typed-enum pattern.

Environment

  • Claude Code v2.1.119
  • MCP endpoint: https://mcp.revenuecat.ai/mcp
  • Tool: create-webhook-integration
  • Installed via rc-claude-code-plugin, latest as of 2026-04-24

Thanks!

Best answer by Jens

Thanks ​@dimpurr for reporting this. This has been fixed now.

2 replies

hussain
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • April 28, 2026

Hi ​@dimpurr,

Thanks a lot for such a detailed report.

 I've confirmed the bad schema in our spec and shared it with the engineering team to fix; I'll circle back here as soon as I have an update on the rollout.

Best,

Hussain


Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • Answer
  • April 28, 2026

Thanks ​@dimpurr for reporting this. This has been fixed now.