Skip to content

Sentry MCP server fails to initialize: cannot unmarshal JSON Schema array union type into string #14

@ejaramillompg

Description

@ejaramillompg

Summary

mcpx v1.5.0 fails to initialize the @sentry/mcp-server with the following error:

error: server "sentry": initialize: mcp: initialization failed: mcp: transport closed

Running with verbose output reveals the root cause:

json: cannot unmarshal array into Go struct field PropertySchema.tools.inputSchema.properties.type of type string

Root Cause

The Sentry MCP server uses JSON Schema draft-07 union types where type is an array of strings for optional/nullable fields:

{
  "type": ["string", "null"],
  "description": "..."
}

mcpx's Go JSON unmarshaler maps inputSchema.properties.*.type to type string, which cannot hold an array value. The spec allows both "type": "string" and "type": ["string", "null"].

Expected behavior

mcpx should handle type as either a string or []string (union) per the JSON Schema spec. Unknown or unsupported types could fall back to "any" / untyped rather than hard-failing initialization.

Reproduction

  1. Add to ~/.mcpx/config.yml:
    sentry:
      command: npx
      args: ["-y", "@sentry/mcp-server"]
      transport: stdio
  2. Authenticate: npx -y @sentry/mcp-server auth login
  3. Run: mcpx list sentry -v

Result: initialization error as above.

Environment

  • mcpx version: 1.5.0 (brew, codestz/tap)
  • @sentry/mcp-server version: latest (npx -y)
  • OS: macOS 25.3.0 (Darwin)

Workaround

Use the Sentry REST API directly with the OAuth token cached at ~/.sentry/mcp.json by the MCP server's device code flow.

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