Model Context Protocol (MCP)
The Model Context Protocol (MCP) is an open standard that enables AI models (like Claude, GPT-4, or those within Cursor) to securely access local or remote tools and data.
GIS.PH provides a dedicated MCP server that allows your AI assistant to query geographical data, manage datasets, and search for locations in the Philippines directly within your chat or IDE.
Getting Started
Section titled “Getting Started”Connect your MCP client to:
https://mcp.gis.ph/mcp
Step-by-step setup for Claude, Claude Code, Cursor, VS Code / GitHub Copilot and ChatGPT, with sign-in, migration from ?key= and troubleshooting, is in Connect the gis.ph MCP.
The server is an OAuth 2.1 protected resource. Boundary tools (regions, provinces, municities, and barangays, including name search) work without sign-in. Dataset tools, batch lookup by ids or codes, and reverse_geocode prompt the client to sign in. Write tools are disabled in this release.
API keys are no longer accepted in the URL (?key=). If you use a GIS.PH API key instead of OAuth, send it in the x-api-key header or as Authorization: Bearer gis_sk_….
Integration Guides
Section titled “Integration Guides”Claude Desktop
Section titled “Claude Desktop”To add GIS.PH to your Claude Desktop app:
- Open your Claude configuration file (usually
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS or%APPDATA%\Claude\claude_desktop_config.jsonon Windows). - Add the following to your
mcpServerssection, using a remote / HTTP MCP connection tohttps://mcp.gis.ph/mcp(no?key=).
Note: The GIS.PH MCP server uses Streamable HTTP. If your client supports remote MCP, add it as a remote server so Claude can complete the OAuth sign-in when a signed-in tool is used. Do not put an API key in the URL.
Cursor / VS Code
Section titled “Cursor / VS Code”In Cursor or IDEs supporting MCP:
- Go to Settings -> Features -> MCP.
- Click + Add New MCP Server.
- Name:
GIS.PH - Type:
http(or Streamable HTTP if listed) - URL:
https://mcp.gis.ph/mcp
The client should prompt you to sign in the first time you use a signed-in tool.
Available Tools
Section titled “Available Tools”The MCP server exposes the following tools to the AI. Parameter names match the api.gis.ph query or body fields they map to.
Location data (anonymous)
Section titled “Location data (anonymous)”These tools work without sign-in. Geometry and non-JSON format values are stripped for anonymous callers.
| Tool | API route | Parameters |
|---|---|---|
get_regions | GET /v1/regions | search (name, partial match), format, geometry, limit, page. Returns all regions (paginated; default limit 100 so they fit on one page). |
get_region | GET /v1/regions/{id} | region_code (required), format, geometry |
get_provinces | GET /v1/provinces | region (code or exact name), extent, format, geometry, limit, page |
get_province | GET /v1/provinces/{id} | province_code (required), extent, format, geometry |
get_municities | GET /v1/municities | province_code or province required (code preferred; name is exact, case-insensitive), scope (geographic default or admin), name (starts-with), format, geometry, limit, page |
get_municity | GET /v1/municities/{id} | municity_code (required), format, geometry |
get_barangays | GET /v1/barangays | municipality_code (enough on its own), municipality (name, starts-with), province_code, province (exact name), name (barangay, starts-with), format, geometry, limit, page. municity_code is a deprecated alias of municipality_code. format=geojson needs municipality_code or municipality. |
get_barangay | GET /v1/barangays/{id} | barangay_code (required), format, geometry |
search_municities | GET /v1/municities/search | q (required, min 2 characters), limit (API default 20). |
search_barangays | GET /v1/barangays/search | q (required, min 2 characters; tokens split on spaces and commas), limit (API default 20). |
Location data (signed-in)
Section titled “Location data (signed-in)”These tools require OAuth sign-in or an API key. On the API they use the read:boundaries scope. Anonymous callers receive HTTP 401 and a WWW-Authenticate challenge.
| Tool | API route | Parameters |
|---|---|---|
search_regions_by_ids | POST /v1/regions/search | ids required (not codes; max 100), format, geometry. |
search_provinces_by_codes | POST /v1/provinces/search | codes required (max 100), format, geometry. |
search_municities_by_codes | POST /v1/municities/search | codes required (max 1000), format, geometry. |
search_barangays_by_codes | POST /v1/barangays/search | codes required (max 500), format, geometry. |
reverse_geocode | GET /v1/geocode/reverse | lat and lng required (WGS84), levels (comma-separated: region, province, municity, barangay; default all), geometry (point-in-polygon resolution; API default simple). |
Datasets and features (signed-in)
Section titled “Datasets and features (signed-in)”These tools also require OAuth sign-in or an API key. Write tools (create_dataset, update_dataset, create_feature) are disabled in this release and are hidden from tools/list.
| Tool | API route | Parameters |
|---|---|---|
list_datasets | GET /v1/datasets | visibility (mine default, private, all, or public), include_features, limit, page |
get_dataset | GET /v1/datasets/{id} | dataset_id (required) |
list_features | GET /v1/features | — |
get_feature | GET /v1/features/{id} | feature_id (required) |
get_features_by_dataset | GET /v1/features/dataset/{datasetId} | dataset_id (required) |
Shared options:
limit1–100 (default 100) andpage(default 1). List tools return the api.gis.ph envelope; usemeta.totalandmeta.nextto fetch further pages.format:json(default) orgeojson(bare GeoJSON FeatureCollection/Feature; geography lists are then unpaginated).geometry:simple,medium, ordetailed. On geography list and get tools, omitting it keeps JSON responses free of boundaries. Onreverse_geocode, it is the point-in-polygon resolution (API defaultsimple).extent(provinces):administrative(API default, component LGUs only) orgeographic(also HUC/ICC cities hosted by the province).
There are no places, politicians, or demographics tools yet.
Why use MCP?
Section titled “Why use MCP?”Instead of copy-pasting JSON data or manually searching for PSGC codes, you can simply ask your AI:
- “List all provinces in Region IV-A”
- “Search for municipalities named Tagbilaran”
- “Which city and barangay is 10.3157, 123.8854 in?”
The AI will automatically use the appropriate GIS.PH tools to fetch the data and provide you with an answer.