mcpField
A
Apitier Mcp Server

Apitier Mcp Server

本地服务
github.com/apitier商业与营销022 周前更新

关于 Apitier Mcp Server

@apitier/mcp-server 将 APITier 实用 API 作为工具提供给 AI Agent,涵盖企业核验、身份验证和数据转换。支持托管 HTTP 与本地 stdio 模式,可用工具取决于有效订阅。

主要功能

  1. 01英国企业、地址和 VAT 核验
  2. 02电子邮件与电话验证
  3. 03印度 PIN 码查询
  4. 04生成条形码和二维码
  5. 05转换 CSV、JSON、XML 和 YAML

适用场景

  1. 01执行英国企业入驻检查
  2. 02核验地址和企业信息
  3. 03验证电子邮件地址与电话号码
  4. 04生成二维码或转换数据格式

MCP 相关

该 MCP 服务通过托管 HTTP 或本地 stdio 将 APITier 实用 API 暴露为工具。MCP Key 或单项服务密钥决定可用的订阅工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"apitier": {
"command": "npx",
"args": [
"-y",
"@apitier/mcp-server"
],
"env": {
"APITIER_EMAIL_KEY": "<APITIER_EMAIL_KEY>",
"APITIER_PHONE_KEY": "<APITIER_PHONE_KEY>",
"APITIER_VAT_KEY": "<APITIER_VAT_KEY>",
"APITIER_POSTCODE_KEY": "<APITIER_POSTCODE_KEY>",
"APITIER_PINCODE_KEY": "<APITIER_PINCODE_KEY>",
"APITIER_BARCODE_KEY": "<APITIER_BARCODE_KEY>",
"APITIER_CONVERT_DATA_KEY": "<APITIER_CONVERT_DATA_KEY>"
}
}
}
}
启动命令npx -y @apitier/mcp-server
需要配置的环境变量
APITIER_EMAIL_KEY密钥API key from your APITier Email Validation subscription
APITIER_PHONE_KEY密钥API key from your APITier Phone Validation subscription
APITIER_VAT_KEY密钥API key from your APITier VAT Validation subscription
APITIER_POSTCODE_KEY密钥API key from your APITier UK Postcode subscription
APITIER_PINCODE_KEY密钥API key from your APITier India Pincode subscription
APITIER_BARCODE_KEY密钥API key from your APITier Barcode & QR Code subscription
APITIER_CONVERT_DATA_KEY密钥API key from your APITier Data Conversion subscription

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@apitier/mcp-server1.0.2

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

@apitier/mcp-server

MCP(Model Context Protocol)服务,将所有 APITier 实用 API 作为工具提供给 AI Agent。

两种集成模式:

模式适用场景
托管 HTTP — https://mcp.apitier.comAnthropic 连接器目录、远程 Agent、服务间调用
stdio (npx) — 在本地运行Claude Desktop、Cursor、Windsurf、本地 Agent

两种模式使用相同的 MCP Key — 一个密钥即可解锁你订阅的所有服务。

Postman 集合: 导入现成的集合,即可立即测试所有端点: https://raw.githubusercontent.com/apitier/apitier-mcp-server/main/postman/APITier%20MCP%20Server.postman_collection.json

在 Postman 中:Import → Link → 粘贴 URL → 设置 mcp_api_key 集合变量。


可用工具

🇬🇧 英国 KYC 入驻
工具描述
kyc_onboard_uk一次调用即可完成英国企业入驻检查。 验证 VAT、核验 Companies House、查询 PSC(受益所有人),并确认注册地址。返回 PASS / REVIEW / FAIL、风险评分及完整数据包。需要订阅 postcode + vat + leadAgent。

输出示例:

{
  "decision": "PASS",
  "risk_score": 95,
  "flags": [],
  "checks": {
    "company": { "status": "active", "data": { ... } },
    "psc":     { "status": "found",  "data": { ... } },
    "vat":     { "status": "valid",  "data": { ... } },
    "address": { "status": "verified", "data": { ... } }
  }
}

