Wraps Tencent Cloud's Faceid APIs into eight identity verification tools. You get face comparison with similarity scores, photo and video liveness detection for deepfake prevention, OCR for Chinese ID cards, bank cards, driver's licenses, and vehicle registrations, plus media labeling that checks for masks, coercion signals, multiple people in frame, or whether someone's in a car or hotel room. Designed for KYC workflows where an AI agent needs to verify documents or flag fraud indicators. Requires Tencent Cloud credentials, with test keys available for 100 free calls per appid. Best suited for financial services, loan origination, or any compliance scenario where you're automating identity checks through conversation.
Financial-grade eKYC / KYA toolkit for AI agents, exposed as 8 MCP tools.
It turns face comparison, photo/video liveness detection, document OCR, and risk media labeling into standard MCP tools that can be used by agent platforms, workflow builders, and local MCP clients.
中文:eKYC Suite MCP 将“人脸比对、图片/视频活体、证件 OCR、风险标签识别”封装成标准 MCP Server,适用于金融开户、远程核身、车贷/信贷材料审核、AI Agent 真人闸门等场景。
AI agents are increasingly used in onboarding, lending, insurance, and compliance workflows. The missing layer is a reliable human gate: when an agent reaches a high-risk step, it needs to verify that the person/document/media evidence is real enough to continue.
This MCP provides that layer:
| # | Tool | What it does | Typical use case |
|---|---|---|---|
| 1 | face_compare | Compares two face photos and returns similarity 0-100 | Selfie-to-ID match, duplicate account check |
| 2 | photo_liveness_detect | Detects forged/synthetic/replayed face photos | Low-friction anti-fraud screen |
| 3 | video_liveness_detect | Detects deepfake/replay/synthetic face videos | High-risk onboarding or transaction step-up |
| 4 | id_card_ocr | Extracts Chinese ID card fields | Onboarding prefill, document digitization |
| 5 | bank_card_ocr | Extracts bank card number/expiry | Payment binding, account verification |
| 6 | driver_license_ocr | Extracts driver license fields | Auto insurance, car rental, fleet compliance |
| 7 | vehicle_license_ocr | Extracts vehicle license fields | Auto loans, vehicle insurance, collateral checks |
| 8 | media_labeling | Detects 15+ portrait/environment labels | Compliance scene checks, evidence review |
npm install @wefi-ai/ekyc-suite-mcp
Or run from source:
git clone <repository-url>
cd ekyc-suite-mcp
npm install
npm test
Create .env from .env.example and fill in credentials:
cp .env.example .env
You can configure one or both credential groups:
KYC_APPID + KYC_SECRET: enables tools 1-7.LABEL_APPID + LABEL_SECRET: enables media_labeling.Unconfigured tools return a clear missing-credential error instead of crashing.
In hosted HTTP/SSE mode, credentials may also be supplied per request by a gateway or marketplace that supports custom headers:
x-kyc-appid + x-kyc-secretx-label-appid + x-label-secretEnvironment variables take precedence over request headers. For public marketplace listings, prefer platform-managed credential headers or isolated test credentials instead of hardcoding production credentials into a shared public service.
npx @wefi-ai/ekyc-suite-mcp --transport=stdio
Example MCP client config:
{
"mcpServers": {
"ekyc-suite": {
"command": "npx",
"args": ["-y", "@wefi-ai/ekyc-suite-mcp"],
"env": {
"MCP_TRANSPORT": "stdio",
"KYC_APPID": "your_test_kyc_appid",
"KYC_SECRET": "your_test_kyc_secret",
"LABEL_APPID": "your_test_label_appid",
"LABEL_SECRET": "your_test_label_secret"
}
}
}
}
MCP_TRANSPORT=http HOST=0.0.0.0 PORT=3000 node server.mjs
Endpoints:
GET /healthz — health checkPOST/GET/DELETE /mcp — Streamable HTTP MCP endpointGET /sse + POST /messages?sessionId=... — legacy HTTP+SSE MCP endpointBaidu AppBuilder-style MCP-SSE integration should use the public URL of:
https://<your-domain>/sse
Newer MCP clients should use:
https://<your-domain>/mcp
Image/video parameters accept:
/path/to/photo.jpghttps://example.com/photo.jpgdata:image/jpeg;base64,...Security defaults:
MAX_RAW_BYTES.ALLOW_HTTP_URLS=1.REQUEST_TIMEOUT_MS.{
"photo1": "/path/to/selfie.jpg",
"photo2": "/path/to/id_photo.jpg",
"sourcePhotoType": "2"
}
{
"file": "/path/to/face_photo_or_video"
}
Returns riskLevel, riskTag, readable risk text, and orderNo.
{
"image": "/path/to/id_card.jpg",
"side": "0"
}
side: 0 = portrait/front side, 1 = national emblem/back side.
{
"file": "/path/to/photo.jpg",
"labels": "A02,A14,B03",
"type": "image"
}
Available label codes, max 5 per request:
A01 facial mask, A02 medical mask, A04 headphones, A05 nudity, A06 sunglasses, A09 coercion, A10 unconscious/asleep, A11 phone, A13 tattoo, A14 hat, A15 critical patientB02 multiple people, B03 inside car, B06 hotel room, B07 car dealershipnpm test
The built-in test verifies:
/mcp starts and lists all 8 tools/sse starts and lists all 8 toolskyc1.qcloud.comkyc2.qcloud.comminiprogram-kyc.tencentcloudapi.comMIT
KYC_APPID*secreteKYC app ID for face comparison, liveness, and OCR tools.
KYC_SECRET*secreteKYC secret for face comparison, liveness, and OCR tools.
LABEL_APPID*secretMedia labeling app ID.
LABEL_SECRET*secretMedia labeling secret.