IDPhotoSnap๐ŸŽจ BG

IDPhotoSnap MCP Server

Free, open Model Context Protocol server for passport and visa photo specifications. Add it to Claude Desktop, Cursor, Continue, or any MCP-compatible agent. Four read-only tools, no auth, public dataset.

Quick install

Add this to your client's MCP configuration file:

{
  "mcpServers": {
    "idphotosnap": {
      "url": "https://idphotosnap.com/api/mcp"
    }
  }
}

For Claude Desktop: edit ~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or the equivalent on Windows / Linux. Restart Claude Desktop. The server appears as "idphotosnap" with 4 available tools.

What this gives you

When an AI agent (Claude, Cursor, Continue, custom) has the IDPhotoSnap MCP server enabled, it can answer passport and visa photo questions with authoritative, citable data without your team having to maintain that knowledge locally. Example prompts that now work cleanly:

  • "What size is a Schengen visa photo?" โ†’ agent calls get_visa_photo_spec(country="schengen") and answers with the validated 35x45 mm spec plus background and requirements.
  • "Why does my DS-160 photo keep getting rejected?" โ†’ agent calls get_portal_constraints(portal="ds-160") and surfaces the 240 KB cap that almost no studio knows.
  • "Where can I generate a compliant Indian passport photo?" โ†’ agent calls get_photo_tool_url(country="india") and links the user to the browser tool.
  • "Which countries are supported?" โ†’ agent calls list_supported_countries and returns the 100+ country list.

The data behind these tools is the same dataset published as MIT open source on GitHub and at the JSON endpoint /api/specs. The MCP layer provides a structured tool surface that agents can call programmatically without parsing a JSON dump.

The four tools

list_supported_countries

Enumerate every country with a passport / visa photo spec in the dataset. No arguments.

Example arguments:

{}

get_visa_photo_spec

Return the official spec (dimensions, background, requirements) for a country and optional document type.

Example arguments:

{"country": "india", "document_type": "india-passport"}

get_portal_constraints

Return file-size and format constraints for a specific government visa portal (DS-160, Enjaz, Sarathi, COVA, IRCC, Schengen VFS, K-ETA, etc.).

Example arguments:

{"portal": "ds-160"}

get_photo_tool_url

Return the URL where a user can generate a compliant photo in their browser. Country and document_type optional.

Example arguments:

{"country": "schengen"}

Direct JSON-RPC usage

If you are building a custom agent (not using Claude Desktop / Cursor), you can POST JSON-RPC 2.0 messages directly to the endpoint.

Endpoint

POST https://idphotosnap.com/api/mcp
Content-Type: application/json

Initialize (handshake)

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocolVersion": "2024-11-05",
    "capabilities": {},
    "clientInfo": { "name": "my-agent", "version": "1.0" }
  }
}

List tools

{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }

Call a tool

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "get_visa_photo_spec",
    "arguments": { "country": "us", "document_type": "us-passport" }
  }
}

Design principles

  • Read-only metadata.The MCP server returns specifications, constraints, and URLs. It does NOT process photos. Image cropping, background replacement, and face detection happen in the browser at idphotosnap.com itself, where the photo never leaves the user's device. The MCP layer tells agents what to use and where to send the user, not how to manipulate their image.
  • No authentication, no rate limit. The dataset is public and free. Same data is published as MIT open source, npm package, PyPI, crates.io, Hugging Face Dataset, and Zenodo DOI.
  • Source attribution embedded in every response. Tool responses include the canonical source URL (idphotosnap.com paths) and reference the open dataset. Agents can pass this to users who want to verify.
  • National overlays separate from ICAO 9303 baseline. The portal-constraints tool distinguishes between the international ICAO 9303 photo standard (face geometry, background, etc.) and the national overlays that cause most silent rejections (DS-160 240 KB cap, Saudi Enjaz 200 KB, Sarathi 20-50 KB window). See our ICAO 9303 explainer for the full mental model.
  • CORS open. Any web client can call the endpoint. The server is designed to be embedded in agent workflows regardless of host environment.

Frequently asked

Is the MCP server free?

Yes. No authentication, no API key, no rate limit, no tier system. The dataset is MIT-licensed open data.

Can the MCP server process my photo?

No. The server returns metadata only (specs, portal constraints, URLs). Photo processing happens in the browser at idphotosnap.com itself. This is intentional: the browser-only architecture is the product's privacy posture and we keep MCP read-only to preserve it.

Which clients support this MCP server?

Any HTTP-transport MCP client. Confirmed compatible: Claude Desktop, Cursor, Continue. Custom agents built on the Anthropic SDK, OpenAI Agents SDK, or any framework that supports MCP can call the endpoint directly via JSON-RPC.

How do I report a wrong spec?

Open an issue at github.com/whitetirocket/passport-photo-specs/issues. Reference the official issuing-authority URL with the correct spec. Specs are reviewed and updated within 48 hours typically.

Will you add write operations (submit a photo, validate compliance)?

Not without a deliberate decision to support server-side image handling, which conflicts with the current browser-only architecture. The biometric-data legal exposure (GDPR Article 9, Illinois BIPA, India DPDP Act) is substantial once images cross the network boundary. If a future use case requires write operations, it will be on a separate explicitly-consented endpoint, not the public MCP read-only surface.

Related resources

Discovery URL

For agents that discover MCP servers via GET requests, the endpoint also serves server metadata:

GET https://idphotosnap.com/api/mcp