Use ImmigrationDB through MCP

A read-only MCP server exposes the same countries, cities, Visa routes, reports and sources used by the HTML and JSON release.

Current access

Read-only stdio server

The downloadable web snapshot is public. The MCP transport runs locally over stdio and never writes canonical data.

Snapshot
14,568 cities
Reports
44
Mode
Read only

Local setup

Run the server from the project root and point it at the exact snapshot generated with this site.

IMMIGRATIONDB_V2_SNAPSHOT_PATH=apps/immigrationdb-approved-static/public/mcp/snapshot.json node packages/mcp-server/index-v2.mjs

The transport is stdio. Configure your MCP client with the same command and working directory; no HTTP endpoint or API key is required.

Available tools

Seven bounded tools cover discovery and retrieval. Missing records return an explicit error instead of a guessed answer.

ToolInputReturns
search_destinationsqueryFind country and city identities.
get_citycountry, slugReturn one city with facts and provenance.
get_countryccReturn country facts, featured cities and legal-route handoffs.
search_visa_routesdestination, purpose?Find sourced route families without filling unknowns.
get_legal_routedestination, route_idReturn one route and its official source.
list_reportscategory?List published report datasets.
get_reportreport_idReturn report rows, method and source ledger.

Stable resource URIs

immigrationdb://catalogCounts and discoverable resources.
immigrationdb://country/deCountry record and route handoffs.
immigrationdb://city/de/berlinCity facts with source metadata.
immigrationdb://report/germany-warmest-citiesReport rows, method and sources.

Example requests

Find a city

{ "tool": "get_city", "arguments": { "country": "lv", "slug": "riga" } }

Find a route

{ "tool": "search_visa_routes", "arguments": { "destination": "de", "purpose": "work" } }

Open a report

{ "tool": "get_report", "arguments": { "report_id": "germany-warmest-cities" } }

Response contract

Every response carries the snapshot ID, generation date and canonical origin. Facts retain value, unit, geographic grain, observation date, verification date, source ID, source URL and grade.

  • Unknown or blocked values are not synthesized.
  • HTML, JSON, Markdown and MCP use the same canonical identifiers.
  • Data-only records stay outside public discovery.
  • Errors include the requested identifier and snapshot ID.

Inspect the raw contract

Use the snapshot for complete discovery or the JSON catalog for web-resource paths.