Integrations
Manages environment configuration for the BMTC MCP server deployment.
Provides version control for the BMTC MCP server codebase.
Hosts the repository for the BMTC MCP server code and documentation.
班加罗尔 BMTC MCP 服务器
为班加罗尔都市运输公司 (BMTC) 公交服务实施购物中心连接器程序 (MCP) 服务器。
建筑学
BMTC MCP 服务器采用模块化分层架构,有效分离关注点并提升可维护性。该系统旨在处理班加罗尔都市交通公司公交车的实时交通数据,并通过标准化 API 提供。
核心组件
- API 层:用于身份验证、路线、站点、公交车位置和预计到达时间 (ETA) 信息的 RESTful 端点
- 服务层:业务逻辑、数据转换和ETA计算
- 数据访问层:通过 Mongoose ODM 集成 MongoDB
- 缓存层:基于 Redis 的缓存,以提高性能
- 外部集成层:BMTC API 集成
特征
- 实时公交车位置追踪
- 路线信息和时间安排
- 停靠站详情和预计到达时间 (ETA)
- 支持班加罗尔 2,200 多条公交线路和 8,400 多个公交车站
- 身份验证和授权
- 数据缓存和优化
- 附近站点和公交车的地理空间查询
先决条件
- Node.js(v14 或更高版本)
- npm 或 yarn
- MongoDB
- Redis(可选,用于缓存)
- Git
安装和设置
方法 1:标准安装
- 克隆存储库
- 安装依赖项
- 配置环境变量
使用您的配置编辑.env
文件:
- 使用模拟数据填充数据库(可选)
- 启动服务器
对于自动重启的开发:
方法 2:使用 Docker Compose
- 克隆存储库
- 配置环境变量(可选)
可以直接在docker-compose.yml
文件中修改环境变量,或者创建.env
文件:
- 构建并启动容器
这将启动三个容器:
bmtc-mcp-api
:Node.js API 服务器bmtc-mcp-mongo
:MongoDB 数据库bmtc-mcp-redis
:Redis缓存服务器
- 使用模拟数据填充数据库(可选)
- 查看日志
- 停止容器
要删除卷:
使用 API
服务器运行后,您可以访问以下 API:
如需 API 文档,请访问:
示例 API 端点
API 密钥
JWT 秘密
JWT 密钥用于签署身份验证令牌。生成一个安全的随机字符串:
将其添加到您的.env
文件中:
BMTC API 密钥
对于开发,您可以使用模拟数据,而无需实际的 BMTC API 密钥:
对于生产,您需要直接联系 BMTC 来请求官方 API 访问权限。
发展
测试
运行测试:
运行覆盖测试:
代码检查
检查代码风格:
修复代码风格问题:
项目结构
贡献
请阅读CONTRIBUTING.md了解我们的行为准则和提交拉取请求的流程的详细信息。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
提供班加罗尔公共交通信息的实时访问,包括公交车跟踪、时刻表、路线和服务更新,以改善乘客体验。
Related MCP Servers
- AsecurityFlicenseAqualityEnables Large Language Models to access real-time data on Vilnius public transport stops and routes through the Model Context Protocol.Last updated -21Python
- AsecurityFlicenseAqualityFacilitates real-time access to Singapore's Land Transport Authority (LTA) transportation data, offering insights into bus arrivals, train services, traffic conditions, and more through integration with the LTA DataMall API.Last updated -7JavaScript
- -securityAlicense-qualityThis server enables large language models to access and interact with real-time transport alerts from Transport for NSW's network, supporting filtering by transport mode and returning formatted alert information about disruptions and planned works.Last updated -115JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that provides real-time access to Hong Kong's KMB and Long Win Bus route information and arrival times, enabling Language Models to answer user questions about bus routes, stops, and ETAs.Last updated -3Python