Skip to content

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.

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_….

To add GIS.PH to your Claude Desktop app:

  1. Open your Claude configuration file (usually ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows).
  2. Add the following to your mcpServers section, using a remote / HTTP MCP connection to https://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.

In Cursor or IDEs supporting MCP:

  1. Go to Settings -> Features -> MCP.
  2. Click + Add New MCP Server.
  3. Name: GIS.PH
  4. Type: http (or Streamable HTTP if listed)
  5. URL: https://mcp.gis.ph/mcp

The client should prompt you to sign in the first time you use a signed-in tool.

The MCP server exposes the following tools to the AI. Parameter names match the api.gis.ph query or body fields they map to.

These tools work without sign-in. Geometry and non-JSON format values are stripped for anonymous callers.

ToolAPI routeParameters
get_regionsGET /v1/regionssearch (name, partial match), format, geometry, limit, page. Returns all regions (paginated; default limit 100 so they fit on one page).
get_regionGET /v1/regions/{id}region_code (required), format, geometry
get_provincesGET /v1/provincesregion (code or exact name), extent, format, geometry, limit, page
get_provinceGET /v1/provinces/{id}province_code (required), extent, format, geometry
get_municitiesGET /v1/municitiesprovince_code or province required (code preferred; name is exact, case-insensitive), scope (geographic default or admin), name (starts-with), format, geometry, limit, page
get_municityGET /v1/municities/{id}municity_code (required), format, geometry
get_barangaysGET /v1/barangaysmunicipality_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_barangayGET /v1/barangays/{id}barangay_code (required), format, geometry
search_municitiesGET /v1/municities/searchq (required, min 2 characters), limit (API default 20).
search_barangaysGET /v1/barangays/searchq (required, min 2 characters; tokens split on spaces and commas), limit (API default 20).

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.

ToolAPI routeParameters
search_regions_by_idsPOST /v1/regions/searchids required (not codes; max 100), format, geometry.
search_provinces_by_codesPOST /v1/provinces/searchcodes required (max 100), format, geometry.
search_municities_by_codesPOST /v1/municities/searchcodes required (max 1000), format, geometry.
search_barangays_by_codesPOST /v1/barangays/searchcodes required (max 500), format, geometry.
reverse_geocodeGET /v1/geocode/reverselat and lng required (WGS84), levels (comma-separated: region, province, municity, barangay; default all), geometry (point-in-polygon resolution; API default simple).

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.

ToolAPI routeParameters
list_datasetsGET /v1/datasetsvisibility (mine default, private, all, or public), include_features, limit, page
get_datasetGET /v1/datasets/{id}dataset_id (required)
list_featuresGET /v1/features—
get_featureGET /v1/features/{id}feature_id (required)
get_features_by_datasetGET /v1/features/dataset/{datasetId}dataset_id (required)

Shared options:

  • limit 1–100 (default 100) and page (default 1). List tools return the api.gis.ph envelope; use meta.total and meta.next to fetch further pages.
  • format: json (default) or geojson (bare GeoJSON FeatureCollection/Feature; geography lists are then unpaginated).
  • geometry: simple, medium, or detailed. On geography list and get tools, omitting it keeps JSON responses free of boundaries. On reverse_geocode, it is the point-in-polygon resolution (API default simple).
  • extent (provinces): administrative (API default, component LGUs only) or geographic (also HUC/ICC cities hosted by the province).

There are no places, politicians, or demographics tools yet.

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.