MCP Server
zipcodestack ships a hosted Model Context Protocol (MCP) server, so AI agents and assistants can call the API as native tools — no SDK or glue code required.
https://api.zipcodestack.com/mcp
The endpoint speaks the streamable HTTP transport. Listing the available tools works without authentication; executing a tool requires your API key, sent as the apikey header. You can get a free API key here.
Connect
Using Claude Code:
claude mcp add --transport http zipcodestack https://api.zipcodestack.com/mcp --header "apikey: YOUR_API_KEY"
Or add the server to any MCP-capable client (Claude Desktop, Cursor, VS Code, ...):
{
"mcpServers": {
"zipcodestack": {
"url": "https://api.zipcodestack.com/mcp",
"headers": { "apikey": "YOUR_API_KEY" }
}
}
}
Available tools
The tools are generated from the same OpenAPI specification that describes the REST API, so they always match the documented endpoints, parameters and responses.
| Tool | Endpoint | Description |
|---|---|---|
search | GET /v1/search | Look up postal codes |
distance | GET /v1/distance | Distance from one code to others |
radius | GET /v1/radius | Codes within a radius |
polygon | POST /v1/polygon | Codes inside a polygon |
match | GET /v1/match | Match code pairs within a distance |
codesByCity | GET /v1/code/city | Codes for a city |
codesByState | GET /v1/code/state | Codes for a state |
provinces | GET /v1/country/province | Provinces for a country |
coverage | GET /v1/coverage | Coverage by country |
getStatus | GET /v1/status | Account quota status |
Quotas and errors
Tool calls are metered exactly like REST requests: they consume your plan quota and return the same status codes and error responses (401, 422, 429, ...). If a call fails, the tool result contains the API's error message including hints on how to proceed.