Baidu Maps logo

Baidu Maps

Organization
baidu-maps

Baidu Map MCP Server

Publisherbaidu-maps
Repositorymcp
LanguagePython
Forks
47
Stars
444
Available tools
10
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Baidu Maps exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 10 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    444 stars and 47 forks from the linked repository.

中文| English

stars python MIT License pypi npm

🚀 Introduction

Baidu Map MCP Server is a fully MCP-compliant, open-source Location-Based Service (LBS) solution, providing a comprehensive suite of geospatial APIs and tools for developers and AI agents. As the first map service provider in China to support the Model Context Protocol (MCP), Baidu Map MCP Server bridges the gap between large language models (LLMs), AI agents, and real-world location data and services.

With Baidu Map MCP Server, you can easily empower your applications, LLMs, and agents with advanced mapping, geocoding, POI search, route planning, weather, traffic, and more — all via standardized, developer-friendly MCP interfaces.

Key Features:

  • Full MCP Protocol Support: Seamless integration with any MCP-compliant agent, LLM, or platform.
  • Rich LBS Capabilities: Geocoding, reverse geocoding, POI search, route planning (driving, walking, cycling, transit), weather, IP location, real-time traffic, and more.
  • Cross-Platform SDKs: Official Python and TypeScript SDKs, easy CLI and cloud deployment.
  • Enterprise-Grade Data: Powered by Baidu Maps' authoritative, up-to-date geospatial data.
  • High Performance & Stability: Recommended SSE (Server-Sent Events) access for low latency and high reliability.
  • Open Source & Extensible: MIT licensed, easy to customize and extend.

Whether you are building a travel assistant, logistics platform, smart city solution, or an LLM-powered agent, Baidu Map MCP Server provides the essential geospatial intelligence and tools you need.

The MCP Server architecture enables:

  • Seamless AI Integration: Allows LLMs and agents to understand and process location data naturally
  • Contextual Understanding: Provides rich geospatial context for more intelligent decision-making
  • Standardized Interfaces: Consistent API design following MCP principles for easy integration
  • Scalable Implementation: Suitable for projects of any size, from small applications to enterprise solutions

Whether you're building a navigation app, delivery service, smart city solution, or enhancing an AI agent with location awareness, Baidu Map MCP Server provides the tools and infrastructure you need to succeed.

🛠️ Supported Tools & APIs

Baidu Map MCP Server provides the following MCP-compliant APIs (tools):

Tool NameDescription
map_geocodeConvert address to geographic coordinates.
map_reverse_geocodeGet address, region, and POI info from coordinates.
map_search_placesSearch for global POIs by keyword, type, region, or within a radius.
map_place_detailsGet detailed info for a POI by its unique ID.
map_directions_matrixBatch route planning for multiple origins/destinations (driving, walking, cycling).
map_directionsPlan routes between two points (driving, walking, cycling, transit).
map_weatherQuery real-time and forecast weather by region or coordinates.
map_ip_locationLocate city and coordinates by IP address.
map_road_trafficQuery real-time traffic conditions for roads or regions.
map_poi_extract*Extract POI info from free text (requires advanced permission).

*Some advanced features require additional permissions. See Authorization for details.

All APIs follow the MCP protocol and can be called from any MCP-compliant client, LLM, or agent platform.

⚡ Quick Start

1. Get Your API Key

Register and create a server-side API Key (AK) at Baidu Maps Open Platform. Be sure to enable “MCP (SSE)” service for best performance.

2. Python Integration

Install the SDK:

bash
pip install mcp-server-baidu-maps

Run as a script:

bash
python -m mcp_server_baidu_maps

Configure in your MCP client (e.g., Claude, Cursor):

json
{
  "mcpServers": {
    "baidu-maps": {
      "command": "python",
      "args": ["-m", "mcp_server_baidu_maps"],
      "env": {
        "BAIDU_MAPS_API_KEY": "<YOUR_API_KEY>"
      }
    }
  }
}

3. Node.js/TypeScript Integration

Install:

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

Configure in your MCP client:

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

4. Recommended: Use SSE for low-latency, stable access

See SSE Quickstart.

5. More Platforms

  • Claude/Agent/千帆AppBuilder: See README_zh.md for detailed integration guides and advanced configuration.

