Home / MCP / Baidu Map MCP Server

Baidu Map MCP Server

Provides MCP-compliant geospatial APIs including geocoding, POI search, routing, weather, and traffic using Baidu Maps data.

typescript
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "baidu_maps": {
            "command": "python",
            "args": [
                "-m",
                "mcp_server_baidu_maps"
            ],
            "env": {
                "BAIDU_MAPS_API_KEY": "<YOUR_API_KEY>",
                "BAIDU_MAP_API_KEY": "YOUR_API_KEY"
            }
        }
    }
}

The Baidu Map MCP Server provides MCP-compliant geospatial APIs powered by Baidu Maps data. It enables you to connect client agents and LLMs to powerful location services such as geocoding, POI search, routing, weather, and traffic through standardized MCP interfaces for scalable, AI-driven location-aware applications.

How to use

You connect your MCP client or agent to the Baidu Map MCP Server to perform geospatial operations. Use the provided MCP endpoints to geocode addresses, look up POIs, plan routes, and fetch real-time weather and traffic data. Integrate the server with your LLM-based workflows to enable location-aware reasoning and decision making.

How to install

Prerequisites you need before installation: Python and Node.js (or npm) are installed on your system.

Python integration steps

pip install mcp-server-baidu-maps
```

```
python -m mcp_server_baidu_maps
```

Configure in your MCP client to point to the Python server, for example:
```
{
  "mcpServers": {
    "baidu-maps": {
      "command": "python",
      "args": ["-m", "mcp_server_baidu_maps"],
      "env": {
        "BAIDU_MAPS_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

How to install

Node.js/TypeScript integration steps

npm install @baidumap/mcp-server-baidu-map
```

```
{
  "mcpServers": {
    "baidu-map": {
      "command": "npx",
      "args": [
        "-y",
        "@baidumap/mcp-server-baidu-map"
      ],
      "env": {
        "BAIDU_MAP_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

How to use

Once configured, your MCP client can invoke APIs such as map_geocode, map_search_places, map_directions, map_weather, and map_road_traffic to build feature-rich location-aware experiences.

Notes

For best performance, enable the MCP SSE service in your provider and use SSE access for low-latency, streaming responses where supported.

Available tools

map_geocode

Convert a physical address into geographic coordinates using Baidu Maps geocoding.

map_reverse_geocode

Retrieve address and POI information from geographic coordinates.

map_search_places

Search for points of interest globally by keyword, type, region, or radius.

map_place_details

Fetch detailed information for a POI by its unique ID.

map_directions_matrix

Compute a batch of routes between multiple origins and destinations (driving, walking, cycling).

map_directions

Plan a route between two points for driving, walking, cycling, or transit.

map_weather

Query real-time weather or forecasts by region or coordinates.

map_ip_location

Locate city and coordinates from an IP address.

map_road_traffic

Get real-time traffic conditions for roads or regions.

map_poi_extract

Extract POI information from free text (advanced permissions required).