800bus-mcp
800BUS(800bus.cn)公交图片档案站的 MCP 服务,把站点只读开放接口(/api/v1,12 个 GET 端点)封装成 AI 可直接调用的工具。
- 全部接口只读、匿名、无副作用:不会写入数据、不会发通知、不会改动任何状态
- 默认 60 次/分钟/IP 限流,超限时工具会返回
rate_limited提示 - 不返回邮箱、精确拍摄地点、审核人等隐私字段;匿名评论统一显示为「匿名用户」
- 图片与数据遵循 CC BY-NC-ND 4.0:非商业用途、署名 800BUS、禁止演绎,禁止用于模型训练或批量镜像
安装
pip install 800bus-mcp
# 或免安装直接运行
uvx 800bus-mcp
要求 Python ≥ 3.10。
配置
Claude Desktop
编辑 claude_desktop_config.json(macOS/Linux:~/Library/Application Support/Claude/;Windows:%APPDATA%\Claude\):
{
"mcpServers": {
"800bus": {
"command": "uvx",
"args": ["800bus-mcp"]
}
}
}
已用 pip 安装时也可以写成:
{
"mcpServers": {
"800bus": {
"command": "800bus-mcp"
}
}
}
Cursor
在 ~/.cursor/mcp.json(项目级为 .cursor/mcp.json)中加入:
{
"mcpServers": {
"800bus": {
"command": "uvx",
"args": ["800bus-mcp"]
}
}
}
其他 MCP 客户端
本服务使用 stdio 传输,启动命令 800bus-mcp(或 python -m bus800_mcp)即可。
环境变量
| 变量 | 默认值 | 说明 |
|---|---|---|
800BUS_API_BASE |
https://800bus.cn |
接口根地址,仅在自建反代或本地调试时需要修改 |
可用工具
| 工具 | 对应接口 | 说明 |
|---|---|---|
get_site_stats |
/api/v1/stats |
站点统计:档案、用户、公司、资讯、评论总数与分区分布 |
get_meta |
/api/v1/meta |
参数字典:分区 key、站点、排序、分页上限 |
list_photos |
/api/v1/photos |
按关键词 / 车牌 / 分区 / 地区 / 公司 / 作者筛选档案 |
get_photo |
/api/v1/photos/{id} |
档案详情(不含拍摄地点) |
get_photo_comments |
/api/v1/photos/{id}/comments |
档案评论与嵌套回复 |
list_news |
/api/v1/news |
已发布资讯列表(仅摘要) |
get_news |
/api/v1/news/{id} |
资讯详情(Markdown 正文) |
list_regions |
/api/v1/regions |
省 / 市 / 公司三级层级 |
get_company |
/api/v1/companies/{id} |
公司资料与作品列表 |
get_user |
/api/v1/users/{id} |
用户公开资料(无邮箱) |
get_rankings |
/api/v1/rankings |
每周最热档案 / 月度贡献者 |
get_map_markers |
/api/v1/map/markers |
矩形范围内允许公开位置的档案标记 |
工具返回值为紧凑 JSON 文本,结构与开放接口的 success / data / meta 信封一致。
使用示例
配置好之后,可以直接对 AI 说:
- 「查一下 800BUS 现在有多少张档案、今日新增多少」
- 「搜索南昌的宇通客车档案,按评分排序,给我前 5 张」
- 「看看档案 14222 的详情和评论」
- 「读完最新的资讯,再列出江西省有哪些城市和公司」
- 「取南昌附近地图上的档案标记,按分区筛选」
建议 AI 先调用 get_meta 拿到合法的分区 key 与排序枚举,再用 list_photos 检索,避免参数非法。
自检与版本
800bus-mcp --version # 打印版本
800bus-mcp --selftest # 请求 /api/v1/stats,验证网络与接口连通性
相关链接
- 开放平台说明:https://800bus.cn/openapi/
- 接口文档(OpenAPI 3.1):https://800bus.cn/yszc/openapi.html
- 问题反馈:站内工单 https://800bus.cn/ticket.php
许可证
本包代码使用 MIT 许可证,详见 LICENSE。通过本包获取的站点数据与图片遵循 CC BY-NC-ND 4.0。
Metadata
Release files for 800bus-mcp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| 800bus_mcp-1.0.0.tar.gz | 9.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 800bus_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.7 kB
Release files / 800bus_mcp-1.0.0.tar.gz
| Download URL | 800bus_mcp-1.0.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93ad838fe00112adf5802a87216888500f746bf9437d10e4299f85c43582e301
|
|
BLAKE2b-256 checksum How to use checksums |
8a4b2d12e224a78e81682c2af6986154ba3cf63951f2ae915de8ab6a46014322
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / 800bus_mcp-1.0.0-py3-none-any.whl
| Download URL | 800bus_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be4ce5f2537a2464588fd3ef543e7452beeb744e480d1a54e8dc0522748288e6
|
|
BLAKE2b-256 checksum How to use checksums |
cb9ea709e36cee77c972d502a41b5bda51f9d6a428c71ca890892a8b76059715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Security for 800bus-mcp 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.