Jon的谷歌地图MCP服务器
用于谷歌地图信息的MCP服务器
通过模型上下文协议(MCP)公开工具的FastMCP服务器。
需求
- Python 3.10+
安装```bash
Clone the repository
git clone
cd jons-mcp-google-maps
Install with uv
uv pip install -e .
## 运行服务器```bash
uv run jons-mcp-google-maps
添加到克劳德代码```bash
Register the MCP server with Claude Code
claude mcp add jons-mcp-google-maps -- uv run --project /path/to/jons-mcp-google-maps jons-mcp-google-maps
## 可用工具
|工具|说明|
|------|-------------|
| `hello_world` |返回友好的问候语(示例工具)|
## 发展
### 设置```bash
# Install with dev dependencies
uv pip install -e ".[dev]"
运行测试```bash
Run all tests
uv run pytest
Run with coverage
uv run pytest --cov=src
Run a specific test
uv run pytest tests/test_example.py::test_hello_world_default
### 代码质量```bash
# Type check
uv run mypy src/jons_mcp_google_maps
# Format code
uv run black src tests
# Lint code
uv run ruff check src tests
项目结构```
jons-mcp-google-maps/
├── src/
│ ├── init.py
│ └── jons_mcp_google_maps/
│ ├── init.py # Package exports
│ ├── constants.py # Configuration constants
│ ├── exceptions.py # Custom exceptions
│ ├── utils.py # Utility functions
│ ├── server.py # FastMCP server setup
│ └── tools/
│ ├── init.py # Tool exports
│ └── example.py # Example tool
├── tests/
│ ├── conftest.py # Test fixtures
│ └── test_example.py # Example tests
├── pyproject.toml # Project configuration
├── CLAUDE.md # AI assistant guidance
└── README.md # This file
## 添加新工具
1. 在中创建新文件 `src/jons_mcp_google_maps/tools/` 或添加到现有文件
1. 编写一个带有类型提示和docstring的异步函数:```python
async def my_tool(param: str) -> str:
"""Brief description for the MCP tool listing.
Args:
param: What this parameter does.
Returns:
What the tool returns.
"""
return f"Result: {param}"
- 出口自
src/jons_mcp_google_maps/tools/__init__.py - 注册
server.py和mcp.tool(my_tool)
许可证
麻省理工学院
