AI Integration

MCP Server for AI Agents

Add UK address lookup capabilities to your AI agents, LLMs, and chatbots using the Model Context Protocol (MCP)

Get API Key View Integration

MCP Server Endpoint

Simple bearer token authentication with your ePostcode API key

https://mcp.epostcode.com/

What is Model Context Protocol (MCP)?

Model Context Protocol (MCP) is an open standard that enables AI assistants, LLMs, and agents to securely connect to external data sources and tools. It provides a unified way for AI systems to access real-world data and functionality.

The ePostcode MCP server allows AI agents to perform UK address lookups, postcode searches, and address validation directly within conversations - making it perfect for chatbots, virtual assistants, and AI-powered forms.

Simple Integration

Just add your API key as a bearer token - no complex setup required

Secure Authentication

Industry-standard bearer token authentication keeps your API key safe

Universal Compatibility

Works with Claude, ChatGPT, custom agents, and any MCP-compatible AI

Real-Time Data

Access to 30M+ UK addresses with instant, accurate results

Example: AI Chatbot Address Lookup

Try the interactive demo below - type a UK postcode (e.g., SW1A 2AA) to see how the AI agent uses MCP to lookup addresses:

Pro Tip: The MCP server handles all the complex address lookup logic, so your AI agent can focus on the conversation flow!

Developer Guide

Integration Examples

Choose your platform and get started in minutes with our ready-to-use code examples

🔷 Claude Desktop 🐍 Python 💚 Node.js 🤖 ChatGPT cURL
🔷

Claude Desktop App

Official Anthropic Claude desktop application

Add ePostcode MCP server to Claude Desktop by editing your configuration file - Claude will automatically load the integration on startup.

Configuration File Location:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{ "mcpServers": { "epostcode": { "url": "https://mcp.epostcode.com/", "headers": { "Authorization": "Bearer YOUR_API_KEY_HERE" } } } }
Important: Replace YOUR_API_KEY_HERE with your actual ePostcode API key from portal.epostcode.com
🐍

Custom AI Agent (Python)

Perfect for LangChain, custom agents, and AI applications

Integrate ePostcode into your Python-based AI agent using the requests library - works with LangChain, AutoGPT, and custom implementations.

import requests # Your ePostcode API key API_KEY = "your_api_key_here" MCP_ENDPOINT = "https://mcp.epostcode.com/" # Set up headers with bearer token headers = { "Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json" } # Search for addresses by postcode def search_postcode(postcode): response = requests.post( MCP_ENDPOINT, headers=headers, json={"postcode": postcode} ) return response.json() # Example usage addresses = search_postcode("SW1A 2AA") for i, address in enumerate(addresses["data"], start=1): print(f"{i}. {address['formatted_address']}")
💚

Node.js / JavaScript Agent

Ideal for chatbots, Discord bots, and web applications

Integrate into Node.js chatbots and AI agents using axios or fetch - compatible with Express, Discord.js, Telegram bots, and more.

const axios = require('axios'); // Your ePostcode API key const API_KEY = 'your_api_key_here'; const MCP_ENDPOINT = 'https://mcp.epostcode.com/'; // Search for addresses async function searchPostcode(postcode) { try { const response = await axios.post(MCP_ENDPOINT, { postcode }, { headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' } } ); return response.data; } catch (error) { console.error('Error fetching addresses:', error); throw error; } } // Example usage in chatbot async function handleAddressRequest(userPostcode) { const results = await searchPostcode(userPostcode); let message = 'Please select your address:\n'; results.data.forEach((address, index) => { message += `${index + 1}. ${address.formatted_address}\n`; }); return message; }
🤖

ChatGPT / OpenAI Assistants

Use as function/tool in OpenAI Assistants API

Add as a function/tool for ChatGPT plugins or OpenAI Assistants API - enables address lookup within AI conversations.

{ "name": "search_uk_address", "description": "Search for UK addresses by postcode or partial address", "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "UK postcode or address to search" } }, "required": ["query"] }, "endpoint": { "url": "https://mcp.epostcode.com/", "method": "POST", "headers": { "Authorization": "Bearer YOUR_API_KEY_HERE" } } }

Testing with cURL

Quick command-line testing and debugging

Test the MCP server directly from command line - perfect for quick testing and debugging your integration.

Request:
curl -X POST https://mcp.epostcode.com/ \ -H "Authorization: Bearer YOUR_API_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{"postcode": "SW1A 2AA"}'
Example Response:
{ "success": true, "data": [ { "id": "12345", "formatted_address": "10 Downing Street, Westminster, London, SW1A 2AA", "line1": "10 Downing Street", "line2": "Westminster", "city": "London", "postcode": "SW1A 2AA" } ] }

Ready to Integrate?

Get your API key and start building AI-powered address lookup in minutes

Get Free API Key Full Documentation

Perfect Use Cases

Customer Support Chatbots

Help customers find and verify their addresses during support conversations

E-commerce AI Assistants

Streamline checkout by letting AI agents handle address entry

Smart Forms

Build intelligent forms that auto-complete addresses via AI

Voice Assistants

Enable voice-based address lookup and validation

Booking Systems

Let AI agents collect delivery addresses during booking flows

KYC / Onboarding

Automate address verification in customer onboarding

Why Use ePostcode MCP Server?

Instant Setup

Just add your API key as a bearer token. No complex configuration, SDKs, or dependencies required.

🎯

30M+ Addresses

Access to the complete UK address database with Royal Mail PAF® certified data.

🔒

Enterprise Security

Industry-standard bearer token authentication with TLS encryption for all requests.

⚙️

Universal Compatibility

Works with any MCP-compatible AI: Claude, ChatGPT, custom agents, and more.

💨

Lightning Fast

Sub-50ms response times ensure smooth, natural conversation flows in your AI agents.

💰

Pay As You Go

From just 2.4p per lookup. No monthly fees, no commitments. Scale as you grow.

Ready to Add Address Lookup to Your AI Agent?

Get your API key and start integrating UK address lookup into your AI applications today. 50 free lookups included!

Get Started Free Contact Sales

Need help with integration? Our team is here to assist: support@epostcode.com