Bangalore BMTC Mobility Connectivity Platform
ベンガルール BMTC MCP サーバー
バンガロール都市圏交通公社 (BMTC) のバス サービス用のモール コネクタ プログラム (MCP) サーバーの実装。
建築

BMTC MCPサーバーは、モジュール式の階層化アーキテクチャを採用しており、懸念事項を分離し、保守性を向上させます。このシステムは、バンガロール都市圏交通公社のバスからのリアルタイムの交通データを処理し、標準化されたAPIを通じて提供するように設計されています。
コアコンポーネント
API レイヤー: 認証、ルート、停留所、バスの位置、到着予定時刻情報のための RESTful エンドポイント
サービス層: ビジネスロジック、データ変換、ETA計算
データ アクセス層: Mongoose ODM 経由の MongoDB 統合
キャッシュ層: パフォーマンス向上のためのRedisベースのキャッシュ
外部統合レイヤー:BMTC API統合
Related MCP server: poa-bus-mcp
特徴
リアルタイムバス位置追跡
ルート情報とスケジュール
停留所の詳細と到着予定時刻(ETA)
バンガロールの2,200以上のバス路線と8,400以上のバス停をサポート
認証と承認
データのキャッシュと最適化
近くの停留所やバスの地理空間クエリ
前提条件
Node.js (v14以降)
npmまたはyarn
モンゴDB
Redis(オプション、キャッシュ用)
ギット
インストールとセットアップ
方法1: 標準インストール
リポジトリをクローンする
git clone https://github.com/ajeetraina/bengaluru-bmtc-mcp.git
cd bengaluru-bmtc-mcp依存関係をインストールする
npm install環境変数を設定する
cp .env.example .env設定に合わせて.envファイルを編集します。
PORT=3000
NODE_ENV=development
MONGO_URI=mongodb://localhost:27017/bmtc-mcp
REDIS_URI=redis://localhost:6379
API_KEY=your_api_key_here
JWT_SECRET=your_jwt_secret_here
JWT_EXPIRES_IN=86400
BMTC_API_ENDPOINT=https://bmtc-api-endpoint.example
BMTC_API_KEY=your_bmtc_api_key_here
CACHE_DURATION=300
LOG_LEVEL=infoデータベースに模擬データを入力する(オプション)
node src/scripts/seed.jsサーバーを起動する
npm start自動再起動を使用した開発の場合:
npm run dev方法2: Docker Composeを使用する
リポジトリをクローンする
git clone https://github.com/ajeetraina/bengaluru-bmtc-mcp.git
cd bengaluru-bmtc-mcp環境変数を設定する(オプション)
環境変数はdocker-compose.ymlファイルで直接変更することも、 .envファイルを作成することもできます。
cp .env.example .envコンテナを構築して起動する
docker-compose up -dこれにより、3 つのコンテナが起動します。
bmtc-mcp-api: Node.js API サーバーbmtc-mcp-mongo: MongoDB データベースbmtc-mcp-redis: Redis キャッシュサーバー
データベースに模擬データを入力する(オプション)
docker-compose exec api node src/scripts/seed.jsログを表示
docker-compose logs -f apiコンテナを停止する
docker-compose downボリュームも削除するには:
docker-compose down -vAPIの使用
サーバーが起動したら、次の場所で API にアクセスできます。
http://localhost:3000/api/v1API ドキュメントについては、以下をご覧ください。
http://localhost:3000/api-docsAPIエンドポイントの例
# Authentication
POST /api/v1/auth/login
GET /api/v1/auth/me
# Routes
GET /api/v1/routes
GET /api/v1/routes/:routeId
GET /api/v1/routes/search?source=Kempegowda&destination=Electronic
# Stops
GET /api/v1/stops
GET /api/v1/stops/:stopId
GET /api/v1/stops/near?lat=12.9767&lng=77.5713&radius=500
GET /api/v1/stops/search?query=Lalbagh
# Bus Locations
GET /api/v1/bus-locations
GET /api/v1/bus-locations/:busId
GET /api/v1/bus-locations/near?lat=12.9767&lng=77.5713&radius=1000
# ETA
GET /api/v1/eta/:stopId
GET /api/v1/eta/:stopId/:routeIdAPIキー
JWTシークレット
JWTシークレットは認証トークンの署名に使用されます。安全なランダム文字列を生成します。
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"これを.envファイルに追加します:
JWT_SECRET=your_generated_secret_hereBMTC APIキー
開発の場合、実際の BMTC API キーなしでモックデータを使用できます。
BMTC_API_ENDPOINT=https://bmtc-api-endpoint.example
BMTC_API_KEY=your_bmtc_api_key_here本番環境では、BMTC に直接連絡して公式 API アクセスをリクエストする必要があります。
発達
テスト
テストを実行します。
npm testカバレッジ付きのテストを実行します。
npm run test:coverageリンティング
コードスタイルを確認します:
npm run lintコード スタイルの問題を修正します。
npm run lint:fixプロジェクト構造
bengaluru-bmtc-mcp/
├── .env.example # Environment variables template
├── .eslintrc.json # ESLint configuration
├── .github/ # GitHub configuration
│ └── workflows/ # GitHub Actions workflows
├── .gitignore # Git ignore file
├── CONTRIBUTING.md # Contribution guidelines
├── Dockerfile # Docker configuration
├── LICENSE # MIT License
├── README.md # Project documentation
├── docker-compose.yml # Docker Compose configuration
├── docs/ # Documentation
│ ├── api.md # API documentation
│ └── setup.md # Setup guide
├── jest.config.js # Jest configuration
├── package.json # Project dependencies
└── src/ # Source code
├── config/ # Configuration files
├── controllers/ # Request handlers
├── index.js # Application entry point
├── middlewares/ # Express middlewares
├── models/ # MongoDB models
├── public/ # Static files
├── routes/ # API routes
├── scripts/ # Utility scripts
├── services/ # External service integrations
├── tests/ # Test files
└── utils/ # Utility functions貢献
行動規範とプル リクエストの送信プロセスの詳細については、 CONTRIBUTING.md をお読みください。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
謝辞
シンガポールLTA MCP実装のインスピレーション
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time bus and train information across 10+ cities in Malaysia, including live vehicle tracking, arrival predictions, stop search, and route discovery for public transit systems.3MIT
- AlicenseNot gradedqualityDmaintenanceAccess bus stops, routes, and real-time information for Porto Alegre's public transportation system.3MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time and scheduled bus information for Montevideo's public transport system.1
- AlicenseNot gradedqualityDmaintenanceProvides Estonian public transport timetables, trip planning, stop search, and real-time vehicle tracking.MIT
Related MCP Connectors
Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs.
Lviv public transport MCP: stops, timetables, routes, and live vehicle positions. No API key.
MBTA MCP — Boston real-time transit via the MBTA v3 API (api-v3.mbta.com)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ajeetraina/bengaluru-bmtc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server