Content
# XiaozhiMCP-MapNAVI | MCP Map Navigation Tool
A powerful MCP tool that integrates with Amap API services, allowing AI to access geographic information, weather data, and route planning.
A powerful MCP tool that integrates with Amap API services, allowing AI to access geographic information, weather data, and route planning.


## Overview | 概述
MCP-MapNAVI is based on the Model Context Protocol (MCP), which allows AI language models to interact with external map services. Through this tool, AI can geocode addresses, check weather information, and plan driving routes - extending its capabilities beyond text generation.
MCP-MapNAVI is based on the Model Context Protocol (MCP), which allows AI language models to interact with external map services. Through this tool, AI can geocode addresses, check weather information, and plan driving routes - extending its capabilities beyond text generation.
## Features | 特性
- 🗺️ **Geocoding** - Convert addresses to latitude and longitude coordinates
- 🌤️ **Weather Query** - Get weather information for specific cities or regions
- 🚗 **Driving Route Planning** - Plan driving routes between two points
- 🔄 **Automatic Reconnection** - WebSocket connection recovery mechanism with exponential backoff
- 🔒 **Secure Communication** - Secure data transmission via WebSocket
## Quick Start | 快速开始
1. Install dependencies | 安装依赖:
```bash
pip install -r requirements.txt
```
2. Set up environment variables | 设置环境变量:
```bash
export MCP_ENDPOINT=<your_mcp_endpoint>
```
3. Run the map_navi example :
```bash
python mcp_pipe.py map.py
```
## Project Structure | 项目结构
- `mcp_pipe.py`: Main communication pipe that handles WebSocket connections and process management | 处理WebSocket连接和进程管理的主通信管道
- `calculator.py`: Example MCP tool implementation for mathematical calculations | 用于数学计算的MCP工具示例实现
- `requirements.txt`: Project dependencies | 项目依赖
## Creating Your Own MCP Tools | 创建自己的MCP工具
Here's a simple example of creating an MCP tool | 以下是一个创建MCP工具的简单示例:
```python
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("YourToolName")
@mcp.tool()
def your_tool(parameter: str) -> dict:
"""Tool description here"""
# Your implementation
return {"success": True, "result": result}
if __name__ == "__main__":
mcp.run(transport="stdio")
```
## Use Cases | 使用场景
- Mathematical calculations | 数学计算
- Email operations | 邮件操作
- Knowledge base search | 知识库搜索
- Remote device control | 远程设备控制
- Data processing | 数据处理
- Custom tool integration | 自定义工具集成
## Requirements | 环境要求
- Python 3.7+
- websockets>=11.0.3
- python-dotenv>=1.0.0
- mcp>=1.8.1
- pydantic>=2.11.4
## Contributing | 贡献指南
Contributions are welcome! Please feel free to submit a Pull Request.
Contributions are welcome! Please feel free to submit a Pull Request.
## License | 许可证
This project is licensed under the MIT License - see the LICENSE file for details.
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgments | 致谢
- Thanks to all contributors who have helped shape this project | 感谢所有帮助塑造这个项目的贡献者
- Inspired by the need for extensible AI capabilities | 灵感来源于对可扩展AI能力的需求
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds