Skip to content

McpSchema should be lenient to unknown properties #76

@eschnou

Description

@eschnou

Bug description
Following error on start when adding a mcp server (@shinzolabs/hubspot-mcp)

Unrecognized field "description" (class io.modelcontextprotocol.spec.McpSchema$Implementation), not marked as ignorable (2 known properties: "version", "name"])

Environment
Please provide as many details as possible: Spring MCP version, Java version, which vector store you use if any, etc

Using spring-ai-mcp-client-spring-boot-starter with the following configuration for mcp server:

{
  "mcpServers": {
    "hubspot": {
      "command": "npx",
      "args": [
        "@shinzolabs/hubspot-mcp"
      ],
      "env": {
        "HUBSPOT_ACCESS_TOKEN": "pat-***"
      }
    }
  }
}

Steps to reproduce
Just start the service with that particular mcp server.

Expected behavior
Even if the server report additional fields, it should ignore and not crash. You need to add the @JsonIgnoreProperties annotation to the relevant records or make it global through configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions