Reference
Data source: Zippopotam.us
MCP Protocol
Endpoint
https://context.gnist.ai/mcp/postal-codes/
claude_desktop_config.json
{
"mcpServers": {
"gnist-postal-codes": {
"url": "https://context.gnist.ai/mcp/postal-codes/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Shell
curl -X POST "https://context.gnist.ai/mcp/postal-codes/" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "lookup_postal_code", "arguments": {"country_code": "example", "postal_code": "example"}}}'
REST API
API Root
https://context.gnist.ai/rest/postal-codes/
4 endpoints available:
GET /rest/postal-codes/lookup_postal_codeGET /rest/postal-codes/search_by_placeGET /rest/postal-codes/list_supported_countriesGET /rest/postal-codes/report_feedback
Shell
curl "https://context.gnist.ai/rest/postal-codes/lookup_postal_code?country_code=example&postal_code=example" \ -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx
resp = httpx.get(
"https://context.gnist.ai/rest/postal-codes/lookup_postal_code",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
params={
"country_code": "example",
"postal_code": "example"
},
)
print(resp.json())
Command Line
Command
gc postal-codes
CLI documentation will be available when the GnistAI SDK is published.
Install
pip install gnistai
Available Tools (4)
lookup_postal_codeLook up location details for a postal/ZIP code — city, state, country, and coordinates.
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | required | ISO 3166-1 alpha-2 country code (e.g. 'US', 'NO', 'DE'). |
postal_code | string | required | Postal or ZIP code to look up (e.g. '90210', '0150'). |
search_by_placeFind postal codes for a city within a country and state.
| Parameter | Type | Required | Description |
|---|---|---|---|
country_code | string | required | ISO 3166-1 alpha-2 country code (e.g. 'US', 'DE'). |
state | string | required | State or province name (e.g. 'California', 'Bayern'). |
city | string | required | City or place name (e.g. 'Los Angeles', 'München'). |
list_supported_countriesList all countries supported for postal code lookup.
report_feedbackReport a bug, feature request, or general feedback for this data source.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |