Singapore LTA DataMall MCP Server

平台与服务

by hithereiamaliff

访问新加坡实时公共交通信息,包括巴士到站、列车服务提醒和车站拥挤度,并可查询停车位、路况事件及预测客流。

什么是 Singapore LTA DataMall MCP Server

访问新加坡实时公共交通信息,包括巴士到站、列车服务提醒和车站拥挤度,并可查询停车位、路况事件及预测客流。

核心功能 (7 个工具)

bus_arrival

Get real-time bus arrival information for a specific bus stop and optionally a specific service number. Returns estimated arrival times, bus locations, and crowding levels.

station_crowding

Get real-time MRT/LRT station crowdedness level for a particular train network line. Updates every 10 minutes.

train_alerts

Get real-time train service alerts including service disruptions and shuttle services. Updates when there are changes.

carpark_availability

Get real-time availability of parking lots for HDB, LTA, and URA carparks. Updates every minute.

travel_times

Get estimated travel times on expressway segments. Updates every 5 minutes.

traffic_incidents

Get current road incidents including accidents, roadworks, and heavy traffic. Updates every 2 minutes.

station_crowd_forecast

Get forecasted MRT/LRT station crowdedness levels in 30-minute intervals.

README

Singapore LTA DataMall MCP Server

🚌 Access Singapore's real-time transport data through AI assistants — bus arrivals, train crowding, traffic incidents, and more!

Fork License: MIT

This is an enhanced fork of arjunkmrm/lta-mcp, rebuilt for self-hosted VPS deployment with zero-friction onboarding — no API key required to get started!


✨ Features

  • 🔑 No API Key Required — Start using immediately with the server's default quota
  • 🌐 Remote Access — Connect from any MCP client via HTTPS (not just local stdio)
  • 🚀 One-Line Setup — Just add the URL to your MCP client config
  • 📊 Real-Time Data — Bus arrivals, train crowding, traffic incidents, carpark availability
  • 🔄 Auto-Deployment — Push to GitHub, automatically deploys to VPS

🚀 Quick Start

Step 1: Add to Your MCP Client

Copy this configuration to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

Claude Desktop (claude_desktop_config.json):

json
{
  "mcpServers": {
    "lta-datamall": {
      "transport": "streamable-http",
      "url": "https://mcp.techmavie.digital/ltadatamallsg/mcp"
    }
  }
}

Cursor/Windsurf (MCP settings):

json
{
  "lta-datamall": {
    "transport": "streamable-http",
    "url": "https://mcp.techmavie.digital/ltadatamallsg/mcp"
  }
}

Step 2: Start Asking!

Once configured, you can ask your AI assistant things like:

  • "When is the next bus arriving at Marsiling Mall?" (the AI will look up the bus stop code automatically)
  • "When is bus 143 arriving at bus stop 83139?"
  • "How crowded is the North-South Line right now?"
  • "Are there any train service disruptions?"
  • "Show me traffic incidents on the expressways"
  • "What's the carpark availability near Orchard?"

🔑 Using Your Own API Key (Optional)

By default, this server uses a shared LTA DataMall API key for convenience. To avoid rate limiting during heavy usage, you can register your own key via the MCP Key Service:

  1. Visit mcpkeys.techmavie.digital and register your LTA DataMall API key
  2. You'll receive a usr_XXXXXXXX key
  3. Use it in your MCP client config:
json
{
  "mcpServers": {
    "lta-datamall": {
      "transport": "streamable-http",
      "url": "https://mcp.techmavie.digital/ltadatamallsg/mcp/usr_YOUR_KEY_HERE"
    }
  }
}

Alternatively, use the query parameter format: /mcp?api_key=usr_YOUR_KEY_HERE

Note: Registering an LTA API key is optional even with the key service — you can register without one and still use the server's default quota.

How to Get Your Own LTA DataMall API Key

  1. Visit LTA DataMall
  2. Click "Request for API Access" and fill in the provided form, then hit Submit button.
  3. Once approved, find your API key in the email sent to you.
  4. Register it at mcpkeys.techmavie.digital

🛠️ Available Tools

This MCP server provides 8 tools for accessing Singapore transport data:

ToolDescriptionUpdate Frequency
bus_stop_searchLook up bus stop codes by name, road, or landmarkCached (24h)
bus_arrivalReal-time bus arrival times, locations & crowdingReal-time
station_crowdingMRT/LRT station crowdedness levelsEvery 10 min
station_crowd_forecastPredicted station crowding (30-min intervals)Periodic
train_alertsService disruptions & shuttle bus infoOn change
carpark_availabilityHDB, LTA & URA carpark lot availabilityEvery 1 min
travel_timesExpressway travel time estimatesEvery 5 min
traffic_incidentsAccidents, roadworks & heavy trafficEvery 2 min

Tool Details

🔍 bus_stop_search

Search for bus stop codes by name, road, or landmark. Use this to find the 5-digit bus stop code needed for bus_arrival.

ParameterTypeRequiredDescription
querystringSearch query (e.g., "Marsiling Mall", "Orchard", "Victoria St")
limitnumberMax results to return (default: 10, max: 20)

