Skip to content

Option to inline JSON Schema $defs for broader MCP client compatibility #444

@johnlindquist

Description

@johnlindquist

Description

basic-memory's MCP server uses FastMCP which generates JSON Schemas with $defs references. Some MCP clients (like code-mode/UTCP) cannot resolve these references, causing tool discovery to fail.

Error (from code-mode client)

MissingRefError: can't resolve reference #/$defs/ContextResult from id #

Context

This is part of a broader MCP ecosystem issue where different clients expect different JSON Schema drafts:

Feature Request

Would it be possible to add an option or configuration to inline/dereference $defs in the tool schemas? This would improve compatibility with MCP clients that don't support $defs resolution.

Alternatively, if FastMCP provides a way to configure schema generation, that could be exposed.

Environment

  • basic-memory: 0.15.2
  • FastMCP: 2.12.4
  • MCP SDK: 1.17.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions