Add UK address lookup capabilities to your AI agents, LLMs, and chatbots using the Model Context Protocol (MCP)
Simple bearer token authentication with your ePostcode API key
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.
Just add your API key as a bearer token - no complex setup required
Industry-standard bearer token authentication keeps your API key safe
Works with Claude, ChatGPT, custom agents, and any MCP-compatible AI
Access to 30M+ UK addresses with instant, accurate results
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!
Choose your platform and get started in minutes with our ready-to-use code examples
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.
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"epostcode": {
"url": "https://mcp.epostcode.com/",
"headers": {
"Authorization": "Bearer YOUR_API_KEY_HERE"
}
}
}
}
YOUR_API_KEY_HERE with your actual ePostcode API key from portal.epostcode.com
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']}")
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;
}
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"
}
}
}
Quick command-line testing and debugging
Test the MCP server directly from command line - perfect for quick testing and debugging your integration.
curl -X POST https://mcp.epostcode.com/ \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"postcode": "SW1A 2AA"}'
{
"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"
}
]
}
Get your API key and start building AI-powered address lookup in minutes
Help customers find and verify their addresses during support conversations
Streamline checkout by letting AI agents handle address entry
Build intelligent forms that auto-complete addresses via AI
Enable voice-based address lookup and validation
Let AI agents collect delivery addresses during booking flows
Automate address verification in customer onboarding
Just add your API key as a bearer token. No complex configuration, SDKs, or dependencies required.
Access to the complete UK address database with Royal Mail PAF® certified data.
Industry-standard bearer token authentication with TLS encryption for all requests.
Works with any MCP-compatible AI: Claude, ChatGPT, custom agents, and more.
Sub-50ms response times ensure smooth, natural conversation flows in your AI agents.
From just 2.4p per lookup. No monthly fees, no commitments. Scale as you grow.
Get your API key and start integrating UK address lookup into your AI applications today. 50 free lookups included!
Need help with integration? Our team is here to assist: support@epostcode.com