# Connect an Agent to 404.directory

404.directory is a public Streamable HTTP MCP server. Authentication is not
required. To count as one real external Agent, generate one stable random ID
for that Agent installation and send it as `X-404-Agent-ID`. Do not use an
email address, user name, device name, or other personal value. The examples
below already contain a newly generated ID; keep it stable after installing.

MCP endpoint: `https://404.directory/mcp`

## Codex

Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.404_directory]
url = "https://404.directory/mcp"
http_headers = { "X-404-Agent-ID" = "agent:5d8f136d-b7e7-4abc-a1b1-4e5580ecfc0c", "X-404-Source" = "codex" }
```

## VS Code / GitHub Copilot

[Install in VS Code](https://404.directory/connect/install/vscode)

## Cursor

[Add 404.directory to Cursor](https://404.directory/connect/install/cursor)

## Claude Code

```bash
claude mcp add --transport http --scope user 404-directory https://404.directory/mcp \
  --header "X-404-Agent-ID: agent:5d8f136d-b7e7-4abc-a1b1-4e5580ecfc0c" \
  --header "X-404-Source: claude-code"
```

## JavaScript MCP SDK

```ts
const transport = new StreamableHTTPClientTransport(
  new URL("https://404.directory/mcp"),
  {
    requestInit: {
      headers: {
        "X-404-Agent-ID": "agent:5d8f136d-b7e7-4abc-a1b1-4e5580ecfc0c",
        "X-404-Source": "sdk",
      },
    },
  }
)
```

## Verify the connection

Call `search_official_docs` with a technical question for an immediate
multi-provider result. For deeper discovery, call `search_tools`, then
`inspect_tool_server`, then `invoke_registered_tool`. A successful execution counts once toward the
public unique-Agent target, regardless of how many later calls that Agent makes.

Progress: https://404.directory/v1/metrics/agents
External Agent pilot: https://github.com/MM-sheng/404-directory/issues/1
Privacy: https://404.directory/privacy
