MCP Server for Tax ID Validation

Tax ID Pro provides a hosted Model Context Protocol (MCP) server so AI agents and MCP-compatible clients can validate tax ID numbers without calling the REST API directly. The server speaks Streamable HTTP and uses the same API keys, country codes, and validation rules as the rest of Tax ID Pro.

The MCP endpoint is https://mcp.taxid.pro/mcp. Visiting https://mcp.taxid.pro in a browser shows a short landing page; agents should connect to the /mcp path.

This guide covers connecting a client, authenticating, and using each available tool. For the underlying HTTP API, see Getting Started and Tax ID Validation.


What you can do
  • Validate a single tax ID with validate_tin
  • Validate up to 1,000 tax IDs at once with validate_batch
  • Validate rows from CSV text with validate_csv

Validation uses the same rules, country codes, and plan limits as the REST API. Results include whether the number is valid, an optional message for invalid input, and compact/standard forms when valid.


Step 1: Create an Account and API Key

Sign up for a trial account if you do not already have one, then open your settings page and copy an API key. Treat the key like a password. The MCP server authenticates with the same keys as the REST API—see Authentication for details on generating and rotating keys.


Step 2: Connect Your MCP Client

Point your MCP client at the Streamable HTTP URL and send your API key in the Authorization header as a Bearer token. Example configuration for Cursor (or other clients that accept a remote URL plus headers):

{
  "mcpServers": {
    "tax-id-pro": {
      "url": "https://mcp.taxid.pro/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with your Tax ID Pro key. Do not put the key in client-side or public configuration files that others can read.

After connecting, the client should discover three tools: validate_tin, validate_batch, and validate_csv. Usage counts against your plan the same way as equivalent REST validation requests.


Tool: validate_tin

Validates one tax ID. This mirrors a single GET /validate request.

Example arguments:

{
  "country": "ca",
  "tin": "365742618",
  "type": "individual"
}

Example successful result:

{
  "is_valid": true,
  "message": null,
  "tin_compact": "365742618",
  "tin_standard": "365 742 618",
  "country_name": "Canada",
  "format_name": "Social Insurance Number"
}

When the number is invalid, is_valid is false and message explains the problem (for example, too short or failed checksum). Compact and standard forms are returned only for valid numbers.


country string required

Two-letter ISO country code (lowercase preferred), such as us, au, or de.

tin string required

The tax identification number to validate. Formatting characters are usually accepted; see the validation guide for details.

type string optional default: any

Narrows which formats are tried: any, individual, entity, or vat. Using any (or omitting type) tests all available formats for the country.

locale string optional default: en

Language for the message field when validation fails. Supports the same values as the REST API (including auto).

is_irs boolean optional default: false

Set to true if you are using IRS country codes instead of ISO codes.


Tool: validate_batch

Validates many tax IDs in one tool call—up to 1,000 items (limit of 10 on free trial accounts), matching the batch validation API. Prefer this over many separate validate_tin calls.

Pass an items array. Each item needs a reference_id (your own identifier, echoed in the response), country, tin, and optional type.

Example arguments:

{
  "items": [
    {
      "reference_id": "1",
      "country": "it",
      "tin": "MRTMTT91D08F205J",
      "type": "individual"
    },
    {
      "reference_id": "2",
      "country": "gb",
      "tin": "2955839665",
      "type": "individual"
    },
    {
      "reference_id": "3",
      "country": "za",
      "tin": "912345678",
      "type": "individual"
    }
  ]
}

The result is an array of validation objects, each including reference_id, is_valid, message, compact/standard forms when valid, and error_code when a country or type is unsupported.


items array required

List of tax IDs to validate. Maximum 1,000 items (10 on trial).

items[].reference_id string required

Your identifier for matching results back to the original row or record.

items[].country string required

Two-letter country code for that item.

items[].tin string required

Tax ID number for that item.

items[].type string optional default: any

any, individual, entity, or vat.

locale string optional default: en

Message language for the whole batch.

is_irs boolean optional default: false

Use IRS country codes for every item in the batch.


Tool: validate_csv

Accepts CSV text (not a file upload) and validates each data row. This covers the same workflow as spreadsheet check in the web app, adapted for agents that can pass CSV as a string.

Expected header columns: reference_id, country, type, and tin. type may be omitted (defaults to any). If reference_id is omitted, the row index is used.

Example CSV text:

reference_id,country,type,tin
1,it,individual,MRTMTT91D08F205J
2,gb,individual,2955839665
3,za,individual,912345678

csv_text string required

Full CSV document including a header row and one or more data rows.

locale string optional default: en

Message language for failed validations.

is_irs boolean optional default: false

Use IRS country codes for every row.


Errors and authentication failures

If the client omits the Authorization header, tools return an error payload explaining that a Bearer API key is required. Invalid keys or plan limits (expired plan, no free requests remaining, batch too large for trial) surface as upstream API errors with a status code and message—the same conditions as calling v3.api.taxid.pro directly.


Supported countries

Country and format coverage matches the REST API. Browse the supported countries list for ISO codes and available types.


Need help?

If you need assistance connecting an agent or choosing between the REST API and MCP, contact us.

Check Tax IDs for Over 100 Countries

See all supported countries or search for a country here: