Skip to content
Back to search

mcp

Baidu Map MCP Server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/baidu-maps--mcp/badge.svg)](/listings/baidu-maps--mcp)

HTML

<a href="/listings/baidu-maps--mcp"><img src="/api/listings/baidu-maps--mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Get Your API Key

Register and create a server-side API Key (AK) at [Baidu Maps Open Platform](https://lbsyun.baidu.com/apiconsole/key). **Be sure to enable “MCP (SSE)” service for best performance.**

2. Python Integration

Install the SDK:

pip install mcp-server-baidu-maps

**Run as a script:**

python -m mcp_server_baidu_maps

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

{
  "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:

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

**Configure in your MCP client:**

{
  "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](https://lbsyun.baidu.com/faq/api?title=mcpserver/quickstart).

5. More Platforms

- **Claude/Agent/千帆AppBuilder**: See [README_zh.md](./README_zh.md) for detailed integration guides and advanced configuration.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 177 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. <p>
  3. <img align="center" src="img/logo.png", width=700></a>
  4. </p>
  5. <!-- language -->
  6. [中文](./README_zh.md)| English
  7. <!-- icon -->
  8. <br>
  9. [![stars](https://img.shields.io/github/stars/baidu-maps/mcp?color=ccf)](https://github.com/baidu-maps/mcp)
  10. ![python](https://img.shields.io/badge/python-3.10~3.12-aff.svg)
  11. [![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
  12. [![pypi](https://img.shields.io/pypi/v/mcp-server-baidu-maps)](https://pypi.org/project/mcp-server-baidu-maps/)
  13. [![npm](https://img.shields.io/npm/v/@baidumap/mcp-server-baidu-map)](https://www.npmjs.com/package/@baidumap/mcp-server-baidu-map)
  14. </div>
  15. <br>
  16. ## 🚀 Introduction
  17. **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)](https://modelcontextprotocol.io/introduction), Baidu Map MCP Server bridges the gap between large language models (LLMs), AI agents, and real-world location data and services.
  18. 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.
  19. **Key Features:**
  20. - **Full MCP Protocol Support:** Seamless integration with any MCP-compliant agent, LLM, or platform.
  21. - **Rich LBS Capabilities:** Geocoding, reverse geocoding, POI search, route planning (driving, walking, cycling, transit), weather, IP location, real-time traffic, and more.
  22. - **Cross-Platform SDKs:** Official Python and TypeScript SDKs, easy CLI and cloud deployment.
  23. - **Enterprise-Grade Data:** Powered by Baidu Maps' authoritative, up-to-date geospatial data.
  24. - **High Performance & Stability:** Recommended SSE (Server-Sent Events) access for low latency and high reliability.
  25. - **Open Source & Extensible:** MIT licensed, easy to customize and extend.
  26. 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.
  27. The MCP Server architecture enables:
  28. - **Seamless AI Integration**: Allows LLMs and agents to understand and process location data naturally
  29. - **Contextual Understanding**: Provides rich geospatial context for more intelligent decision-making
  30. - **Standardized Interfaces**: Consistent API design following MCP principles for easy integration
  31. - **Scalable Implementation**: Suitable for projects of any size, from small applications to enterprise solutions
  32. 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.
  33. ## 🛠️ Supported Tools & APIs
  34. Baidu Map MCP Server provides the following MCP-compliant APIs (tools):
  35. | Tool Name | Description |
  36. |--------------------------|----------------------------------------------------------------------------------------------|
  37. | `map_geocode` | Convert address to geographic coordinates. |
  38. | `map_reverse_geocode` | Get address, region, and POI info from coordinates. |
  39. | `map_search_places` | Search for global POIs by keyword, type, region, or within a radius. |
  40. | `map_place_details` | Get detailed info for a POI by its unique ID. |
  41. | `map_directions_matrix` | Batch route planning for multiple origins/destinations (driving, walking, cycling). |
  42. | `map_directions` | Plan routes between two points (driving, walking, cycling, transit). |
  43. | `map_weather` | Query real-time and forecast weather by region or coordinates. |
  44. | `map_ip_location` | Locate city and coordinates by IP address. |
  45. | `map_road_traffic` | Query real-time traffic conditions for roads or regions. |
  46. | `map_poi_extract`* | Extract POI info from free text (requires advanced permission). |
  47. > *Some advanced features require additional permissions. See [Authorization](#authorization) for details.
  48. All APIs follow the MCP protocol and can be called from any MCP-compliant client, LLM, or agent platform.
  49. ## ⚡ Quick Start
  50. ### 1. Get Your API Key
  51. Register and create a server-side API Key (AK) at [Baidu Maps Open Platform](https://lbsyun.baidu.com/apiconsole/key).
  52. **Be sure to enable “MCP (SSE)” service for best performance.**
  53. ### 2. Python Integration
  54. Install the SDK:
  55. ```bash
  56. pip install mcp-server-baidu-maps
  57. ```
  58. **Run as a script:**
  59. ```bash
  60. python -m mcp_server_baidu_maps
  61. ```
  62. **Configure in your MCP client (e.g., Claude, Cursor):**
  63. ```json
  64. {
  65. "mcpServers": {
  66. "baidu-maps": {
  67. "command": "python",
  68. "args": ["-m", "mcp_server_baidu_maps"],
  69. "env": {
  70. "BAIDU_MAPS_API_KEY": "<YOUR_API_KEY>"
  71. }
  72. }
  73. }
  74. }
  75. ```
  76. ### 3. Node.js/TypeScript Integration
  77. Install:
  78. ```bash
  79. npm install @baidumap/mcp-server-baidu-map
  80. ```
  81. **Configure in your MCP client:**
  82. ```json
  83. {
  84. "mcpServers": {
  85. "baidu-map": {
  86. "command": "npx",
  87. "args": [
  88. "-y",
  89. "@baidumap/mcp-server-baidu-map"
  90. ],
  91. "env": {
  92. "BAIDU_MAP_API_KEY": "<YOUR_API_KEY>"
  93. }
  94. }
  95. }
  96. }
  97. ```
  98. ### 4. Recommended: Use SSE for low-latency, stable access
  99. See [SSE Quickstart](https://lbsyun.baidu.com/faq/api?title=mcpserver/quickstart).
  100. ### 5. More Platforms
  101. - **Claude/Agent/千帆AppBuilder**: See [README_zh.md](./README_zh.md) for detailed integration guides and advanced configuration.
  102. ---
  103. ## 🚀 Advanced Use Cases
  104. - **Travel Planning Assistant:**
  105. Use `map_search_places`, `map_directions`, and `map_weather` to build an agent that plans optimal sightseeing routes, checks weather, and recommends POIs.
  106. - **Batch Route Matrix:**
  107. Use `map_directions_matrix` to calculate multiple routes and durations for logistics or delivery optimization.
  108. - **Text-to-POI Extraction:**
  109. Use `map_poi_extract` to extract POIs from user input or travel notes (requires advanced permission).
  110. - **Real-time Traffic & Weather-aware Navigation:**
  111. Combine `map_road_traffic` and `map_weather` for dynamic, context-aware travel suggestions.
  112. - **Integration with Claude, Qianfan, AppBuilder:**
  113. Seamlessly connect Baidu Map MCP Server to LLMs and agent frameworks for natural language geospatial reasoning.
  114. **See [README_zh.md](./README_zh.md) for more detailed Chinese documentation, configuration, and examples.**
  115. ---
  116. ## ⛰️ Advanced Tutorials
  117. - [Geocoding API Guide](https://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-geocoding)
  118. - [POI Search API Guide](https://lbsyun.baidu.com/index.php?title=webapi/guide/webservice-placeapi)
  119. - [Route Planning API Guide](https://lbsyun.baidu.com/index.php?title=webapi/direction-api)
  120. - [MCP Integration Guide](https://lbsyun.baidu.com/index.php?title=mcp/guide)
  121. - [SDK Development Guide](https://lbsyun.baidu.com/index.php?title=mcp/sdk)
  122. ## 👩‍👩‍👧‍👦 Contributors
  123. <a href="https://github.com/baidu-maps/mcp/graphs/contributors">
  124. <img src="https://contrib.rocks/image?repo=baidu-maps/mcp&max=400&columns=20" width="200"/>
  125. </a>
  126. ## 🌟 Star History
  127. [![Star History Chart](https://api.star-history.com/svg?repos=baidu-maps/mcp&type=Date)](https://star-history.com/#baidu-maps/mcp&Date)
  128. ## 📄 License
  129. [MIT](./LICENSE) © baidu-maps

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.