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

> Source: <https://deallocatedobjects.com/posts/serving-well-known-mcp-json-for-mcp-directories>
> Published: 2026-11-27 14:00:00+00:00

**Recommendation:** Serve /.well-known/oauth-protected-resource and oauth-authorization-server first, then a SEP-2127 card at <MCP URL>/server-card plus /.well-known/ai-catalog.json, and add the legacy SEP-1649 card so scanners like Smithery can list your tools.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

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

[Jake Marsh](https://deallocatedobjects.com/about)

I was adding [Taskhold](https://taskhold.com/?ref=deallocated-post) to [mcpub.dev](https://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:

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[#](#where-the-spec-ended-up)

The path comes from [SEP-1649](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1649), an October 2025 proposal for “MCP Server Cards” at `.well-known/mcp.json`. It was replaced by [SEP-2127](https://modelcontextprotocol.io/seps/2127-mcp-server-cards), 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](https://github.com/modelcontextprotocol/ext-server-card/blob/main/docs/discovery.md) 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](https://callforme.tel/?ref=deallocated-post)’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:

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](https://deallocatedobjects.com/posts/how-remote-mcp-servers-trigger-oauth-sign-in). That file names the authorization server:

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[#](#what-i-serve)

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

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](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/3562) for it. Use the URL anyway, and hold off on validating against it in CI.