The bus stop database (~5,500 stops) is loaded on first search and cached for 24 hours.

🚌 bus_arrival

Get real-time bus arrival information for any bus stop in Singapore.

ParameterTypeRequiredDescription
busStopCodestring5-digit bus stop code (e.g., "83139")
serviceNostringFilter by specific bus service (e.g., "143")

🚇 station_crowding

Check how crowded MRT/LRT stations are right now.

ParameterTypeRequiredDescription
trainLineenumTrain line code (see below)

📈 station_crowd_forecast

Get predicted crowding levels for the next few hours.

ParameterTypeRequiredDescription
trainLineenumTrain line code (see below)

Supported Train Lines:

CodeLine Name
NSLNorth-South Line
EWLEast-West Line
NELNorth-East Line
CCLCircle Line
DTLDowntown Line
TELThomson-East Coast Line
BPLBukit Panjang LRT
SLRTSengkang LRT
PLRTPunggol LRT
CELCircle Line Extension
CGLChangi Airport Branch

🚨 train_alerts

Get current train service alerts (no parameters required).

🅿️ carpark_availability

Get real-time carpark availability across Singapore (no parameters required).

⏱️ travel_times

Get estimated travel times on expressways (no parameters required).

🚧 traffic_incidents

Get current road incidents (no parameters required).


🔄 What's Changed from Original

This fork introduces major improvements over the original repository:

AspectOriginalThis Fork
HostingSmithery cloudSelf-hosted VPS
Transportstdio (local only)Streamable HTTP (remote)
API KeyRequiredOptional (server default)
DeploymentManualAuto via GitHub Actions
SDK Version0.5.01.11.0+

Key Changes

  1. New HTTP Server (src/http-server.ts)

    • Express-based server with Streamable HTTP transport
    • Session management for concurrent users
    • Health check endpoint for monitoring
  2. Zero-Friction Onboarding

    • Server provides default API quota
    • Users can start immediately without registration
    • Optional personal API key via MCP Key Service
  3. Bus Stop Search (src/bus-stops-cache.ts)

    • Look up bus stop codes by name, road, or landmark
    • Lazy-loaded cache of all ~5,500 Singapore bus stops
    • No more web searching for bus stop codes
  4. MCP Key Service Integration (src/utils/key-service.ts)

    • Centralized credential management via usr_xxx keys
    • Per-request server/transport isolation for key-service users
    • 60-second cache with request deduplication
  5. Production Infrastructure

    • Docker + Docker Compose configuration
    • Nginx reverse proxy setup
    • GitHub Actions auto-deployment
    • Health checks and graceful shutdown
    • Firebase analytics with dashboard

🖥️ API Endpoints

EndpointMethodDescription
/GETServer information and available tools
/healthGETHealth check (for monitoring)
/mcpPOSTMCP protocol endpoint (server default key)
/mcp/:userKeyPOSTMCP protocol endpoint (key-service auth)
/analyticsGETUsage analytics (JSON)
/analytics/dashboardGETAnalytics dashboard (HTML)
/.well-known/mcp/server-card.jsonGETSmithery server discovery
/.well-known/mcp-configGETMCP client configuration schema

🏠 Self-Hosting Guide

Want to host your own instance? Here's what you need:

Prerequisites

  • VPS with Docker & Docker Compose
  • Nginx with SSL (Let's Encrypt)
  • Your own LTA DataMall API key

Deployment Files

FilePurpose
DockerfileContainer build configuration
docker-compose.ymlDocker orchestration
deploy/nginx-mcp.confNginx reverse proxy config
.github/workflows/deploy-vps.ymlAuto-deployment workflow

Environment Variables

VariableRequiredDefaultDescription
LTA_API_KEYYour LTA DataMall API key
KEY_SERVICE_URLMCP Key Service resolve endpoint (enables /mcp/:userKey route)
KEY_SERVICE_TOKENBearer token for key service (unique per server)
PORT8080Server port
HOST0.0.0.0Server host

GitHub Secrets (for auto-deployment)

Set these in your repository settings:

  • VPS_HOST — Your VPS IP address
  • VPS_USERNAME — SSH username
  • VPS_SSH_KEY — Private SSH key
  • VPS_PORT — SSH port (usually 22)
  • LTA_API_KEY — Your LTA DataMall API key
  • KEY_SERVICE_URL — MCP Key Service resolve endpoint (optional)
  • KEY_SERVICE_TOKEN — Bearer token for key service (optional)

📄 License

MIT License — See LICENSE file for details.


🙏 Credits

常见问题

Singapore LTA DataMall MCP Server 是什么?

访问新加坡实时公共交通信息,包括巴士到站、列车服务提醒和车站拥挤度,并可查询停车位、路况事件及预测客流。

Singapore LTA DataMall MCP Server 提供哪些工具?

提供 7 个工具,包括 bus_arrival、station_crowding、train_alerts

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描111.8k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描111.8k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描9.8k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.1k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.3k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
34.9k

评论