- Home
- MCP servers
- OneMap
OneMap
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"linzele-mcp-onemap": {
"command": "python",
"args": [
"server.py"
],
"env": {
"ONEMAP_EMAIL": "your_email@example.com",
"ONEMAP_EMAIL_PASSWORD": "your_password"
}
}
}
}You can run the OneMap MCP Server v2 locally or in the cloud to access Singapore's OneMap APIs via a Python-based MCP server. It exposes multiple tools for searching, geocoding, routing, coordinate conversions, planning areas, population data, nearby transport, and static maps, making it easy to build AI assistants and integrations that rely on OneMap data.
How to use
You will run the MCP server locally or in a deployment and connect your MCP client to it. Use the available tools to perform searches, geocode coordinates, convert coordinates between systems, retrieve thematic data, query planning areas and population data, find nearby transport options, and generate static maps. Start the server, then configure your client to call the required tools by name, passing the appropriate parameters like coordinates, search terms, or location identifiers. The server handles requests through the complete set of tools described in its feature set, returning structured responses that your AI assistant or application can consume.
How to install
Prerequisites You need Python 3.11 or newer and credentials from a OneMap account.
Local development steps follow. Copy and run each command in your terminal.
cd onemap-mcp
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your OneMap credentials
python server.py
Environment variables and configuration
You configure credentials and options using a .env file. The following variables are required to run the server with OneMap authentication.
ONEMAP_EMAIL=your_email@example.com
ONEMAP_EMAIL_PASSWORD=your_password
Docker deployment
You can run the MCP server inside a Docker container. Build the image and run the container with the necessary environment variables.
docker build -t onemap-mcp .
docker run -d \
-e ONEMAP_EMAIL="your_email@example.com" \
-e ONEMAP_EMAIL_PASSWORD="your_password" \
--name onemap-mcp \
onemap-mcp
Azure deployment and cloud options
If you deploy to Azure, you can build a container image to a registry and run it in Container Apps or another service, using the same environment variables for authentication.
Available tools
search
Search for addresses, buildings, postal codes
reverse_geocode_wgs84
Get address from WGS84 coordinates
reverse_geocode_svy21
Get address from SVY21 coordinates
route_walk_drive_cycle
Walking, driving, cycling, barrier-free routes
route_public_transport
Bus and MRT routes with fare info
convert_4326_to_3857
WGS84 to Web Mercator conversion
convert_4326_to_3414
WGS84 to SVY21 conversion
convert_3414_to_4326
SVY21 to WGS84 conversion
convert_3414_to_3857
SVY21 to Web Mercator conversion
convert_3857_to_4326
Web Mercator to WGS84 conversion
convert_3857_to_3414
Web Mercator to SVY21 conversion
get_all_themes_info
List all 100+ thematic layers
get_theme_info
Get info about a specific theme
check_theme_status
Check if theme was updated
retrieve_theme
Retrieve theme data
get_all_planning_areas
Get all 55 planning area polygons
get_planning_area_names
List planning area names
get_planning_area_by_location
Get planning area for a location
get_population_age_group
Population by age
get_ethnic_distribution
Ethnic group distribution
get_economic_status
Employment statistics
get_household_monthly_income
Income distribution
get_education_status
Education levels
get_nearby_mrt_stations
Find nearby MRT/LRT stations
get_nearby_bus_stops
Find nearby bus stops
get_static_map
Generate map images with overlays