Connect the gis.ph MCP
The GIS.PH MCP server lets an AI app look up Philippine regions, provinces, cities and municipalities, and barangays. Every client connects to the same URL:
https://mcp.gis.ph/mcpThe server uses Streamable HTTP and OAuth 2.1. You don’t paste an API key anywhere. The first time you use a tool that needs an account, your app sends you to sign in to gis.ph, you allow access, and you’re sent back.
The tools and their parameters are listed on the MCP page.
What works without signing in
Section titled “What works without signing in”You can connect without an account. These tools work anonymously:
| Works without sign-in | Needs sign-in |
|---|---|
get_regions, get_region | reverse_geocode |
get_provinces, get_province | search_regions_by_ids |
get_municities, get_municity | search_provinces_by_codes |
get_barangays, get_barangay | search_municities_by_codes |
search_municities, search_barangays (name search) | search_barangays_by_codes |
list_datasets, get_dataset | |
list_features, get_feature, get_features_by_dataset |
- Anonymous calls return JSON only. Boundary geometry (
geometry,format=geojson) needs sign-in. - If you call a sign-in tool without signing in, the server answers
401with aWWW-Authenticateheader. Your app uses that to start sign-in, and the error tells you which tool needs it: “Sign in to gis.ph to use reverse_geocode. Boundary tools (regions, provinces, municities, barangays) work without sign-in.” - Signed in, the server is read-only. On the API, the batch lookups (
POST /v1/{regions,provinces,municities,barangays}/search) count asread:boundariesreads. Write tools (create_dataset,update_dataset,create_feature) are turned off and don’t appear in the tool list.
| Caller | Rate limit |
|---|---|
| Signed in | 300 requests per minute per user |
| Anonymous | 30 requests per minute per client |
For anonymous calls, the client is worked out from the IP address that connects to mcp.gis.ph. Claude custom connectors connect from Anthropic’s servers, not your computer, so anonymous use through them can share a limit with other people. Sign in if you use it regularly.
How sign-in works
Section titled “How sign-in works”The steps are the same in every client:
- You add
https://mcp.gis.ph/mcpto your app. - The app finds the sign-in server (
https://api.gis.ph) fromhttps://mcp.gis.ph/.well-known/oauth-protected-resource. - Your browser opens. If you’re not signed in to gis.ph, you land on dashboard.gis.ph/sign-in. Sign in with your gis.ph account. New accounts use an invite; see Get your API Key.
- You land on the consent page, Allow <app> to use GIS.PH?. It shows the account you’re signed in with and what the app can do: read boundary data, and read your datasets and features. It can’t create, change or delete anything. Click Allow (or Deny).
- The browser goes back to your app, which is now connected.
Your app refreshes access on its own. Access tokens last 1 hour and the sign-in lasts up to 30 days without use (90 days at most), then you sign in again.
The examples below name the server gisph. Any name works.
Claude (claude.ai and Claude Desktop)
Section titled “Claude (claude.ai and Claude Desktop)”Claude.ai and the Claude Desktop app share custom connectors through your Claude account. The connection comes from Anthropic’s servers, not your computer. Custom connectors are available on the Free (one connector), Pro, Max, Ultra, Team and Enterprise plans.
- Go to Customize › Connectors.
- Click + Add, then Add custom connector.
- Enter a name, for example
GIS.PH, and the URLhttps://mcp.gis.ph/mcp. Click Continue. - Review the authentication Claude detected and click Continue.
- Under Authentication, pick Sign in now or Sign in when needed. No sign in works for the anonymous tools only.
- Under OAuth client, pick Register automatically. If that fails, pick Use your own OAuth client and enter the client ID
gisph-mcpwith no client secret. Don’t pick Use Claude’s published identity: gis.ph doesn’t accept it yet. - Click Add, then Connect. Sign in to gis.ph and click Allow on the consent page. Claude opens again with the connector connected.
On Team and Enterprise plans, an owner adds the connector under Organization settings › Connectors. Each member then clicks Connect under Customize › Connectors and signs in with their own gis.ph account.
You can turn the connector on or off for a chat from the + button › Connectors.
claude_desktop_config.json is only for local servers. Add gis.ph as a custom connector instead.
Source: Get started with custom connectors using remote MCP (Claude Help Center).
Claude Code
Section titled “Claude Code”claude mcp add --transport http gisph https://mcp.gis.ph/mcpThen sign in:
- In Claude Code, run
/mcp, selectgisphand sign in. Or runclaude mcp login gisphin your shell. - Your browser opens. Sign in to gis.ph and click Allow.
- The browser hands the sign-in back to Claude Code on
localhost. If that fails, paste the full URL from the browser’s address bar into the prompt in Claude Code.
Without a local browser (SSH, or Linux with no display), claude mcp login gisph --no-browser prints the URL to open on another machine.
Add --scope project to share the server in the project’s .mcp.json, or --scope user to use it in all your projects.
Source: Connect Claude Code to tools via MCP (Claude Code docs).
Cursor
Section titled “Cursor”Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{ "mcpServers": { "gisph": { "url": "https://mcp.gis.ph/mcp" } }}- Open Customize, find
gisphand connect it. Cursor opens your browser. - Sign in to gis.ph and click Allow.
- The browser returns to Cursor, through
http://localhost:8787/callbackor Cursor’s web callback page, and the server’s tools show up.
If sign-in fails with a redirect_uri … not allowed error, your Cursor version probably still registers the old cursor:// callback, which gis.ph doesn’t accept. Update Cursor. You can also set the gis.ph client ID so Cursor skips registration and uses its localhost callback:
{ "mcpServers": { "gisph": { "url": "https://mcp.gis.ph/mcp", "auth": { "CLIENT_ID": "gisph-mcp" } } }}Cloud Agents keep their own sign-in. Connect them at cursor.com/agents.
Source: Model Context Protocol (MCP) (Cursor docs).
VS Code and GitHub Copilot
Section titled “VS Code and GitHub Copilot”VS Code registers several callback addresses at once, and gis.ph rejects one of them (https://vscode.dev/redirect). Set the gis.ph client ID so VS Code skips registration.
Guided setup: run Chat: Open Customizations, select MCP Servers, then Add Server (+). Choose HTTP, enter https://mcp.gis.ph/mcp and the server ID gisph, then Global › Copilot Global. Then open the entry (Other Properties) and add oauthClientId.
Or edit the file. It’s ~/.copilot/mcp-config.json for all your workspaces, or .mcp.json at the workspace root to share with a team:
{ "mcpServers": { "gisph": { "type": "http", "url": "https://mcp.gis.ph/mcp", "oauthClientId": "gisph-mcp", "tools": ["*"] } }}On older setups that use .vscode/mcp.json, the same entry is:
{ "servers": { "gisph": { "type": "http", "url": "https://mcp.gis.ph/mcp", "oauth": { "clientId": "gisph-mcp" } } }}There’s no client secret. If VS Code offers Set Client Secret, skip it.
- Start the server, or ask Copilot something that uses it. When prompted, use Authenticate in the server’s actions.
- Your browser opens. Sign in to gis.ph and click Allow.
- The browser returns to VS Code on
http://127.0.0.1. Keep VS Code open until it does, and use a browser on the same computer. This is for the VS Code desktop app. VS Code for the Web (vscode.dev) returns throughhttps://vscode.dev/redirect, which gis.ph doesn’t accept yet.
Sources: Add and use MCP servers in VS Code and the MCP configuration reference (VS Code docs).
ChatGPT
Section titled “ChatGPT”ChatGPT can’t sign in to gis.ph yet. ChatGPT returns to its own callback address on chatgpt.com, and gis.ph doesn’t allow that address yet, so sign-in stops with redirect_uri is missing or not allowed.
ChatGPT adds custom MCP servers from the Plugins page (+ › Add custom MCP server) on ChatGPT web. OpenAI’s help page gives full MCP support to Business and Enterprise/Edu plans, and read-only (read/fetch) tools to Pro. On Business, only admins and owners can add a server. You can add https://mcp.gis.ph/mcp with No authentication for the anonymous boundary tools, but the anonymous limit is shared by everyone who connects through ChatGPT. This page will be updated when ChatGPT sign-in works.
Sources: Connecting custom MCP servers in ChatGPT (OpenAI Help Center) and Authentication (OpenAI developer docs).
Moving from ?key=
Section titled “Moving from ?key=”URLs like https://mcp.gis.ph/mcp?key=gis_sk_… no longer work. The server rejects them with 401, even if the key is valid:
API keys in the URL (?key=) are no longer accepted. Connect with OAuth, or send the key in the x-api-key header or as Authorization: Bearer gis_sk_…
-
AI apps: remove the old server or connector and add
https://mcp.gis.ph/mcpagain as shown above. Then delete the old key in the dashboard if nothing else uses it. Keys in URLs end up in logs and connector settings. -
Scripts and headless clients: keep your API key, but send it in a header:
x-api-key: gis_sk_…or
Authorization: Bearer gis_sk_…For example, in Claude Code:
Terminal window claude mcp add --transport http gisph https://mcp.gis.ph/mcp --header "x-api-key: $GISPH_API_KEY"API-key calls use the key’s own scopes and limits. Write tools are still turned off on the MCP server. Don’t commit keys to shared config files.
Troubleshooting
Section titled “Troubleshooting”401 and “Sign in to gis.ph to use …”
Section titled “401 and “Sign in to gis.ph to use …””You called a sign-in tool while connected anonymously. Sign in from your app. In Claude Code that’s /mcp or claude mcp login gisph; in Claude, Connect under Customize › Connectors; in Cursor, connect the server under Customize; in VS Code, use Authenticate. Boundary tools keep working until you do.
401 with error="invalid_token"
Section titled “401 with error="invalid_token"”The app sent an access token that is expired, revoked or not from gis.ph, or an API key in the URL. The WWW-Authenticate header gives the reason (error_description). Apps normally refresh tokens on their own. If they can’t, sign in again:
| Client | Sign in again |
|---|---|
| Claude / Claude Desktop | Customize › Connectors, remove the connector and add it again. To edit a connector you also remove it and add it again. |
| Claude Code | /mcp › gisph › Re-authenticate, or claude mcp logout gisph then claude mcp login gisph. |
| Cursor | Log out of gisph in Customize and connect again. Cloud Agents sign in separately, on the server’s Cloud row. |
| VS Code | Use Authenticate in the server’s actions, or uninstall the server under Chat: Open Customizations › MCP Servers and add it again. |
A sign-in lasts up to 30 days without use and 90 days at most. After that, sign in again. If a sign-in is revoked, the app can’t refresh it, but its current access token works until it expires (up to 1 hour).
redirect_uri is missing or not allowed / invalid_redirect_uri
Section titled “redirect_uri is missing or not allowed / invalid_redirect_uri”The sign-in server doesn’t accept your app’s callback address. It accepts claude.ai, Cursor (www.cursor.com and localhost) and local localhost / 127.0.0.1 callbacks. For Cursor and VS Code, set the client ID gisph-mcp as shown above. ChatGPT isn’t supported yet.
invalid_client / unknown client_id
Section titled “invalid_client / unknown client_id”The app sent a client ID that gis.ph doesn’t know. Use automatic registration, or the client ID gisph-mcp with no secret.
503 temporarily_unavailable
Section titled “503 temporarily_unavailable”The sign-in service can’t be reached for a moment. Wait a few seconds and try again.
Rate limits
Section titled “Rate limits”Signed-in users get 300 requests per minute, and anonymous clients get 30. Over the limit, calls fail with RATE_LIMIT_EXCEEDED until the minute is up. Sign in for the higher limit.
Check the server yourself
Section titled “Check the server yourself”curl -s https://mcp.gis.ph/.well-known/oauth-protected-resourcecurl -s https://api.gis.ph/.well-known/oauth-authorization-serverThe first should list "authorization_servers":["https://api.gis.ph"].