Protocol Spec · MCP Registry

MCP Registry server.json & /.well-known/mcp/server.json Guide

Author valid Model Context Protocol server.json manifests for the official MCP Registry and self-hosted /.well-known/mcp/server.json discovery with Streamable HTTP and clean token budgets.

Manifest Parameters

Zero Telemetry · Strict CSP
Authentication & OAuth Scopes
MCP Registry server.json Options
Exact Well-Known Endpoint URL application/json
https://agent.example.com/.well-known/mcp/server.json
/.well-known/mcp/server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "com.example/acme-assistant",
  "title": "Acme Cloud Assistant",
  "description": "Autonomous API diagnostics, billing lookups, and workflow execution via A2A and MCP.",
  "version": "1.0.0",
  "websiteUrl": "https://docs.example.com/agents",
  "repository": {
    "url": "https://github.com/example/acme-mcp",
    "source": "github"
  },
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://agent.example.com/mcp",
      "headers": [
        {
          "name": "Authorization",
          "description": "OAuth 2.1 or Bearer token (never embed static secrets in server.json)",
          "isRequired": true,
          "isSecret": true
        }
      ]
    }
  ]
}
curl Verification Command
curl -fsSL -D - "https://agent.example.com/.well-known/mcp/server.json" | head -n 40
HTTP 401 WWW-Authenticate Header (RFC 9728 / MCP-PRO-002)
WWW-Authenticate: Bearer resource_metadata="https://agent.example.com/.well-known/oauth-protected-resource", scope="agent:invoke mcp:tools mcp:read"
Live Well-Known Audit 98.4% Lack Agent Cards

Verify live A2A, MCP, OAuth & AEO discovery in production

In RungLab's N=140 B2B SaaS Readiness Benchmark, 98.4% (62/63) of full-telemetry domains lacked agent-card.json. Audit your live domain with ReadyCheck, cut MCP schema token tax with MCPDiet, or automate fleet discovery checks via Apify & RapidAPI.

Required Endpoints, Paths & MIME Types

Path / Endpoint Purpose Required Content-Type
/.well-known/mcp/server.json Self-hosted domain discovery path for remote MCP server metadata application/json; charset=utf-8
/mcp Streamable HTTP JSON-RPC MCP transport endpoint declared inside remotes[] application/json / text/event-stream

Official MCP Registry server.json Schema Template

server.json
{
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "name": "com.example/acme-assistant",
  "title": "Acme Cloud Assistant MCP",
  "description": "Autonomous API diagnostics and bounded usage metrics over Streamable HTTP.",
  "version": "1.0.0",
  "websiteUrl": "https://docs.example.com/mcp",
  "repository": {
    "url": "https://github.com/example/acme-mcp",
    "source": "github"
  },
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://mcp.example.com/mcp",
      "headers": [
        {
          "name": "Authorization",
          "description": "OAuth 2.1 or Bearer token (supplied dynamically by client)",
          "isRequired": true,
          "isSecret": true
        }
      ]
    }
  ]
}

Verify MCP Streamable HTTP + Registry Metadata

verify-mcp-server.sh
# 1. Verify well-known server.json discovery
curl -fsSL "https://yourdomain.com/.well-known/mcp/server.json" | jq .

# 2. Probe Streamable HTTP initialize handshake
curl -i -X POST "https://yourdomain.com/mcp" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"probe","version":"1.0"}}}'

Key Empirical & Architectural Takeaways

  • Across RungLab's audit of 100 live MCP Registry servers, 81.8% (45/55 reachable) use streamable-http-json, 18.2% (10/55) use streamable-http-sse, and 89.1% (49/55) negotiate protocolVersion 2025-03-26.
  • MCP Registry enforces reverse-DNS naming (e.g. com.example/server-name) and concise <=100-character descriptions so registry listings stay legible.
  • Discovery metadata stays lightweight, whereas live tools/list schemas inject a median 2,003 tokens (P90 9,884, max 16,424) per turn — pair server.json publishing with MCPDiet schema linting.

Common Production Pitfalls to Avoid

  • Hardcoding real API keys or bearer tokens inside remotes[].headers[].value leaks credentials publicly — only declare header metadata with isSecret: true and let the MCP host inject runtime credentials or use RFC 9728 OAuth.
  • Shipping legacy sse-only transport when modern MCP hosts expect streamable-http causes handshake friction.
  • Exceeding the 100-character description limit or omitting semver version causes MCP Registry CI validation failures.

More Agent Discovery Specifications & Framework Guides

Backend Framework Route Handlers + Middleware

Next.js App Router /.well-known/* Route Handlers & Headers

Serve /.well-known/agent-card.json, /.well-known/mcp/server.json, and /.well-known/oauth-protected-resource cleanly in Next.js App Router without middleware auth redirects or trailing-slash loops.

← Back to AI Agent Discovery Generator & Validator Hub

Frequently Asked Questions

Where do I publish server.json on my own domain vs. the official MCP Registry?

Commit server.json in your repository root when publishing to registry.modelcontextprotocol.io via mcp-publisher, and optionally serve the same JSON at https://yourdomain.com/.well-known/mcp/server.json for direct domain discovery.

Why does the MCP server.json validator check description length <= 100 characters?

The official MCP Registry schema restricts server description strings to 100 characters to prevent catalog bloat, routing long documentation to websiteUrl instead.

How do I keep tool schemas fast and cheap after clients connect via server.json?

Run MCPDiet (mcp.runglab.dev) or check our /mcp-cost/ calculator — 54.5% of live registry servers omit additionalProperties: false and 34.5% ship bloated >120-token tool descriptions.