Geoapify MCP Server
The Geoapify MCP Server lets MCP-compatible clients access Geoapify location tools through a JSON-RPC endpoint. Use it to connect AI agents and developer tools to Geoapify geocoding operations without building a custom API integration layer.
Geoapify MCP is available through the following HTTP endpoint:
https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY
The endpoint accepts JSON-RPC requests. For example, use tools/list to discover the available tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}
Quick start
The Geoapify MCP endpoint requires a Geoapify API key. You can use the same API key that you use for Geoapify Geocoding API requests.
How to get a Geoapify API key
- Register or sign in on the Geoapify MyProjects page.
- Create a project.
- Open the API Keys section.
- Copy an existing API key or generate a new one.
- Optionally protect the API key with allowed IP addresses, HTTP referrers, origins, and CORS settings.
MCP endpoint
Use the MCP endpoint with your API key:
https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY
Replace YOUR_API_KEY with your Geoapify API key before sending requests.
Authorization methods
The Geoapify MCP endpoint accepts a Geoapify API key in three ways:
| Method | Where to send the API key | Example |
|---|---|---|
| Query parameter | apiKey URL query parameter |
https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY |
| API key header | x-api-key HTTP header |
x-api-key: YOUR_API_KEY |
| Authorization header | Authorization HTTP header |
Authorization: ApiKey YOUR_API_KEY |
Query parameter example
curl -X POST "https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
API key header example
curl -X POST "https://api.geoapify.com/v1/mcp" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
Authorization header example
curl -X POST "https://api.geoapify.com/v1/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
Swagger usage
The OpenAPI specification uses the apiKey query parameter. In Swagger UI, enter your Geoapify API key in the apiKey parameter field before executing the POST /mcp request.
Configuration
Geoapify MCP works through an HTTP JSON-RPC endpoint. Configure your MCP-compatible client to send JSON-RPC requests to the Geoapify MCP URL:
https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY
Request format
Send JSON-RPC requests with POST and the application/json content type.
curl -X POST "https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
List available tools
Use the tools/list method to get the tools supported by the Geoapify MCP endpoint:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}
The response contains the available tool names, descriptions, and input schemas. Use those schemas when calling a tool with tools/call.
Call a tool
Use tools/call with a tool name and an arguments object:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "geocode_address",
"arguments": {
"query": "1600 Pennsylvania Ave NW, Washington, DC"
}
}
}
Check the result of tools/list for the exact tool names and arguments supported by your endpoint.
MCP tools
The Geoapify MCP endpoint exposes Geoapify location services as MCP tools. Call tools/list to get the current list of available tools and their input schemas.
Request URL
https://api.geoapify.com/v1/mcp?apiKey=YOUR_API_KEY
List tools request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}
Available tools
| Tool | Category | Required arguments | Description |
|---|---|---|---|
geocode_address |
Geocoding | query |
Converts a street address or free-text location query into coordinates and structured address data. |
geocode_structured_address |
Geocoding | None | Geocodes structured address fields into coordinates and normalized address data. |
reverse_geocode_coordinates |
Geocoding | lat, lon |
Converts latitude and longitude coordinates into nearby address or place data. |
Common arguments
The geocoding tools share several optional arguments:
| Argument | Type | Description |
|---|---|---|
limit |
integer | Maximum number of results to return. Supported range: 1 to 10. |
lang |
string | Result language as a supported two-letter language code. Default: en. |
country_codes |
array of strings | Optional ISO 3166-1 alpha-2 country code filters. The array can contain up to 10 country codes. |
Each tool schema sets additionalProperties to false, so requests should include only the arguments listed by tools/list.
Calling a tool
Call tools with the tools/call method. The name value must match a tool name from tools/list, and arguments must match that tool's input schema.
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "geocode_address",
"arguments": {
"query": "1600 Pennsylvania Ave NW, Washington, DC",
"limit": 1,
"lang": "en"
}
}
}
Response format
MCP responses use JSON-RPC. A successful response contains a result object. An error response contains an error object with a code and message.
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params"
}
}
Pricing
Geoapify uses credits to calculate API usage. MCP requests are priced according to the action they perform:
| MCP request | Cost in credits |
|---|---|
initialize |
0 credits |
tools/list |
0 credits |
notifications/* |
0 credits |
tools/call |
Priced as the underlying Geoapify API call |
The current MCP tools call Geoapify geocoding services. Geocoding is feature-based:
credits = max(1, ceil(returned_features / 20))
That means a geocoding MCP tool call costs at least 1 credit.
| MCP tool | Underlying pricing rule | Example |
|---|---|---|
geocode_address |
Feature-based geocoding pricing | 1 call costs 1 credit |
geocode_structured_address |
Feature-based geocoding pricing | 1 call cost 1 credit |
reverse_geocode_coordinates |
Feature-based reverse geocoding pricing | 1 call cost 1 credit |
If the tool returns more than 20 features, the cost increases by 1 credit for each additional group of up to 20 returned features.
Check Geoapify Pricing Plans and choose the plan that fits your expected daily credit usage.