Skip to Content
teigeodata
Servers

MCP server

tgd mcp gives AI agents teigeodata's queries as MCP tools, offline, with attribution on every answer.

The Model Context Protocol lets an AI agent call tools. tgd mcp gives it every teigeodata query as a tool: an agent can geocode a place, find what is at a point, read a timezone or a height, and get the right answer from local packs instead of guessing, with no API key and no network.

Connect a client

The client starts the server itself over standard input and output:

claude mcp add teigeodata -- tgd mcp --pack /path/to/world-np-lite.tgd

The server speaks MCP 2026-07-28 and 2025-11-25, and older clients too.

Tools

Every tool but install is read-only (readOnlyHint), declares its output schema, and returns the same JSON as structured content and as text, with the attribution of the packs that answered.

ToolWhat it answers
searchPlaces matching a name, best first; "Name, Parent" and a focus point as in the API.
reverseThe places nearest a point, with distance and bearing.
nearbyThe places nearest a place.
get_placeOne place by its ID, optionally with every name it has.
lookupPlaces by ID, in the order asked.
admin_atThe admin units holding a point, country first.
hierarchyA place's ancestors up to its country.
childrenA place's children, such as a country's provinces.
timezoneThe IANA zone of a place or at a point, with its offset and abbreviation.
elevationThe terrain height at a point.
postalPostal codes to places, by prefix, or at a point.
boundaryA unit's outline: a summary, and the GeoJSON as a resource.
distanceThe distance and bearing between two points or places.
packsThe packs served, with their components and attribution.
coverageThe catalog's packs that cover a point (a server over a store).
install, install_statusInstall catalog packs into the store, after the person confirms the size (a server over a store that allows it).

Every argument, bound and answer field is in the MCP tools reference.

Long answers are paged with signed cursors, so an agent can never be handed more than its context can hold. Packs and places are also resources: teigeodata://dataset/…, teigeodata://place/… and teigeodata://boundary/….

Installs

Over a store, tgd mcp lists install and install_status, so an agent that finds a place outside the installed packs can offer to download its country. The person confirms the size through the client (elicitation) before a byte is fetched; with a client that cannot ask, the call installs only up to its own max_bytes (100 MB when left out), and a larger download answers with the size and asks the agent to call again with max_bytes raised to it. tgd mcp --no-install leaves the tools out; tgd serve lists them only with --allow-install.

Try it

Ask your agent things like:

  • "What's the timezone and the elevation of Namche Bazaar?"
  • "Which district and province is 28.2096, 83.9856 in?"
  • "List the provinces of Nepal with their ISO codes."
  • "How far is Pokhara from Kathmandu as the crow flies?"

The agent calls search, timezone, elevation, admin_at, children and distance, and answers from the packs, citing their sources.

On this page