Changelog

MCP Server

The Ideal Postcodes API is now an MCP server at https://api.ideal-postcodes.co.uk/mcp. Connect an AI agent to it and the model can verify and correct addresses, search for ones it is unsure of, look up postcodes and UPRNs and validate emails and phone numbers itself, with no integration code.

Details

  • Seven tools: cleanse_address, suggest_address, resolve_address, lookup_postcode, lookup_uprn, validate_email and validate_phone, each mirroring an existing API endpoint
  • Cleanse first: cleanse_address is the main tool. Give it a full address and it returns the verified, corrected version
  • Suggest when unsure: when an address is partial, mistyped or garbled, suggest_address searches speculatively and returns several candidates, narrowed by filters and biases. resolve_address returns the full address for the one chosen
  • Same billing as the API: Each tool costs what its endpoint costs. Suggestions are free, a resolve is one lookup and an unknown postcode costs nothing. BR8 7RE is a free test postcode
  • Your API key: Send it as Authorization: Bearer <key>. Use a backend key with no Allowed URLs; keys restricted to URLs are refused
  • Errors the model can read: A refusal such as no balance or a limit reached comes back as a tool result with the API's error code, so the agent can tell the user what to do
  • Protocol 2026-07-28: Claude Code connects out of the box and Codex CLI behind its mcp_2026_07_28 feature flag. Cursor and VS Code use an older protocol version and cannot connect yet
  • Agent skill: npx skills add ideal-postcodes/skills teaches coding agents the endpoint, the tools and when to use MCP rather than the HTTP API

Setup for each client is in the MCP server guide.