🚀 Advanced Use Cases

  • Travel Planning Assistant:
    Use map_search_places, map_directions, and map_weather to build an agent that plans optimal sightseeing routes, checks weather, and recommends POIs.

  • Batch Route Matrix:
    Use map_directions_matrix to calculate multiple routes and durations for logistics or delivery optimization.

  • Text-to-POI Extraction:
    Use map_poi_extract to extract POIs from user input or travel notes (requires advanced permission).

  • Real-time Traffic & Weather-aware Navigation:
    Combine map_road_traffic and map_weather for dynamic, context-aware travel suggestions.

  • Integration with Claude, Qianfan, AppBuilder:
    Seamlessly connect Baidu Map MCP Server to LLMs and agent frameworks for natural language geospatial reasoning.

See README_zh.md for more detailed Chinese documentation, configuration, and examples.


⛰️ Advanced Tutorials

👩‍👩‍👧‍👦 Contributors

🌟 Star History

Star History Chart

📄 License

MIT © baidu-maps

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • map_geocode

    地理编码服务: 将地址解析为对应的位置坐标.地址结构越完整, 地址内容越准确, 解析的坐标精度越高.

  • map_reverse_geocode

    逆地理编码服务: 根据纬经度坐标, 获取对应位置的地址描述, 所在行政区划, 道路以及相关POI等信息

  • map_search_places

    地点检索服务: 支持检索全球各城市内的地点信息(最小到city级别), 也可支持圆形区域内的周边地点信息检索. 城市内检索: 检索某一城市内(目前最细到城市级别)的地点信息. 周边检索: 设置圆心和半径, 检索圆形区域内的地点信息(常用于周边检索场景).

  • map_place_details

    地点详情检索服务: 地点详情检索针对指定POI, 检索其相关的详情信息. 通过地点检索服务获取POI uid.使用地点详情检索功能, 传入uid, 即可检索POI详情信息, 如评分、营业时间等(不同类型POI对应不同类别详情数据).

  • map_directions_matrix

    批量算路服务: 根据起点和终点坐标计算路线规划距离和行驶时间. 批量算路目前支持驾车、骑行、步行. 步行时任意起终点之间的距离不得超过200KM, 超过此限制会返回参数错误. 驾车批量算路一次最多计算100条路线, 起终点个数之积不能超过100.

  • map_directions

    路线规划服务: 根据起终点位置名称或纬经度坐标规划出行路线. 驾车路线规划: 根据起终点位置名称或纬经度坐标规划驾车出行路线. 骑行路线规划: 根据起终点位置名称或纬经度坐标规划骑行出行路线. 步行路线规划: 根据起终点位置名称或纬经度坐标规划步行出行路线. 公交路线规划: 根据起终点位置名称或纬经度坐标规划公共交通出行路线.

  • map_weather

    天气查询服务: 通过行政区划或是经纬度坐标查询实时天气信息及未来5天天气预报.

  • map_ip_location

    IP定位服务: 通过所给IP获取具体位置信息和城市名称, 可用于定位IP或用户当前位置.

  • map_road_traffic

    实时路况查询服务: 查询实时交通拥堵情况, 可通过指定道路名和区域形状(矩形, 多边形, 圆形)进行实时路况查询. 道路实时路况查询: 查询具体道路的实时拥堵评价和拥堵路段、拥堵距离、拥堵趋势等信息. 矩形区域实时路况查询: 查询指定矩形地理范围的实时拥堵情况和各拥堵路段信息. 多边形区域实时路况查询: 查询指定多边形地理范围的实时拥堵情况和各拥堵路段信息. 圆形区域(周边)实时路况查询: 查询某中心点周边半径范围内的实时拥堵情况和各拥堵路段信息.

  • map_poi_extract

    POI智能提取

Use Baidu Maps MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Baidu Maps is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Baidu Maps as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Baidu Maps MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "baidu-maps": {
      "command": "npx",
      "args": [
        "-y",
        "@baidumap/mcp-server-baidu-map"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Baidu Maps MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Baidu Maps MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Baidu Maps to help me with this task?
Baidu Maps
Sure. I read it.
Here is what I found using Baidu Maps.

Frequently asked questions

What is the Baidu Maps MCP server used for?

Baidu Maps is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Baidu Maps MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Baidu Maps with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Baidu Maps MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Baidu Maps connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Baidu Maps MCP to TypingMind?

Baidu Maps runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Baidu Maps MCP provide in TypingMind?

Baidu Maps exposes 10 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Baidu Maps MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Baidu Maps requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