- Home
- MCP servers
- AMap Map
AMap Map
- javascript
2
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run an MCP server for the AMap Map API that lets MCP protocol clients access AMap services such as geocoding, weather, and routing. This guide shows how to configure the server, start a streamable HTTP endpoint, and connect MCP clients to use the API key securely.
How to use
Connect an MCP client to the AMap Map MCP Server using the HTTP endpoint or the streamable HTTP service. Provide your AMap Maps API key in the server configuration to enable authentication with AMap services. If you enable the HTTP API, you can enforce an optional access token for extra security.
How to install
Prerequisites you need on your machine: a recent version of Node.js and npm or npx available in your shell.
Create a configuration file for the MCP server. Use the following JSON as a starting point and replace YOUR_AMAP_MAPS_API_KEY with the key you obtain from the AMap developer portal.
{
"mcpServers": {
"amap-maps": {
"command": "npx",
"args": ["-y", "@masx200/amap-maps-mcp-server"],
"env": {
"AMAP_MAPS_API_KEY": "YOUR_AMAP_MAPS_API_KEY"
}
}
}
}
Additional configuration and running the Streamable-HTTP server
You can also run a standalone streamable HTTP protocol server in addition to the MCP server. Set environment variables as needed, then start the server.
# Direct start
node ./build/streamable-http.js
# With environment variables (examples)
export HTTP_API_PORT=3000
export HTTP_API_TOKEN=your-secret-token
export AMAP_MAPS_API_KEY=your-amap-api-key
node ./build/streamable-http.js
What you’ll run and where it runs
When started, the HTTP streamable server runs at http://localhost:3000. It supports the MCP endpoint at POST /mcp and can provide real-time data streams via the streamable-http protocol. If you set an access token, include it in requests as an Authorization header.
Notes on API key and security
Keep your AMap Maps API key secure. If you enable the HTTP API token, only clients that present the correct token can access the MCP endpoints.