Baidu Map MCP Server

by @baidu-maps

Baidu Map MCP Server

Baidu Map MCP Server exposes location services to assistants and agents. Its tools cover address lookup, place discovery, routes, weather, traffic, IP location, and permission-gated extraction of places from text.

Maps & Travel447pythonMIT

Server facts

Baidu Map MCP Server

GitHub stars

447

Last commit

Aug 22, 2025

Runtime

python

License

MIT

Tech

Runtime
pythonPython and TypeScript
Transports
stdio
Remote access
No

Activity

GitHub stars
447
Last commit
Data as of

Tags

  • Baidu Maps
  • Geocoding
  • Route Planning
  • Traffic
  • Weather

Overview

Baidu Map MCP Server connects assistants and agents to Baidu Maps location services through MCP. It supports converting addresses to coordinates and translating coordinates into address, regional, and point-of-interest information. Place-search tools help find locations by keyword or area, while a detail lookup retrieves information for a particular place identifier. Route planning covers driving, walking, cycling, and transit between two points. Matrix-style requests support comparing travel distances and durations across multiple origins and destinations, making the service relevant to travel assistants and delivery-planning workflows.

The toolset also includes current weather and forecasts, IP-based location lookup, and road-traffic information. An advanced text-extraction capability identifies points of interest within free-form input, but it requires additional permission. Before use, developers must register a server-side API key with the Baidu Maps platform. The README provides Python and Node.js/TypeScript integration paths and recommends SSE access separately. The local Python configuration uses a plural MAPS environment-variable name, whereas the Node.js example uses singular MAP; the selected launch configuration must match that distinction. The supplied structured tool inventory names the matrix operation map_distance_matrix, while the README calls it map_directions_matrix. Both names are represented below according to their respective sources rather than treated as a guaranteed interchangeable alias. The project states an MIT license.

Install & configure

Requirements

  • Node.js and npx for this launch option
  • A Baidu Maps server-side API key
  • An MCP-compatible client
Documented launch / install command
npx -y @baidumap/mcp-server-baidu-map

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.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "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>"
      }
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

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

Read the Windsurf setup guide

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

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "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>"
      }
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository tool metadata and repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
map_geocodeResolve an address into geographic coordinates.
map_reverse_geocodeLook up address and place context for geographic coordinates.
map_search_placesFind places through city, radius, or polygon-based searches.
map_place_detailsRetrieve detailed information for a selected place.
map_distance_matrixCompare route distances and durations for multiple origins and destinations; named this way in the structured input.
map_directionsPlan travel between two points and return route options, distance, and duration.
map_weatherGet current weather and a five-day forecast using a region code or coordinates.
map_ip_locationLook up geographic location from an IP address.
map_road_trafficInspect current road congestion, affected segments, distances, and trends.
map_poi_extractIdentify places in free text; advanced permission is required.
map_directions_matrixBatch route planning for driving, walking, or cycling; the matrix tool name shown in the README.

Use cases

  • Build sightseeing suggestions using place search, routes, and weather.
  • Compare travel distances and durations for several origin-destination pairs.
  • Add current traffic conditions to navigation recommendations.
  • Extract places from travel notes when advanced permissions are available.

Strengths

  • Combines mapping, weather, and traffic capabilities.
  • Documents Python and TypeScript integration options.
  • Supports multiple travel modes and batch route comparisons.

Limitations

  • Requires a Baidu Maps server-side API key.
  • Text-to-place extraction needs advanced permission.
  • The input sources use different names for the route-matrix tool.

Baidu Map MCP Server setup notes

  • Check BAIDU_MAP_API_KEY in the Baidu Map MCP Server configuration if startup or authentication fails.
  • Baidu Map MCP Server's stdio example needs a client that launches local processes.

Frequently asked questions

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

Related MCP servers