Skip to content

feat(agent-readiness): publish MCP Server Card at /.well-known/mcp/server-card.json #3311

Description

@koala73

Part of epic #3306.

Problem

We already run an MCP server at api/mcp.ts (routed publicly at https://worldmonitor.app/mcp via vercel.json rewrite). Protocol version 2025-03-26, server name worldmonitor, version 1.0, auth via PRO API key Bearer, 60 req/min per-key rate-limited.

What's missing is the discovery manifest — SEP-1649 MCP Server Card at /.well-known/mcp/server-card.json. Without it, MCP clients can't discover our endpoint from the origin; users must paste the /mcp URL manually.

Fix

Publish a static card at public/.well-known/mcp/server-card.json:

{
  "$schema": "https://modelcontextprotocol.io/schemas/server-card.json",
  "serverInfo": {
    "name": "worldmonitor",
    "version": "1.0"
  },
  "transport": {
    "type": "streamableHttp",
    "endpoint": "https://worldmonitor.app/mcp"
  },
  "capabilities": {
    "tools": true,
    "resources": false,
    "prompts": false
  },
  "authentication": {
    "type": "oauth2",
    "authorization_servers": ["https://api.worldmonitor.app"],
    "resource": "https://api.worldmonitor.app",
    "scopes": ["mcp"]
  }
}

Important — align with existing OAuth metadata. public/.well-known/oauth-protected-resource (already live) declares:

  • resource: "https://api.worldmonitor.app"
  • authorization_servers: ["https://api.worldmonitor.app"]
  • scopes_supported: ["mcp"]

The MCP card MUST match these values exactly. We self-host OAuth at api/oauth/{authorize,token,register}.js; we do not delegate to Clerk for MCP auth.

Fields to confirm at implementation

  • transport.type — our server is Vercel edge + streamable HTTP; validate against the SEP-1649 schema at landing time (spec still moving).
  • capabilities — enumerate from the tool registry in api/mcp.ts (tools only today; no resources/prompts).

Implementation

Dependencies

Acceptance criteria

  • curl -s https://worldmonitor.app/.well-known/mcp/server-card.json returns valid JSON.
  • transport.endpoint responds to MCP initialize RPC.
  • authentication.authorization_servers + resource + scopes match /.well-known/oauth-protected-resource byte-for-byte on those fields.
  • isitagentready.com "MCP Server Card" check passes.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority, schedule when capacity allowsagent-readinessAgent-discoverability standards (well-known, RFC 8288/9727/9728, WebMCP, x402, etc.)area: APIBackend API, sidecar, keysenhancementNew feature or requestplatform: webWeb/browser-specific

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions