Singapore Location Intelligence MCP
About
Provides real-time Singapore transport data and routing information.
Details
- Author
- siva-sub
- Categories
- Search, Other
Jump to
Setup
Install Singapore Location Intelligence MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/siva-sub/MCP-Public-Transport
Follow the installation instructions in the repository README, then restart your MCP client.
Provides real-time Singapore transport data and routing information.
As the creator of this project, I, Siva (Sivasubramanian Ramanathan), developed this comprehensive Singapore Location Intelligence Platform to explore the capabilities of the Model Context Protocol (MCP). My goal was to test how MCP could be leveraged to help AI accurately plan routes, while also showcasing my ability to work with various APIs and my expertise in the technologies involved.
What began as an experiment with MCP integration evolved into a sophisticated, real-world application that demonstrates the power of this exciting new protocol to create tools that can rival commercial solutions. This platform provides enterprise-grade transport routing, postal code resolution, and location intelligence with Google Maps-level detailed navigation instructions, all optimized for Singapore's unique transport ecosystem.
π―NEW in v0.3.0- MRT Exit Integration & Landmarks Tool Fix
- πMRT Exit Recommendations- Google Maps-level precision with specific exit codes
- ποΈEnhanced Location Resolution- Fixed JSON string parsing and coordinate validation
- πExit-Level Navigation- "Use Exit E (14m walk, 1 min)" for optimal station navigation
- π§Robust Input Handling- All location formats now work correctly
- π―Singapore-Optimized- Proper coordinate bounds and postal code validation
π―v0.2.7- Weather Service Fixes & Enhanced Reliability
- π¦οΈRobust Weather Integration- Fixed all weather API inconsistencies and crashes
- π§Production-Ready Error Handling- Graceful degradation when weather APIs fail
- π―Singapore Weather API Compatibility- Supports all 5 official weather endpoints
- β‘Enhanced Journey Planning- Weather-aware routing with resilient fallbacks
- π‘οΈZero-Crash Guarantee- Weather service failures no longer break journey planning
- π¦οΈStandalone Weather Tools- Comprehensive weather conditions and activity-specific advisories
- π―Activity Recommendations- Tailored advice for walking, cycling, sports, photography, dining
- π‘οΈComfort Analysis- Intelligent comfort level assessment with travel impact
- β°Best Time Recommendations- Optimal timing for outdoor activities based on weather
- πAdvanced Fuzzy Search- "Opp Blk 910" β finds "Opposite Block 910" with 95% accuracy
- π¦οΈWeather-Aware Routing- Real-time weather impact on walking times and route suggestions
- πTransfer Minimization- Smart algorithms to reduce transfers in multi-modal journeys
- πΊοΈGoogle Maps-Quality Directions- "Turn Left To Stay On Thomson Road" level instructions
- πComprehensive Stop Details- Nearby amenities, accessibility info, and location context
- π―Advanced Postal Code Intelligence- 95% accuracy resolution for all Singapore postal codes
- πΊοΈProfessional Navigation Instructions- Turn-by-turn directions like "Turn Left To Stay On Thomson Road"
- πMulti-Modal Transport Planning- Seamless integration of MRT, LRT, buses, and walking
- β°Singapore Time Intelligence- Business hours, rush hour detection, and timing optimization
- πIntelligent Location Search- Fuzzy matching, typo tolerance, and smart suggestions
- πComprehensive Geocoding- Forward and reverse geocoding with Singapore-specific accuracy
- πReal-Time Transport Data- Live bus arrivals, train status, and service disruptions
- π‘Context-Aware Routing- Peak hour optimization, last train warnings, night bus alternatives
Before: Basic transport tools with failed postal code resolutionAfter: Enterprise-grade location intelligence platform with weather-aware routing
INPUT: "How to get to Suntec City from Little India MRT during heavy rain?" OUTPUT: β
Postal Code 039594 β SUNTEC CITY π§οΈ Heavy rain detected - prefer covered routes π Route: DT Line (8 min) β Covered walkway (6 min) π° Cost: $1.55 | π Duration: 32 minutes (adjusted for weather) π Step-by-step: "Walk 246m via covered walkway to ROCHOR MRT β Take DT Line from Rochor to Promenade β Use underground connection to Suntec City" β οΈ Weather Advisory: Allow extra 5 minutes for walking segments
Add to yourclaude_desktop_config.json:
{ "mcpServers": { "singapore-transport": { "command": "npx", "args": ["-y", "@siva-sub/mcp-public-transport"], "env": { "LTA_ACCOUNT_KEY": "your_lta_api_key_here", "ONEMAP_TOKEN": "your_onemap_token_here", "ONEMAP_EMAIL": "your_onemap_email@example.com", "ONEMAP_PASSWORD": "your_onemap_password" } } } }
- LTA_ACCOUNT_KEY:Required. Your LTA DataMall API key (Get here)
- ONEMAP_TOKEN: OneMap API token for enhanced features (Register here)
- ONEMAP_EMAIL: OneMap account email for authentication
- ONEMAP_PASSWORD: OneMap account password for authentication
- CACHE_DURATION: Cache duration in seconds (default:300)
- LOG_LEVEL: Logging level (default:info)
-
search_bus_stopsβ - Advanced fuzzy search with Singapore abbreviations
- Supports: "Opp Blk 910", "Bef Jurong East MRT", "CP near Orchard"
- Intelligent pattern recognition and typo tolerance
- Distance-based ranking and confidence scoring
get_bus_stop_detailsβ - Comprehensive stop information
- Real-time service information and nearby amenities
- Accessibility details and location context
- Walking distances to nearby stops
plan_comprehensive_journeyβ - Complete multi-modal journey planning
- Transfer minimization algorithms
- Real-time disruption handling
- Google Maps-quality turn-by-turn directions
- Weather impact on walking segments
- Supports all input types: addresses, postal codes, coordinates
- search_location- Enhanced with fuzzy search capabilities
- resolve_postal_code- High-accuracy Singapore postal code resolution (95% success rate)
- reverse_geocode- Convert coordinates to addresses with Singapore-specific accuracy
- get_bus_arrival- Real-time bus arrival times with crowding information
- find_bus_stops- Find bus stops by location, name, or coordinates
- plan_comprehensive_journey- Multi-modal journey planning with detailed instructions
- get_train_service_status- Real-time MRT/LRT service status and disruptions
- get_nearby_taxis- Find available taxis and estimate wait times
- get_traffic_conditions- Live traffic conditions, incidents, and road speeds
-
get_weather_conditionsβ - Comprehensive real-time weather with travel impact
- Real-time temperature, rainfall, humidity, and wind data
- Comfort level analysis and walking condition ratings
- Travel impact assessment with time adjustments
- Activity-specific recommendations and safety advice
get_weather_advisoryβ - Activity-specific weather recommendations
- Tailored advice for walking, cycling, outdoor dining, sports, photography
- Suitability ratings and best time recommendations
- Weather-specific safety guidance and precautions
Advanced Routing with Weather Intelligence
// Weather-aware journey planning { "primaryRoute": { "summary": { "totalTime": 1980, // seconds (adjusted for weather) "walkingTime": 720, // includes weather buffer "transfers": 1 }, "weatherImpact": { "conditions": { "rainfall": 12.5, // mm "temperature": 28, // Β°C "humidity": 85 // % }, "advisories": [ { "severity": "high", "type": "rain", "message": "Heavy rain detected. Allow extra time for walking.", "routingImpact": { "walkingTimeMultiplier": 1.5, "preferredModes": ["MRT", "Covered Bus Stops"] } } ] } } }
// Fuzzy search with Singapore intelligence { "query": "Opp Blk 910", "searchType": "fuzzy", "results": [ { "busStopCode": "83139", "description": "OPP BLK 910", "matchScore": 0.95, "locationPatterns": { "blockNumber": "910", "direction": "opp" }, "searchContext": { "queryVariations": ["opposite block 910", "opp blk 910"], "bestMatch": "OPP BLK 910" } } ] }
// Detailed stop information with context { "details": { "busStopCode": "83139", "description": "OPP BLK 910", "services": [...], // Real-time arrivals "nearbyStops": [...], // Within walking distance "accessibility": { "wheelchairAccessible": true, "sheltered": true, "tactilePaving": true }, "locationContext": { "district": "Tampines", "landmarks": ["Block 910", "Tampines Mall"], "transportHubs": ["Tampines MRT Station"] }, "nearbyAmenities": [ { "name": "Tampines Mall", "type": "shopping", "distance": 250, "walkingTime": 3 } ] } }
{ "singaporeTime": "27/06/2025, 10:58 PM", "businessHours": false, "rushHour": false, "contextInfo": { "nextRushHour": "7:00 AM tomorrow", "travelRecommendation": "Off-peak travel - comfortable journey expected" } }
{ "postalCode": "039594", "location": { "name": "SUNTEC CITY", "address": "3 TEMASEK BOULEVARD SUNTEC CITY SINGAPORE 039594", "district": "Downtown Core", "areaType": "Central Singapore", "confidence": 0.98 } }
- Weather-aware route planning
- Detailed turn-by-turn directions
- Multi-modal journey optimization
- Real-time traffic integration
- Postal code validation and resolution
- Optimal route planning with weather considerations
- Address standardization and fuzzy matching
- Transport accessibility analysis
- Weather impact on pedestrian traffic
- Peak hour traffic optimization
- Public transport coverage mapping
- Tourist-friendly directions with landmarks
- Weather-appropriate route suggestions
- Public transport guidance
- Location discovery with fuzzy search
- Sub-3-second route planningwith weather integration
- 5-minute weather data cachefor real-time responsiveness
- Intelligent cachingwith location and weather-aware TTL
- Graceful degradationduring API maintenance
- 95% postal code resolution accuracy
- Real-time data integrationwith official Singapore APIs
- Fuzzy search accuracyof 90%+ for Singapore terms
{ "routingOptions": { "includeWeatherImpact": true, "maxWalkingDistance": 800, "weatherSensitivity": "high", "preferredModes": ["MRT", "Covered Bus Stops"], "minimizeTransfers": true } }
{ "searchOptions": { "enableFuzzySearch": true, "minScore": 0.3, "singaporeAbbreviations": true, "typoTolerance": true } }
{ "businessHours": { "weekdays": { "start": 9, "end": 18 }, "saturday": { "start": 9, "end": 13 }, "sunday": { "closed": true } } }
- Authentication: Automatic token refresh with 3-day TTL
- Geocoding: High-accuracy address resolution with fuzzy matching
- Routing: Professional-grade turn-by-turn directions
- Weather Integration: Real-time weather data from Singapore APIs
- Real-time Data: Bus arrivals, train status, traffic conditions
- Transport Network: Complete bus and train network data
- Service Alerts: Live disruption and maintenance notifications
- Enhanced Error Handling: Graceful degradation and retry logic
- Real-time Data: Rainfall, temperature, humidity, wind speed
- 5-minute Updates: Fresh weather data for accurate routing
- Location-based: Weather conditions for specific route segments
- Advisory Generation: Smart recommendations based on conditions
git clone https://github.com/siva-sub/MCP-Public-Transport cd MCP-Public-Transport npm install cp .env.example .env.local # Add your API keys to .env.local npm run dev
npm run build # Builds both ESM and CJS versions npm run test # Runs comprehensive test suite npm run lint # TypeScript and ESLint checks
# Unit tests npm run test # Integration tests with real APIs npm run test:integration # Performance tests npm run test:performance
src/ βββ services/ # Core business logic β βββ lta.ts # LTA DataMall integration β βββ onemap.ts # OneMap API with authentication β βββ weather.ts # β Real-time weather integration β βββ routing.ts # β Enhanced multi-modal routing β βββ fuzzySearch.ts # β Singapore-optimized fuzzy search β βββ time.ts # Singapore time intelligence β βββ postalCode.ts # Postal code validation & resolution β βββ cache.ts # Intelligent caching layer βββ tools/ # MCP tool implementations β βββ location/ # Enhanced location intelligence tools β βββ bus/ # β Enhanced bus tools with fuzzy search β β βββ search.ts # β Advanced bus stop search β β βββ details.ts # β Comprehensive stop details β βββ routing/ # β Enhanced journey planning tools β β βββ enhanced.ts# β Weather-aware optimal routing β βββ train/ # Train service tools β βββ traffic/ # Traffic and road tools βββ types/ # TypeScript interfaces β βββ location.ts # Location and search types β βββ transport.ts # Transport system types β βββ search.ts # Search and query types β βββ time.ts # Singapore time types βββ utils/ # Shared utilities βββ errors.ts # Custom error handling βββ logger.ts # Structured logging βββ validation.ts # Input validation
- Singapore-Optimized: Built specifically for Singapore's unique transport ecosystem with local intelligence
- Weather-Aware: Real-time weather integration affects routing decisions and walking time estimates
- Professional-Grade: Routing instructions comparable to Google Maps with fuzzy search capabilities
- Real-Time Context: Business hours, rush hour, weather, and timing intelligence
- High Accuracy: 95% success rate for postal code resolution, 90%+ fuzzy search accuracy
- Enterprise-Ready: Comprehensive error handling, weather resilience, and performance optimization
- Developer-Friendly: Full TypeScript support with comprehensive documentation
- Transfer Minimization: Smart algorithms to reduce transfers in multi-modal journeys
We welcome contributions! Please see ourContributing Guidefor details.
- Singapore Land Authority (SLA)for OneMap API
- Land Transport Authority (LTA)for DataMall API
- Singapore Meteorological Servicefor weather data
- Model Context Protocolfor the extensible framework
- Singapore Open Datainitiative for public transport data
Built with β€οΈ for Singapore's smart city initiative and MCP exploration
- 11 Total Tools(up from 8)
- 4 New Major Servicesadded
- 3 New Toolswith advanced capabilities
- Weather API Integrationfor real-time conditions
- Fuzzy Search Enginewith 50+ Singapore abbreviations
- Google Maps-Qualityturn-by-turn directions
- Transfer Minimizationalgorithms
Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.
Free business data API and MCP server. Find restaurants, cafes, hotels, shops and 37+ business categories in any city worldwide. Uses OpenStreetMap data. No API key required. REST API + MCP Streamable HTTP endpoint.
A geographic data MCP covering cities, countries, regions, and languages β with multilingual support
Enhances LLMs with location-based services and geospatial data from OpenStreetMap.
BatchData MCP (Real Estate & Contact Data)
Real Estate & Contact Enrichment Data MCP
IP2Location.io API integration to retrieve the geolocation information for an IP address.
Unlock geospatial intelligence through Mapbox APIs like geocoding, POI search, directions, isochrones and more.
Best people search engine that reduces the time spent on talent discovery.
Enable Similarity-Distance-Magnitude statistical verification for your search, software, and data science workflows
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



