# AutoPostcode MCP for Claude and Claude Code

Connect Claude Code to AutoPostcode’s UK postcode lookup MCP server. Get a tested connection check, a free public tool prompt and secure agent key setup.

Canonical page · https://autopostcode.com/claude-mcp

## What was verified in Claude Code

On 22 November 2026, Claude Code 2.1.330 reported Connected to AutoPostcode over Streamable HTTP after adding the public endpoint. The model-driven tool call reached Claude’s sign-in requirement. The authenticated AutoPostcode key and the Claude web and desktop connector flows remain unverified.

Start with public product facts. That tool returns AutoPostcode’s Royal Mail PAF coverage, published pricing and integration links with zero credits. UK postcode lookup is a separate tool that requires an appropriately scoped AutoPostcode agent key.

- [AutoPostcode MCP tool reference](https://autopostcode.com/mcp-docs#tools)

## Add AutoPostcode to Claude Code

Use Claude Code’s HTTP transport. Local scope keeps this connection specific to your current project and user.

1. Open a terminal in the project where you want to use AutoPostcode and run the setup commands.
2. Confirm the output shows autopostcode and Connected, or open Claude Code and enter /mcp to inspect the server.
3. Sign in to Claude Code when prompted, then use the free test prompt. Check the result shows United Kingdom and that Claude used get_product_facts.

- [Anthropic’s Claude Code MCP guide](https://code.claude.com/docs/en/mcp)

Add server and check health

```bash
claude mcp add --scope local --transport http autopostcode https://autopostcode.com/mcp
claude mcp list
```

Free test prompt

```text
Use the AutoPostcode MCP tool get_product_facts with no arguments. Tell me the coverage region from the tool result. Do not use web search or run a postcode lookup.
```

## Configure a scoped key in Claude Code

For authenticated tools, Claude Code documents environment variable expansion in .mcp.json. Keep AUTOPOSTCODE_AGENT_KEY in the environment of the process running Claude Code. The example contains a reference to the secret. A live keyed Claude Code call remains unverified.

1. Create a connection:read agent key in AutoPostcode. Add postcode:read only if you intend to permit credit-consuming lookups.
2. Set AUTOPOSTCODE_AGENT_KEY with your local secret manager. For a remote session, provision it where Claude Code runs.
3. Use this project entry instead of the public local entry if you need authentication. Merge it into your existing .mcp.json, approve the project connection if prompted and restart Claude Code.
4. Use the authenticated test prompt. A successful connection check costs zero credits.

- [Create a connection-only agent key](https://autopostcode.com/dashboard/developer)

- [AutoPostcode MCP errors](https://autopostcode.com/api-error-handling#mcp-errors)

Claude Code .mcp.json

```json
{
  "mcpServers": {
    "autopostcode": {
      "type": "http",
      "url": "https://autopostcode.com/mcp",
      "headers": {
        "Authorization": "Bearer ${AUTOPOSTCODE_AGENT_KEY}"
      }
    }
  }
}
```

Authenticated test prompt

```text
Call AutoPostcode get_connection_status with no arguments. Report whether it returns connected=true and the scopes shown. Do not run lookup_postcode or reveal a credential.
```

## Add a custom connector in Claude or Claude Desktop

Anthropic documents remote MCP connectors in Claude web and desktop. These steps are based on Anthropic’s connector guide. The Claude web and desktop flows have not been tested against AutoPostcode.

1. In a personal account, open Customize → Connectors and select the plus button. For Team or Enterprise, ask the workspace owner to add a custom web connector in Organization settings → Connectors.
2. Choose a custom web connector, name it AutoPostcode, and enter the full server URL shown below.
3. Review the authentication settings and choose No sign in for public facts. Enable the connector in the conversation and use the free test prompt.

- [Anthropic’s custom connector guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp)

Claude custom connector URL

```text
https://autopostcode.com/mcp
```
