MCP.so
Sign In
P

PSGC MCP Server

@GodModeArch

Basic information

Category

Other

Last updated

Transports

stdio

Author

GodModeArch

Submitted by

GodModeArch

About PSGC MCP Server

A Model Context Protocol server that provides Philippine Standard Geographic Code (PSGC) data to LLMs. Built on Cloudflare Workers with KV storage.

#tpyescript#mcp#psgc-mcp#geographic-data#philippines#psgc

PSGC MCP Server config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "psgc": {
      "url": "https://psgc.godmode.ph/mcp"
    }
  }
}

PSGC MCP Server tools

7

Look up a Philippine geographic entity by its 10-digit PSGC code. Returns the full entity record including name, level, parent, population, and classification data.

Search Philippine geographic entities by name. Supports partial matching. Use the level filter to narrow results (e.g. only cities, only provinces). For barangay searches, include the parent city/municipality name to get better results.

Get the full administrative hierarchy for a PSGC entity. Returns the chain from the entity up through its parent city/municipality, province, and region.

List the direct children of a PSGC entity. For a region, returns provinces/districts. For a province, returns cities/municipalities. For a city/municipality, returns barangays. Optionally filter by level. Paginated (default limit: 50).

List all PSGC entities of a given geographic level. Barangay (Bgy) is excluded because there are 42,000+ barangays. To find barangays, use 'search' with a name query or 'list_children' on a city/municipality. Paginated (default limit: 50).

Look up multiple PSGC entities in one call. Pass an array of 10-digit codes (max 50). Returns results in the same order as input, with null for codes not found.

Query PSGC entities by population range. Returns entities sorted by population. Useful for finding the largest/smallest cities, municipalities, or provinces. Barangay queries require a parent_code to narrow scope.

Overview

What is PSGC MCP Server?

A Model Context Protocol (MCP) server that provides Philippine Standard Geographic Code (PSGC) data to LLMs. Built on Cloudflare Workers with KV storage, it is public, read-only, and requires no authentication. Data is sourced from the Philippine Statistics Authority (PSA) quarterly publication.

How to use PSGC MCP Server?

Add the server URL https://psgc.godmode.ph/mcp to your MCP client configuration. No authentication or API key is needed. Use the available tools (e.g., lookup, search, get_hierarchy) via standard MCP calls. A quick test with curl is provided in the README.

Key features of PSGC MCP Server

  • 8 tools: lookup, search, hierarchy, children, by type, batch, population query
  • Data includes regions, provinces, cities, municipalities, and barangays
  • Public, read-only, no authentication required
  • Built on Cloudflare Workers for low-latency global access
  • Supports strict search and batch operations (up to 50 codes)
  • All responses wrapped in metadata envelope with dataset version

Use cases of PSGC MCP Server

  • Look up any geographic entity by its 10-digit PSGC code
  • Search for places by name with optional level filter and strict mode
  • Get the full administrative chain from barangay to region
  • Query entities by population range (e.g., largest cities in a region)
  • Batch lookup of multiple PSGC codes in a single request

Frequently asked questions

1

How often is the data updated?

Data is sourced from the PSA’s quarterly PSGC publication and cached in Cloudflare KV. If data appears stale, users can open an issue to request an unscheduled refresh.

2

Do I need authentication or an API key?

No. The server is public, read-only, and requires no authentication. Simply point your MCP client to the URL.

3

What geographic levels are available?

Eight levels: Reg (18), Prov (82), Dist (4), City (149), Mun (1,493), SubMun (16), SGU (~8), and Bgy (~42,000). Special cases include NCR districts and BARMM Special Geographic Units.

4

How are response data structured?

All data responses are wrapped in `{ _meta, data }` where `_meta` includes dataset version, date, source, and last synced timestamp. Error responses are returned as plain text without wrapping.

5

What is the PSGC code format?

A 10-digit code with leading zeros significant. Segments encode region, province, city/municipality, and barangay. The README documents known edge cases (e.g., NCR districts, Cotabato City, BARMM SGUs).

Comments

More Other MCP servers