🇬🇧 英国地址与房产
工具描述
verify_uk_address根据 Royal Mail PAF 验证英国地址 — 返回标准地址、UPRN、UDPRN 及各投递点的地理编码
lookup_uprn根据 UDPRN 查询完整的 AddressBase 记录 — 返回 UPRN、PAF 标准地址和坐标。使用 verify_uk_address 返回的 UDPRN
lookup_uk_postcode英国邮政编码 → 完整的 PAF 地址列表,以及区、选区、郡、国家和地理编码
🇬🇧 英国企业与合规
工具描述
verify_uk_company按名称或编号在 Companies House 查询英国公司 — 状态、地址、SIC 代码、申报情况
get_company_psc英国公司的重大控制人登记信息 — AML 受益所有权核查所需
validate_sort_code验证英国银行排序代码,也可选择验证银行账号(Vocalink 模数校验)。无需 API 密钥。
🇬🇧🇪🇺 英国 + 欧盟 VAT 合规
工具描述
validate_vat验证英国和欧盟 VAT 编号 — GB 编号通过 HMRC 核查,其他所有国家/地区前缀通过欧盟 VIES 核查。返回已注册企业名称和地址。接受任意国家/地区前缀(例如 GB123456789、DE123456789、FR12345678901)。
🌍 全球身份信息
工具描述
validate_email验证电子邮件 — 语法、MX、SMTP 可达性和一次性邮箱域名检查。适用于全球任何电子邮件地址。
validate_phone验证并解析电话号码 — 接受任意国际格式,返回国家/地区、运营商和线路类型。
🇮🇳 印度
工具描述
lookup_india_pincode印度 PIN 编码 → 州 / 区 / 城镇
🌍 实用工具
工具描述
generate_barcode生成条码图像(Code128、EAN-13、UPC 等)
generate_qrcode生成二维码图像,可选添加徽标和颜色
convert_data在 CSV、JSON、XML、YAML 格式之间转换

快速开始

1. 获取 MCP Key

在 apitier.com 注册 → Account → AI & MCP → Generate MCP Key。

你的 MCP Key(mcp_...)会自动解锁你订阅的每项 APITier 服务对应的工具。无需按服务单独配置。


托管 HTTP 端点

POST https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY

将 MCP Key 作为 x-api-key 查询参数传入。端点会解析你订阅的服务,并仅返回你可用的工具。

必需的请求头:

Content-Type: application/json
Accept: application/json, text/event-stream

使用 curl 测试:

curl -s -X POST 'https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | jq .

调用工具:

curl -s -X POST 'https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "verify_uk_company",
      "arguments": { "q": "03977902" }
    }
  }' | jq .

运行状况检查:

curl https://mcp.apitier.com/health
与任意 HTTP MCP 客户端配合使用
{
  "mcpServers": {
    "apitier": {
      "url": "https://mcp.apitier.com/mcp?x-api-key=YOUR_MCP_KEY"
    }
  }
}

Claude Desktop(stdio)

添加到 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows):

使用 MCP Key(推荐——单个密钥即可使用所有已订阅的工具):

{
  "mcpServers": {
    "apitier": {
      "command": "npx",
      "args": ["-y", "@apitier/mcp-server"],
      "env": {
        "APITIER_MCP_KEY": "mcp_your-key-here"
      }
    }
  }
}

使用单个服务密钥(如果你希望进行显式控制):

{
  "mcpServers": {
    "apitier": {
      "command": "npx",
      "args": ["-y", "@apitier/mcp-server"],
      "env": {
        "APITIER_POSTCODE_KEY":     "key-from-postcode-subscription",
        "APITIER_LEAD_AGENT_KEY":   "key-from-lead-agent-subscription",
        "APITIER_EMAIL_KEY":        "key-from-email-subscription",
        "APITIER_PHONE_KEY":        "key-from-phone-subscription",
        "APITIER_VAT_KEY":          "key-from-vat-subscription",
        "APITIER_BARCODE_KEY":      "key-from-barcode-subscription",
        "APITIER_CONVERT_DATA_KEY": "key-from-data-conversion-subscription"
      }
    }
  }
}

保存后重启 Claude Desktop。只有已激活订阅对应的工具会显示。


Cursor / Windsurf / VS Code

{
  "mcp": {
    "servers": {
      "apitier": {
        "command": "npx",
        "args": ["-y", "@apitier/mcp-server"],
        "env": {
          "APITIER_MCP_KEY": "mcp_your-key-here"
        }
      }
    }
  }
}

LangChain(Python)

stdio:

from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
from langchain_mcp_adapters.tools import load_mcp_tools
from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic

async def main():
    server_params = StdioServerParameters(
        command="npx",
        args=["-y", "@apitier/mcp-server"],
        env={"APITIER_MCP_KEY": "mcp_your-key-here"},
    )

    async with stdio_client(server_params) as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()
            tools = await load_mcp_tools(session)

            model = ChatAnthropic(model="claude-sonnet-4-6")
            agent = create_react_agent(model, tools)

            result = await agent.ainvoke({
                "messages": "Validate this email: [email protected] and look up postcode SW1A 1AA"
            })
            print(result["messages"][-1].content)

