{
  "markdown": "# @apitier/mcp-server\n\nMCP (Model Context Protocol) server exposing all APITier utility APIs as tools for AI agents.\n\nTwo integration modes:\n\n| Mode | Best for |\n| --- | --- |\n| **Hosted HTTP** — `https://mcp.apitier.com` | Anthropic connector directory, remote agents, server-to-server |\n| **stdio (npx)** — runs locally | Claude Desktop, Cursor, Windsurf, local agents |\n\nBoth modes use the same **MCP Key** — one key unlocks all your subscribed services.\n\n**Postman collection:** import the ready-made collection to test all endpoints instantly:\n[`https://raw.githubusercontent.com/apitier/apitier-mcp-server/main/postman/APITier%20MCP%20Server.postman_collection.json`](https://raw.githubusercontent.com/apitier/apitier-mcp-server/main/postman/APITier%20MCP%20Server.postman_collection.json)\n\nIn Postman: **Import → Link → paste URL → set `mcp_api_key` collection variable**.\n\n---\n\n## Tools Available\n\n### 🇬🇧 UK KYC Onboarding\n\n| Tool | Description |\n| --- | --- |\n| `kyc_onboard_uk` | **Full UK business onboarding check in one call.** Validates VAT, verifies Companies House, retrieves PSC (beneficial owners), and confirms the registered address. Returns `PASS / REVIEW / FAIL`, a risk score, and the full data bundle. Requires `postcode` + `vat` + `leadAgent` subscriptions. |\n\n**Example output:**\n\n```json\n{\n  \"decision\": \"PASS\",\n  \"risk_score\": 95,\n  \"flags\": [],\n  \"checks\": {\n    \"company\": { \"status\": \"active\", \"data\": { ... } },\n    \"psc\":     { \"status\": \"found\",  \"data\": { ... } },\n    \"vat\":     { \"status\": \"valid\",  \"data\": { ... } },\n    \"address\": { \"status\": \"verified\", \"data\": { ... } }\n  }\n}\n```\n\n---\n\n### 🇬🇧 UK Address & Property\n\n| Tool | Description |\n| --- | --- |\n| `verify_uk_address` | Verify a UK address against Royal Mail PAF — returns canonical address, UPRN, UDPRN, and per-delivery-point geocode |\n| `lookup_uprn` | Look up a full AddressBase record by UDPRN — returns UPRN, PAF canonical address, coordinates. Use UDPRN from `verify_uk_address` |\n| `lookup_uk_postcode` | UK postcode → full PAF address list + district, ward, county, country, and geocode |\n\n### 🇬🇧 UK Business & Compliance\n\n| Tool | Description |\n| --- | --- |\n| `verify_uk_company` | Look up a UK company on Companies House by name or number — status, address, SIC codes, filing health |\n| `get_company_psc` | Persons with Significant Control register for a UK company — required for AML beneficial ownership checks |\n| `validate_sort_code` | Validate a UK sort code and optionally a bank account number (Vocalink modulus check). No API key required. |\n\n### 🇬🇧🇪🇺 UK + EU VAT Compliance\n\n| Tool | Description |\n| --- | --- |\n| `validate_vat` | Validate UK and EU VAT numbers — checks HMRC for GB numbers, EU VIES for all other country prefixes. Returns registered business name and address. Accepts any country prefix (e.g. `GB123456789`, `DE123456789`, `FR12345678901`). |\n\n### 🌍 Global Identity\n\n| Tool | Description |\n| --- | --- |\n| `validate_email` | Validate email — syntax, MX, SMTP reachability, disposable domain check. Works for any email address globally. |\n| `validate_phone` | Validate and parse phone numbers — accepts any international format, returns country, carrier, and line type. |\n\n### 🇮🇳 India\n\n| Tool | Description |\n| --- | --- |\n| `lookup_india_pincode` | Indian PIN code → state / district / town |\n\n### 🌍 Utilities\n\n| Tool | Description |\n| --- | --- |\n| `generate_barcode` | Generate barcode image (Code128, EAN-13, UPC, and more) |\n| `generate_qrcode` | Generate QR code image with optional logo and colour |\n| `convert_data` | Convert between CSV, JSON, XML, YAML |\n\n---\n\n## Quick Start\n\n### 1. Get your MCP Key\n\nSign up at [apitier.com](https://apitier.com) → **Account → AI & MCP → Generate MCP Key**.\n\nYour MCP Key (`mcp_...`) automatically unlocks the tools for every APITier service you have subscribed to. No per-service configuration needed.\n\n---\n\n## Hosted HTTP Endpoint\n\n`POST https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY`\n\nPass your MCP Key as the `x-api-key` query parameter. The endpoint resolves your subscribed services and returns only the tools available to you.\n\n**Required headers:**\n\n```http\nContent-Type: application/json\nAccept: application/json, text/event-stream\n```\n\n**Test with curl:**\n\n```bash\ncurl -s -X POST 'https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: application/json, text/event-stream' \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}' | jq .\n```\n\n**Call a tool:**\n```bash\ncurl -s -X POST 'https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: application/json, text/event-stream' \\\n  -d '{\n    \"jsonrpc\": \"2.0\",\n    \"id\": 1,\n    \"method\": \"tools/call\",\n    \"params\": {\n      \"name\": \"verify_uk_company\",\n      \"arguments\": { \"q\": \"03977902\" }\n    }\n  }' | jq .\n```\n\n**Health check:**\n\n```bash\ncurl https://mcp.apitier.com/health\n```\n\n### Use with any HTTP MCP client\n\n```json\n{\n  \"mcpServers\": {\n    \"apitier\": {\n      \"url\": \"https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY\"\n    }\n  }\n}\n```\n\n---\n\n## Claude Desktop (stdio)\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n**With MCP Key (recommended — single key, all subscribed tools):**\n\n```json\n{\n  \"mcpServers\": {\n    \"apitier\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@apitier/mcp-server\"],\n      \"env\": {\n        \"APITIER_MCP_KEY\": \"mcp_your-key-here\"\n      }\n    }\n  }\n}\n```\n\n**With individual service keys (if you prefer explicit control):**\n\n```json\n{\n  \"mcpServers\": {\n    \"apitier\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@apitier/mcp-server\"],\n      \"env\": {\n        \"APITIER_POSTCODE_KEY\":     \"key-from-postcode-subscription\",\n        \"APITIER_LEAD_AGENT_KEY\":   \"key-from-lead-agent-subscription\",\n        \"APITIER_EMAIL_KEY\":        \"key-from-email-subscription\",\n        \"APITIER_PHONE_KEY\":        \"key-from-phone-subscription\",\n        \"APITIER_VAT_KEY\":          \"key-from-vat-subscription\",\n        \"APITIER_BARCODE_KEY\":      \"key-from-barcode-subscription\",\n        \"APITIER_CONVERT_DATA_KEY\": \"key-from-data-conversion-subscription\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop after saving. Only tools for your active subscriptions will appear.\n\n---\n\n## Cursor / Windsurf / VS Code\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"apitier\": {\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@apitier/mcp-server\"],\n        \"env\": {\n          \"APITIER_MCP_KEY\": \"mcp_your-key-here\"\n        }\n      }\n    }\n  }\n}\n```\n\n---\n\n## LangChain (Python)\n\n**stdio:**\n\n```python\nfrom mcp import ClientSession, StdioServerParameters\nfrom mcp.client.stdio import stdio_client\nfrom langchain_mcp_adapters.tools import load_mcp_tools\nfrom langgraph.prebuilt import create_react_agent\nfrom langchain_anthropic import ChatAnthropic\n\nasync def main():\n    server_params = StdioServerParameters(\n        command=\"npx\",\n        args=[\"-y\", \"@apitier/mcp-server\"],\n        env={\"APITIER_MCP_KEY\": \"mcp_your-key-here\"},\n    )\n\n    async with stdio_client(server_params) as (read, write):\n        async with ClientSession(read, write) as session:\n            await session.initialize()\n            tools = await load_mcp_tools(session)\n\n            model = ChatAnthropic(model=\"claude-sonnet-4-6\")\n            agent = create_react_agent(model, tools)\n\n            result = await agent.ainvoke({\n                \"messages\": \"Validate this email: test@example.com and look up postcode SW1A 1AA\"\n            })\n            print(result[\"messages\"][-1].content)\n```\n\n**HTTP endpoint:**\n\n```python\nfrom mcp import ClientSession\nfrom mcp.client.streamable_http import streamablehttp_client\n\nasync def main():\n    async with streamablehttp_client(\n        \"https://mcp.apitier.com/mcp?x-api-key=mcp_your-key-here\"\n    ) as (read, write, _):\n        async with ClientSession(read, write) as session:\n            await session.initialize()\n            tools = await load_mcp_tools(session)\n            # use tools with your agent...\n```\n\n---\n\n## Vercel AI SDK (TypeScript)\n\n**stdio:**\n\n```typescript\nimport { experimental_createMCPClient as createMCPClient } from \"ai\";\nimport { Experimental_StdioMCPTransport as StdioMCPTransport } from \"ai/mcp-stdio\";\nimport { anthropic } from \"@ai-sdk/anthropic\";\nimport { generateText } from \"ai\";\n\nconst mcp = await createMCPClient({\n  transport: new StdioMCPTransport({\n    command: \"npx\",\n    args: [\"-y\", \"@apitier/mcp-server\"],\n    env: { APITIER_MCP_KEY: process.env.APITIER_MCP_KEY! },\n  }),\n});\n\nconst tools = await mcp.tools();\n\nconst { text } = await generateText({\n  model: anthropic(\"claude-sonnet-4-6\"),\n  tools,\n  prompt: \"Verify this UK company: Google UK Limited\",\n});\n\nawait mcp.close();\n```\n\n**HTTP endpoint:**\n\n```typescript\nimport { experimental_createMCPClient as createMCPClient } from \"ai\";\n\nconst mcp = await createMCPClient({\n  transport: {\n    type: \"sse\",\n    url: `https://mcp.apitier.com/mcp?x-api-key=${process.env.APITIER_MCP_KEY}`,\n  },\n});\n\nconst tools = await mcp.tools();\n```\n\n---\n\n## Environment Variables\n\n| Variable | Description |\n| --- | --- |\n| `APITIER_MCP_KEY` | **Recommended.** Single MCP Key from account page — resolves all subscribed service keys automatically |\n| `APITIER_POSTCODE_KEY` | UK Postcode subscription — enables `verify_uk_address`, `lookup_uprn`, `lookup_uk_postcode` |\n| `APITIER_LEAD_AGENT_KEY` | Lead Agent subscription — enables `verify_uk_company`, `get_company_psc` |\n| `APITIER_EMAIL_KEY` | Email Validation subscription — enables `validate_email` |\n| `APITIER_PHONE_KEY` | Phone Validation subscription — enables `validate_phone` |\n| `APITIER_VAT_KEY` | VAT Validation subscription — enables `validate_vat` |\n| `APITIER_PINCODE_KEY` | India Pincode subscription — enables `lookup_india_pincode` |\n| `APITIER_BARCODE_KEY` | Barcode/QR Code subscription — enables `generate_barcode`, `generate_qrcode` |\n| `APITIER_CONVERT_DATA_KEY` | Data Conversion subscription — enables `convert_data` |\n\n`validate_sort_code` requires no API key — it is always available.\n\n`kyc_onboard_uk` requires `APITIER_POSTCODE_KEY` + `APITIER_LEAD_AGENT_KEY` + `APITIER_VAT_KEY` (or a unified `APITIER_MCP_KEY` with all three subscriptions). The tool only appears when all three services are active.\n\nIndividual service keys take precedence over `APITIER_MCP_KEY` if both are set.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/apitier/apitier-mcp-server.git\ncd apitier-mcp-server\nnpm install\nnpm run build\nAPITIER_MCP_KEY=mcp_your-key node dist/index.js\n```\n\nTest with the MCP Inspector:\n\n```bash\nnpx @modelcontextprotocol/inspector npx @apitier/mcp-server\n```\n\nSet `APITIER_MCP_KEY` in the inspector's environment variables panel.\n\n---\n\n## Example Agent Prompts\n\nOnce connected to Claude Desktop or any MCP-compatible agent:\n\n### UK KYC onboarding\n\n- *\"Run a KYC check on Vodafone Group Plc, VAT GB778476239, postcode EC1A 1BB\"*\n- *\"Onboard this supplier: company name Tesco PLC, VAT GB220437023\"*\n- *\"Verify this business before we sign the contract: company number 00445790\"*\n\n### UK address & property\n\n- *\"Verify this address and give me its UPRN: 10 Downing Street, SW1A 2AA\"*\n- *\"Look up UK postcode EC1A 1BB and fill in the address form\"*\n\n### UK business & compliance\n\n- *\"Verify this UK company on Companies House: Barclays Bank UK PLC\"*\n- *\"Who are the persons with significant control for company number 00026167?\"*\n- *\"Validate this UK sort code and account number: 60-16-13 / 31926819\"*\n- *\"Validate this UK VAT number: GB927065390\"*\n- *\"Validate this EU VAT number before I send the invoice: DE123456789\"*\n\n### Global identity\n\n- *\"Validate this list of emails and tell me which ones are invalid\"*\n- *\"Validate these phone numbers and tell me which country each is from\"*\n\n### Utilities\n\n- *\"Generate a QR code for [apitier.com](https://apitier.com)\"*\n- *\"Convert this CSV to JSON\"*\n",
  "bytes": 11978,
  "sha": "a9215cb45bfe29d1515278d73574fcf1d3930bb242baec319f6d864893142459",
  "repo_slug": "apitier/apitier-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_apitier_mcp_server_72f8520b/readme"
}