MCP server for AI agents
The My Geocode MCP server lets Claude, ChatGPT, Cursor, VS Code and any other MCP client use the My Geocode API as tools. An agent can geocode an address, look up an IP address, find a time zone or read an elevation, with the same data, limits and prices as the API.
What it is
MCP is the Model Context Protocol, an open standard that lets an AI assistant call tools on a remote server. The My Geocode server offers 14 tools: forward and reverse geocoding, autocomplete, IP, time zone, elevation and postal code lookups, the batch forms, and two tools that let an agent register an account for its user. Each tool answers with the same JSON as the matching API endpoint.
Server URL
https://mcp.mygeocode.com/mcpThe server speaks Streamable HTTP. Every request is a POST and every answer is plain JSON. It keeps no session, so a client can connect again at any time.
Keys
- From your own computer (Claude Code, Cursor, VS Code, a local client), no key is needed. You get the same 2,500 free requests a day per network as the API.
- Through a hosted connector (claude.ai, ChatGPT), a key is needed. Those calls come from networks shared by every user of that provider, so a free allowance per network would not be fair to anyone. Without a key, a tool answers with the error
key_requiredand says how to get one. - Get a key for free at www.mygeocode.com/signup. Or ask the agent to do it: the
create_accounttool registers your email address and sends you a confirmation email with a 6 digit code. Give the code to the agent, andconfirm_accountreturns your first key. If the email does not arrive, the agent can callcreate_accountagain and the same code is sent again. The new account has no password yet; to sign in to the dashboard, use the forgot password link.
A key can be sent in three ways. Where the client allows it, use the header.
| Way | Example | Use it for |
|---|---|---|
| Header | X-API-Key: YOUR_KEY or Authorization: Bearer YOUR_KEY | Clients with a headers setting |
| URL parameter | https://mcp.mygeocode.com/mcp?key=YOUR_KEY | Clients that take only a URL |
Connecting a client
Replace YOUR_KEY with your key. Leave the key out if you work from your own computer and the free allowance is enough.
Claude Code
claude mcp add --transport http mygeocode https://mcp.mygeocode.com/mcp --header "X-API-Key: YOUR_KEY"Add --scope user to make the server available in all your projects. Inside Claude Code, run /mcp to check the connection. Without a key, leave out the --header part.
Claude Desktop and claude.ai
- Open Customize, then Connectors.
- Choose Add, then Add custom connector.
- Enter the name
My Geocodeand the URLhttps://mcp.mygeocode.com/mcp?key=YOUR_KEY, then continue. - Leave authentication at its default and choose Add. Alternatively, leave the key out of the URL and enter
X-API-Keywith your key under Request headers. - In a chat, open the + menu, choose Connectors and switch the connector on.
Claude Desktop uses the connectors of your Claude account, so the same steps apply. The menu names can change between versions, and on Team and Enterprise plans an owner adds the connector under organization settings first.
ChatGPT
ChatGPT can use a custom MCP server on the web, on plans that allow custom connectors, and workspace admins can restrict it. Open the plugin or app settings, add a custom MCP server, enter https://mcp.mygeocode.com/mcp?key=YOUR_KEY as its URL, choose no authentication, and accept the risk warning. Menu names change often, so follow OpenAI's current help article on custom MCP connectors. On some plans ChatGPT limits custom servers to read only tools; all lookup tools here are read only.
Cursor
Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for all projects:
{
"mcpServers": {
"mygeocode": {
"url": "https://mcp.mygeocode.com/mcp",
"headers": {
"X-API-Key": "YOUR_KEY"
}
}
}
}VS Code
Add this to .vscode/mcp.json in your workspace, or to the mcp.json of your user profile. VS Code asks for the key the first time the server starts and stores it, so it never sits in the file.
{
"inputs": [
{ "type": "promptString", "id": "mygeocode-key", "description": "My Geocode API key", "password": true }
],
"servers": {
"mygeocode": {
"type": "http",
"url": "https://mcp.mygeocode.com/mcp",
"headers": { "X-API-Key": "${input:mygeocode-key}" }
}
}
}Other clients
Any client that supports remote MCP servers over Streamable HTTP works. Give it the server URL, and the key as a header or in the URL.
Tools
| Tool | What it does | Docs page |
|---|---|---|
forward_geocode | Turn an address or place name into coordinates, from free text or structured fields or a place_id. | Forward geocoding |
reverse_geocode | Find the nearest address for a latitude and longitude. | Reverse geocoding |
autocomplete | Suggest completions for a partly typed address. | Address autocomplete |
ip_lookup | Locate one IPv4 or IPv6 address, with ASN and proxy flags. | IP lookup |
timezone | IANA time zone, offset and local time for a point or a zone id. | Timezone lookup |
elevation | Elevation for a point, a list of points, a path or a grid. | Elevation lookup |
postcode | Place, region and coordinates for a postal code. | Postal code lookup |
forward_geocode_batch | Up to 100 forward geocodes in one call. | Forward geocoding |
reverse_geocode_batch | Up to 100 reverse geocodes in one call. | Reverse geocoding |
ip_lookup_batch | Up to 100 IP addresses in one call. | IP lookup |
timezone_batch | Up to 100 time zone lookups in one call. | Timezone lookup |
elevation_batch | Up to 100 elevation points in one call. | Elevation lookup |
create_account | Register an account for the user with an email address. The user must accept the terms first, and a confirmation email with a 6 digit code is sent. | Authentication |
confirm_account | Confirm the email with the code and receive the first API key, shown once. | Authentication |
The lookup tools take the same parameters as the endpoints, and their results are the endpoint's JSON. They are marked read only, so a client can allow them without asking each time. create_account and confirm_account are not read only and are refused when the request already carries a key.
Charging
Charging is exactly the API's. A tool call counts as one request per lookup, and each entry of a batch counts as one. The same free allowance applies, and keys with prepaid credit or an Unlimited package work as they do on the API. A call that is refused or fails costs nothing. See rate limits and quotas. Each result also reports your remaining quota.
Errors
When a call cannot be served, the tool answers with an error result instead of a protocol error, so the model can read the message and act on it. The result holds the API's own error code and message, for example invalid_key, no_credits or quota_exceeded, plus key_required for hosted connectors without a key. All codes are listed on the errors page.
Privacy
A key in the URL is visible to the provider of the connector and in its settings, and it can appear in logs on the way. Use the header where the client supports it. If a key leaks, create a new one in the dashboard and remove the old one. Questions: support@mygeocode.com.