Skip to content

Mcp-core has compile-time dependency on mcp-json #612

Description

@scottslewis

mcp-core project has a compile-time dependency on mcp-json due to the location of these three classes:

/mcp-json/src/main/java/io/modelcontextprotocol/json/McpJsonMapper.java

/mcp-json/src/main/java/io/modelcontextprotocol/json/TypeRef.java

/mcp-json/src/main/java/io/modelcontextprotocol/json/schema/JsonSchemaValidator.java

I would argue that since these classes are required at all times, it doesn't make sense for them to be in a separate jar...as mcp-core jar is useless without mcp-json jar also present.

I would suggest moving these three classes (at least) back to mcp-core (e.g. in package io.modelcontextprotocol.sdk.util or io.modelcontextprotocol.sdk.json. This would allow a clear separation between mapper and schema validator interfaces (in core) and their implementation (default or other).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions