Skip to content

Conversation

@h3xxit
Copy link
Member

@h3xxit h3xxit commented Nov 29, 2025

Summary by cubic

Resolves MCP tool schema compatibility with FastMCP 2.0+ by automatically dereferencing JSON Schema $defs/$ref, preventing MissingRefError during tool discovery. Updates @utcp/mcp to handle schemas transparently.

  • Bug Fixes

    • Dereferences tool input/output schemas when listing tools to inline $defs/$ref.
    • Fixes MissingRefError and supports FastMCP 2.0+ servers (e.g., basic-memory).
    • Falls back to original schema if dereferencing fails; legacy servers continue to work.
  • Dependencies

    • Added @apidevtools/json-schema-ref-parser.
    • Bumped @utcp/mcp to 1.0.17 and aligned internal packages with @utcp/sdk 1.0.15+.

Written for commit 539efc4. Summary will update automatically on new commits.

edujuan and others added 3 commits November 25, 2025 18:52
…tibility

- Add @apidevtools/json-schema-ref-parser dependency
- Implement schema dereferencing in registerManual to resolve $defs and $ref
- Resolves issue with FastMCP 2.0+ servers (e.g., basic-memory)
- Fixes MissingRefError: can't resolve reference #/$defs/...
- Maintains backwards compatibility with legacy MCP servers
- All existing tests pass

Related to: universal-tool-calling-protocol/code-mode#10
…efs-schema-resolution

Fix mcp defs schema resolution
@h3xxit h3xxit changed the title Dev MCP resolve defs refs Nov 29, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="bun.lock">

<violation number="1" location="bun.lock:114">
@apidevtools/json-schema-ref-parser requires @types/json-schema as a peer dependency, but @utcp/mcp never declares it, leaving the new dependency in bun.lock with an unmet peer requirement.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

"version": "1.0.12",
"version": "1.0.16",
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^15.1.2",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apidevtools/json-schema-ref-parser requires @types/json-schema as a peer dependency, but @utcp/mcp never declares it, leaving the new dependency in bun.lock with an unmet peer requirement.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At bun.lock, line 114:

<comment>@apidevtools/json-schema-ref-parser requires @types/json-schema as a peer dependency, but @utcp/mcp never declares it, leaving the new dependency in bun.lock with an unmet peer requirement.</comment>

<file context>
@@ -109,10 +109,11 @@
-      &quot;version&quot;: &quot;1.0.12&quot;,
+      &quot;version&quot;: &quot;1.0.16&quot;,
       &quot;dependencies&quot;: {
+        &quot;@apidevtools/json-schema-ref-parser&quot;: &quot;^15.1.2&quot;,
         &quot;@modelcontextprotocol/sdk&quot;: &quot;^1.17.4&quot;,
-        &quot;@utcp/sdk&quot;: &quot;^1.0.4&quot;,
</file context>

✅ Addressed in 539efc4

@h3xxit h3xxit merged commit a4af55f into main Nov 29, 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