You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "jsiu93 (via GitHub)" <gi...@apache.org> on 2026/08/23 06:43:50 UTC
[I] bug(mcp): tools whose input schema carries `$schema` cannot be published as Client Capabilities [maka]
jsiu93 opened a new issue, #3559:
URL: https://github.com/apache/maka/issues/3559
### What happened
`maka runtime-host capability-provider serve` fails before publishing a single tool when an MCP server advertises input schemas with a root `$schema` annotation. The descriptor is copied into the Client Capability frame unchanged, and the protocol's strict keyword allowlist rejects it:
```text
Runtime Host capability provider stopped: Unsupported Client Capability tool schema keyword
CapabilityProviderPublicationError: Unsupported Client Capability tool schema keyword
[exit=1]
```
This hits most servers built with the TypeScript SDK. `@modelcontextprotocol/sdk` converts Zod input schemas in `server/zod-json-schema-compat.js` with `zod-to-json-schema` (Zod v3) or `z.toJSONSchema` (Zod v4), and both emit a root `$schema` by default. A direct `tools/list` from XcodeBuildMCP 2.7.0 had `$schema` on 44 of 44 tools, and it was the only keyword outside the allowlist in any of them; an earlier probe through `mcp_router` saw the same on 31 of 31 tools. Python FastMCP servers generally do not emit it.
`$schema` and `$comment` are annotations with no validation meaning. Expected: the provider publishes these tools; the allowlist can stay strict for everything else.
### How to reproduce
1. Start a fresh Runtime Host with a loopback WebSocket listener and issue a capability-provider credential (supply it through `MAKA_RUNTIME_HOST_ACCESS_CREDENTIAL`).
2. Point an MCP config at any TypeScript SDK server, for example:
```json
{
"version": 2,
"mcpServers": {
"xcodebuildmcp": {
"command": "bunx",
"args": ["xcodebuildmcp", "mcp"]
}
}
}
```
3. Run:
```sh
maka runtime-host capability-provider serve \
--url ws://127.0.0.1:47633/runtime-host \
--mcp-config ./mcp.json \
--expected-root "$ROOT_ID" \
--client-identity ./capability-provider-identity.json
```
4. The provider exits 1 with the error above and publishes nothing.
Unit reproduction: an MCP manager test against a stdio fixture whose tool schema carries a root `$schema`, a nested `$schema` under `properties`, a `$comment`, and an `$id`. On `origin/main` the descriptor still contains all three annotations.
### Environment
- Maka version or commit: 0.1.11 dev build; confirmed on `origin/main` at `6ada6b546`
- OS and version: macOS 26.6.1 (25G76), arm64
- Surface: CLI capability provider and Runtime Host
- Node.js v22.22.2, npm 10.9.7
- MCP server: XcodeBuildMCP 2.7.0 (TypeScript SDK)
### Logs, screenshots, or additional context
Census of the captured XcodeBuildMCP `tools/list`, recursing through the allowlisted child positions:
```text
tools=44
root_$schema=44
unsupported_keywords={"$schema":44}
```
I have a fix that strips `$schema` and `$comment` at MCP discovery and leaves the validator untouched; PR to follow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [I] bug(mcp): tools whose input schema carries `$schema` cannot be published as Client Capabilities [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #3559: bug(mcp): tools whose input schema carries `$schema` cannot be published as Client Capabilities
URL: https://github.com/apache/maka/issues/3559
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org