Data as of

Baidu Map MCP Server for Claude Code: Setup & Config

Claude Code: Baidu Map MCP Server exposes location services to assistants and agents.

What you can do with Baidu Map in Claude Code

A single Baidu Maps bridge for routes, places, weather, traffic, and address conversion.

  • Build sightseeing suggestions using place search, routes, and weather.
  • Extract places from travel notes when advanced permissions are available.

Before you start: Baidu Map in Claude Code

  • Node.js and npx for this launch option
  • A Baidu Maps server-side API key
  • An MCP-compatible client

This is the README's Node.js configuration. Its Python alternative uses python -m mcp_server_baidu_maps and BAIDU_MAPS_API_KEY instead. SSE is recommended in the README, but no direct SSE server URL is provided in the supplied text. Advanced POI extraction requires extra permission.

Baidu Map Claude Code configuration

  1. Choose Claude Code configuration scope

    For Baidu Map MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add Baidu Map MCP Server to Claude Code

    Use the mcp-baidu-maps entry below in mcpServers. Keep Baidu Map MCP Server's documented stdio connection fields and your other Claude Code entries.

  3. Check Baidu Map MCP Server in Claude Code

    Baidu Map MCP Server: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

JSON
{
  "mcpServers": {
    "mcp-baidu-maps": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@baidumap/mcp-server-baidu-map"
      ],
      "env": {
        "BAIDU_MAP_API_KEY": "<Baidu Maps server-side API key>"
      }
    }
  }
}

CLI (POSIX shell)
claude mcp add-json --scope project 'mcp-baidu-maps' '{"type":"stdio","command":"npx","args":["-y","@baidumap/mcp-server-baidu-map"],"env":{"BAIDU_MAP_API_KEY":"<Baidu Maps server-side API key>"}}'

Baidu Map tools available to Claude Code

Baidu Map's stored tool list documents 11 tools; compare it with Claude Code's connected tool list, because the stored list is not a live check.

map_geocode

For Baidu Map's map_geocode, review the permission request and arguments in Claude Code before approval.

map_reverse_geocode

For Baidu Map's map_reverse_geocode, review the permission request and arguments in Claude Code before approval.

map_search_places

For Baidu Map's map_search_places, review the permission request and arguments in Claude Code before approval.

Find places through city, radius, or polygon-based searches.

map_place_details

For Baidu Map's map_place_details, review the permission request and arguments in Claude Code before approval.

Retrieve detailed information for a selected place.

map_distance_matrix

For Baidu Map's map_distance_matrix, review the permission request and arguments in Claude Code before approval.

Compare route distances and durations for multiple origins and destinations; named this way in the structured input.

map_directions

For Baidu Map's map_directions, review the permission request and arguments in Claude Code before approval.

map_weather

For Baidu Map's map_weather, review the permission request and arguments in Claude Code before approval.

Get current weather and a five-day forecast using a region code or coordinates.

map_ip_location

For Baidu Map's map_ip_location, review the permission request and arguments in Claude Code before approval.

map_road_traffic

For Baidu Map's map_road_traffic, review the permission request and arguments in Claude Code before approval.

map_poi_extract

For Baidu Map's map_poi_extract, review the permission request and arguments in Claude Code before approval.

Identify places in free text; advanced permission is required.

map_directions_matrix

For Baidu Map's map_directions_matrix, review the permission request and arguments in Claude Code before approval.

Batch route planning for driving, walking, or cycling; the matrix tool name shown in the README.

Baidu Map: full stored tool descriptions

Troubleshooting Baidu Map in Claude Code

  • If Baidu Map MCP Server fails to start, check npx @baidumap/mcp-server-baidu-map (Node.js/npm), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • Baidu Map MCP Server: check BAIDU_MAP_API_KEY; keep credentials out of shared .mcp.json.
  • Baidu Map MCP Server uses stdio here: Claude Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires a Baidu Maps server-side API key.
  • Known limitation: Text-to-place extraction needs advanced permission.
  • Known limitation: The input sources use different names for the route-matrix tool.
  • General Claude Code troubleshooting lives in the /clients/claude-code guide.

Baidu Map MCP Server — details. Claude Code guide

Frequently asked questions

Register Baidu Map MCP Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.

Claude Code's mcp-baidu-maps example uses stdio.

Baidu Map MCP Server's Claude Code configuration invokes npx @baidumap/mcp-server-baidu-map (Node.js/npm).

Claude Code's Baidu Map MCP Server example references BAIDU_MAP_API_KEY. Check these names if startup or authentication fails; the example alone does not distinguish required from optional values.

Baidu Map MCP Server's stored list contains 11 tools, including map_geocode, map_reverse_geocode, map_search_places. Compare those names with Claude Code's connected tool list; the stored list is not a live check.

Point-to-point routing covers driving, walking, cycling, and transit. The README lists driving, walking, and cycling for matrix routing.

No. The Python example uses BAIDU_MAPS_API_KEY, while the Node.js example uses BAIDU_MAP_API_KEY.