Skip to content

Conversation

@weese
Copy link

@weese weese commented Nov 8, 2025

mcp-framework uses content type error to represent errors which is not compliant with the MCP standard as defined here:
https://modelcontextprotocol.io/specification/2025-06-18/server/tools

It breaks the standard clients e.g. from https://modelcontextprotocol.io/ that cannot parse and fail with unsupported content type: error.

I fixed it in my PR and successfully tested it.

Current and invalid error response:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "error",
        "text": "Invalid number"
      }
    ]
  }
}

Expected error response as defined in the standard:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Invalid number"
      }
    ],
    "isError": true
  }
}

@weese weese changed the title fix: error is not allowed as content type [FIX] error is not allowed as content type Nov 8, 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.

1 participant