Serving /.well-known/mcp.json For MCP Directories

2 min readAI & Agents, Web

Jake Marsh

I was adding Taskhold to mcpub.dev, an open MCP directory, and its submit step says to create /.well-known/mcp.json on your domain first, with any content. So what’s that file supposed to contain?

Nothing in particular, it turns out. mcpub is open source, and its whole check is one GET:

mcpub/src/main.rsRust
match tokio::time::timeout(
    Duration::from_secs(CHECK_TIMEOUT_S),
    client.get(&wk_url).send(),
).await {
    Ok(Ok(resp)) => resp.status() != 404,
    _            => false,
}

Anything but a 404 within 5 seconds passes, and the README says an empty {} is fine. It’s proof you control the domain. The one way to fail it is a catch-all route that renders a 404 page for unknown paths.

Where The Spec Ended Up#

The path comes from SEP-1649, an October 2025 proposal for “MCP Server Cards” at .well-known/mcp.json. It was replaced by SEP-2127, merged in October 2026 as an optional extension, which splits discovery in two:

  1. An AI Catalog at /.well-known/ai-catalog.json lists the servers on a domain.
  2. Each server’s card lives where the catalog says, with <your MCP URL>/server-card as the default.

The working group’s discovery doc explains why the card moved out: “.well-known is for site-wide metadata, whereas an individual server’s card is application-level metadata.” They also ruled out serving the card from a plain GET on the MCP endpoint, because in Streamable HTTP that GET already opens the SSE stream.

A card is small on purpose: a reverse-DNS name, version, a description of up to 100 characters, and remotes with each endpoint’s transport and URL. It leaves out the tool list, since tools can differ per signed-in user, and clients should get them from tools/list after connecting. Serve it as application/mcp-server-card+json with Access-Control-Allow-Origin: *, since browser-based clients read it, plus Cache-Control: public, max-age=3600 and an ETag. CallForMe’s card uses remotes to list two endpoints: an OAuth one and an open one for clients that can’t do OAuth.

Taskhold’s catalog has one entry:

https://taskhold.com/.well-known/ai-catalog.jsonJSON
{
  "specVersion": "1.0",
  "entries": [
    {
      "identifier": "urn:air:taskhold.com:mcp",
      "displayName": "Taskhold MCP server (task list shared with your coding agents)",
      "type": "application/mcp-server-card+json",
      "url": "https://taskhold.com/api/mcp/server-card",
      "representativeQueries": ["What should I work on next from my task list?"]
    }
  ]
}

Some directories still read the older SEP-1649 card at /.well-known/mcp/server-card.json, which includes the tool list. Smithery’s scanner was one: it listed no tools for Taskhold until I served that card, because it couldn’t get past the sign-in. Taskhold builds that list by registering the real tools on a throwaway McpServer and calling tools/list, so it can’t drift from what the server offers.

There’s no auth field either. MCP already finds auth through the 401 on the first request, which points at /.well-known/oauth-protected-resource, as I covered in how remote MCP servers trigger OAuth sign-in. That file names the authorization server:

https://taskhold.com/.well-known/oauth-protected-resource/api/mcpJSON
{
  "resource": "https://taskhold.com/api/mcp",
  "authorization_servers": ["https://taskhold.com"],
  "scopes_supported": ["tasks"]
}

The discovery doc calls the OAuth files “genuinely site-wide,” which is why they stay under .well-known while the card moved out. The card says where to connect and the OAuth files say how to sign in.

What I Serve#

Taskhold’s mcp.json is a static file that points at the real documents instead of copying them (trimmed):

https://taskhold.com/.well-known/mcp.jsonJSON
{
  "name": "Taskhold",
  "websiteUrl": "https://taskhold.com",
  "servers": [
    {
      "url": "https://taskhold.com/api/mcp",
      "transport": "streamable-http",
      "authentication": {
        "type": "oauth2",
        "protectedResourceMetadata": "https://taskhold.com/.well-known/oauth-protected-resource/api/mcp"
      }
    }
  ],
  "serverCard": "https://taskhold.com/.well-known/mcp/server-card.json"
}

For a remote MCP server with OAuth, here’s what I’d serve, most important first:

  • the OAuth metadata (oauth-protected-resource and oauth-authorization-server), because clients can’t sign in without it
  • a card at <MCP URL>/server-card in the SEP-2127 shape
  • /.well-known/ai-catalog.json pointing at that card
  • /.well-known/mcp.json for directories like mcpub that ask for it

One loose end: the $schema URL every card is required to use returned a 404 when I checked, and there’s an open issue for it. Use the URL anyway, and hold off on validating against it in CI.