HTTP 端点:

from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    async with streamablehttp_client(
        "https://mcp.apitier.com/mcp?x-api-key=mcp_your-key-here"
    ) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            tools = await load_mcp_tools(session)
            # use tools with your agent...

Vercel AI SDK(TypeScript)

stdio:

import { experimental_createMCPClient as createMCPClient } from "ai";
import { Experimental_StdioMCPTransport as StdioMCPTransport } from "ai/mcp-stdio";
import { anthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";

const mcp = await createMCPClient({
  transport: new StdioMCPTransport({
    command: "npx",
    args: ["-y", "@apitier/mcp-server"],
    env: { APITIER_MCP_KEY: process.env.APITIER_MCP_KEY! },
  }),
});

const tools = await mcp.tools();

const { text } = await generateText({
  model: anthropic("claude-sonnet-4-6"),
  tools,
  prompt: "Verify this UK company: Google UK Limited",
});

await mcp.close();

HTTP 端点:

import { experimental_createMCPClient as createMCPClient } from "ai";

const mcp = await createMCPClient({
  transport: {
    type: "sse",
    url: `https://mcp.apitier.com/mcp?x-api-key=${process.env.APITIER_MCP_KEY}`,
  },
});

const tools = await mcp.tools();

环境变量

变量说明
APITIER_MCP_KEY推荐。 从账户页面获取的单个 MCP Key——自动解析所有已订阅的服务密钥
APITIER_POSTCODE_KEY英国邮编订阅——启用 verify_uk_address、lookup_uprn、lookup_uk_postcode
APITIER_LEAD_AGENT_KEYLead Agent 订阅——启用 verify_uk_company、get_company_psc
APITIER_EMAIL_KEY电子邮件验证订阅——启用 validate_email
APITIER_PHONE_KEY电话号码验证订阅——启用 validate_phone
APITIER_VAT_KEYVAT 验证订阅——启用 validate_vat
APITIER_PINCODE_KEY印度邮编订阅——启用 lookup_india_pincode
APITIER_BARCODE_KEY条形码/QR Code 订阅——启用 generate_barcode、generate_qrcode
APITIER_CONVERT_DATA_KEY数据转换订阅——启用 convert_data

validate_sort_code 无需 API 密钥——始终可用。

kyc_onboard_uk 需要 APITIER_POSTCODE_KEY + APITIER_LEAD_AGENT_KEY + APITIER_VAT_KEY(或包含全部三项订阅的统一 APITIER_MCP_KEY)。只有三个服务均已激活时,才会显示此工具。

如果同时设置了单个服务密钥和 APITIER_MCP_KEY,则优先使用单个服务密钥。


开发

git clone https://github.com/apitier/apitier-mcp-server.git
cd apitier-mcp-server
npm install
npm run build
APITIER_MCP_KEY=mcp_your-key node dist/index.js

使用 MCP Inspector 进行测试:

npx @modelcontextprotocol/inspector npx @apitier/mcp-server

在 Inspector 的环境变量面板中设置 APITIER_MCP_KEY。


Agent 提示词示例

连接到 Claude Desktop 或任何兼容 MCP 的 Agent 后:

英国 KYC 入驻
  • “对 Vodafone Group Plc 进行 KYC 检查,VAT 号为 GB778476239,邮编为 EC1A 1BB”
  • “入驻这家供应商:公司名称为 Tesco PLC,VAT 号为 GB220437023”
  • “签订合同前核实这家企业:公司编号为 00445790”
英国地址与房产
  • “核实此地址并提供其 UPRN:10 Downing Street, SW1A 2AA”
  • “查询英国邮编 EC1A 1BB 并填写地址表单”
英国企业与合规
  • “在 Companies House 核实这家英国公司:Barclays Bank UK PLC”
  • “公司编号为 00026167 的企业有哪些重要控制人?”
  • “验证此英国银行代码和账号:60-16-13 / 31926819”
  • “验证此英国 VAT 号码:GB927065390”
  • “发送发票前验证此欧盟 VAT 号码:DE123456789”
全球身份验证
  • “验证这份电子邮件列表,并告诉我哪些地址无效”
  • “验证这些电话号码,并告诉我每个号码分别属于哪个国家”
实用工具
  • “为 apitier.com 生成 QR Code”
  • “将此 CSV 转换为 JSON”

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。