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/mcp

The 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

A key can be sent in three ways. Where the client allows it, use the header.

WayExampleUse it for
HeaderX-API-Key: YOUR_KEY or Authorization: Bearer YOUR_KEYClients with a headers setting
URL parameterhttps://mcp.mygeocode.com/mcp?key=YOUR_KEYClients 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

  1. Open Customize, then Connectors.
  2. Choose Add, then Add custom connector.
  3. Enter the name My Geocode and the URL https://mcp.mygeocode.com/mcp?key=YOUR_KEY, then continue.
  4. Leave authentication at its default and choose Add. Alternatively, leave the key out of the URL and enter X-API-Key with your key under Request headers.
  5. 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

ToolWhat it doesDocs page
forward_geocodeTurn an address or place name into coordinates, from free text or structured fields or a place_id.Forward geocoding
reverse_geocodeFind the nearest address for a latitude and longitude.Reverse geocoding
autocompleteSuggest completions for a partly typed address.Address autocomplete
ip_lookupLocate one IPv4 or IPv6 address, with ASN and proxy flags.IP lookup
timezoneIANA time zone, offset and local time for a point or a zone id.Timezone lookup
elevationElevation for a point, a list of points, a path or a grid.Elevation lookup
postcodePlace, region and coordinates for a postal code.Postal code lookup
forward_geocode_batchUp to 100 forward geocodes in one call.Forward geocoding
reverse_geocode_batchUp to 100 reverse geocodes in one call.Reverse geocoding
ip_lookup_batchUp to 100 IP addresses in one call.IP lookup
timezone_batchUp to 100 time zone lookups in one call.Timezone lookup
elevation_batchUp to 100 elevation points in one call.Elevation lookup
create_accountRegister 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_accountConfirm 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.