How to Use Baidu Map MCP Server: A Step-by-Step Guide
The Baidu Map MCP Server is a fully MCP-compliant, open-source location-based service (LBS) solution that empowers AI agents and applications with robust geospatial capabilities such as geocoding, POI search, route planning, traffic data, and more. This guide walks you through the process of setting it up and using it in your MCP ecosystem.
What You’ll Need
Before you begin, make sure you have the following:
- A Baidu Map Open Platform account
- A server-side API Key (AK)
- An MCP-compatible client such as Claude, Cursor, or your custom agent
- Node.js and npm installed locally (for Node integration)
Step 1: Get Your Baidu Maps API Key
- Visit the Baidu Map Open Platform and log in.
- Create a new application and enable the required APIs.
- Ensure that the “MCP (SSE)” service is enabled for optimal performance.
- Copy your API Key (AK) — you’ll need it for the server configuration.
Step 2: Configure Your MCP Server
To integrate Baidu Map MCP Server into your MCP client, use the following configuration:
{
"mcpServers": {
"baidu-map": {
"command": "npx",
"args": [
"-y",
"@baidumap/mcp-server-baidu-map"
],
"env": {
"BAIDU_MAP_API_KEY": "xxx"
}
}
}
}
Replace
"xxx"
with your actual Baidu API Key.
You can place this in your mcp.config.json
or equivalent configuration file depending on your platform (Claude, Qianfan, etc.).
Step 3: Install & Run the Server
In your terminal, simply run:
npx -y @baidumap/mcp-server-baidu-map
This will launch the MCP-compatible Baidu Map server and expose a set of standardized APIs for your agent to consume.
Supported Tools & APIs
Baidu Map MCP Server provides a rich set of tools, including:
Tool Name | Description |
---|---|
map_geocode | Convert address to geographic coordinates |
map_reverse_geocode | Get POI and address info from coordinates |
map_search_places | Search points of interest by keyword, region, etc. |
map_place_details | Fetch detailed POI information |
map_directions | Plan routes (driving, walking, cycling, transit) |
map_directions_matrix | Batch route planning |
map_weather | Real-time and forecast weather data |
map_ip_location | Locate position using an IP address |
map_road_traffic | Real-time traffic conditions |
map_poi_extract * | Extract POIs from free text (requires permission) |
Example Use Cases
Navigation & Travel Assistant
Plan trips with weather checks and POI suggestions:
map_search_places
+map_directions
+map_weather
Logistics Optimization
Batch compute delivery routes:
map_directions_matrix
LLM Integration
Enable geospatial reasoning in large language models:
- Claude or AppBuilder +
map_*
tools
Quick Recap
Task | Tool/API to Use |
---|---|
Convert address to coordinates | map_geocode |
Find a restaurant nearby | map_search_places |
Get a location’s weather | map_weather |
Plan delivery routes | map_directions_matrix |
Learn More
Visit the official Baidu Map MCP Server page on MCP Server Hub for documentation, FAQs, and advanced use cases.
If you're building a smart agent, delivery app, or LLM-powered assistant — Baidu Map MCP Server provides everything you need to add powerful, real-time geospatial intelligence into your project.