这是一个模型上下文协议(MCP)服务器,提供日本邮政编码到地址的查询功能。该服务器可与AI助手及其他MCP客户端集成,以实现邮政编码搜索功能。
git clone https://github.com/rooking-oss/zipcode-search-mcp.git
cd zipcode-search-mcp
uv sync
或者使用 pip:
pip install -e .
uv run python main.py
git clone https://github.com/rooking-oss/zipcode-search-mcp.git
cd zipcode-search-mcp
uv sync
或者使用 pip:
pip install -e .
uv run python main.py
在你的 claude_desktop_config.json 中添加以下配置:
{
"mcpServers": {
"zipcode-search": {
"command": "uv",
"args": ["run", "python", "/path/to/zipcode-search-mcp/main.py"]
}
}
}
对于其他 MCP 客户端,请参考包含的 .mcp.json 配置文件,或使用以下连接详细信息:
zipcode-searchuv run python main.py使用邮政编码搜索日本地址。
参数:
zipcode(字符串):7 位邮政编码(例如,"1000001")返回值:
address(字符串):找到的地址,如果没有匹配项则返回 "Address not found"使用示例: 在你的 MCP 客户端(如 Claude)中:
What's the address for postal code 1000001?
或者直接使用:
Use the search_zipcode tool to find the address for postal code 1600020
服务器通过 MCP 协议提供一个工具:
| 工具 | 描述 | 输入 | 输出 |
|---|---|---|---|
search_zipcode |
通过邮政编码搜索地址 | zipcode: string |
{address: string} |
zipcode-search-mcp/
├── main.py # MCP 服务器实现
├── pyproject.toml # 项目配置和依赖
├── uv.lock # 依赖锁定文件
├── .mcp.json # MCP 客户端配置
├── .python-version # Python 版本规范
├── .gitignore # Git 忽略规则
└── README.md # 本文件
git clone https://github.com/rooking-oss/zipcode-search-mcp.git
cd zipcode-search-mcp
uv sync
uv run pytest
uv run black .
uv run isort .
我们欢迎贡献!请遵循以下步骤:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)mcp[cli] - 模型上下文协议实现httpx - 用于 API 请求的异步 HTTP 客户端python --version
uv sync
uv run python main.py
本项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。
如果您遇到任何问题或有疑问:
⚠️ 重要提示
本服务使用 Zipcloud API,仅用于开发和教育目的。对于生产使用,请确保进行适当的错误处理、速率限制,并遵守 Zipcloud API 服务条款。