mcp-caf — Claude Code MCP server: setup
This MCP server exposes KYC/KYB, biometrics, document OCR, and Trust Platform flows. Its default service host currently fails DNS resolution.
claude mcp add --env CAF_API_KEY=<CAF_API_KEY> --env CAF_API_BASE=<CAF_API_BASE> --transport stdio caf -- npx -y @codespar/mcp-cafWhat mcp-caf does
mcp-caf gives an agent tools for checking people and companies, validating identity documents, comparing a selfie with a reference image, and running passive liveness checks. Its nine tools also start and inspect Trust Platform onboarding flows, list account data sources, and fetch an earlier check by ID.
The server expects CAF_API_KEY for Bearer authentication. CAF_API_BASE can point it to another API base, including the sandbox address described by the package. The package is deprecated: api.caf.io does not resolve in DNS, so requests sent to the default host do not reach a service. A functioning endpoint must be confirmed first.
Install it with npx -y @codespar/mcp-caf; setup commands are provided for Codex, Cursor, GitHub Copilot, and Gemini CLI as well. Claude Code uses claude mcp add with the API key in an environment variable.
What it helps with
- check a person by CPF
- screen a company by CNPJ
- compare a selfie with a reference image
- extract and validate document data
- start a Trust Platform onboarding flow
Example prompts for the agent
- Ask the agent to run
person_checkfor this CPF and return the risk result. - Use
company_checkfor this CNPJ and show the company profile and sanctions. - Run
document_checkon this document and report its OCR and authenticity result.
How to install mcp-caf
Platform CLI
claude mcp add --env CAF_API_KEY=<CAF_API_KEY> --env CAF_API_BASE=<CAF_API_BASE> --transport stdio caf -- npx -y @codespar/mcp-cafReplace <…> with your own values
Platform CLI
codex mcp add caf --env CAF_API_KEY=<CAF_API_KEY> --env CAF_API_BASE=<CAF_API_BASE> -- npx -y @codespar/mcp-cafReplace <…> with your own values
Config file
{
"mcpServers": {
"caf": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-caf"
],
"env": {
"CAF_API_KEY": "<CAF_API_KEY>",
"CAF_API_BASE": "<CAF_API_BASE>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"caf": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-caf"
],
"env": {
"CAF_API_KEY": "<CAF_API_KEY>",
"CAF_API_BASE": "<CAF_API_BASE>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e CAF_API_KEY=<CAF_API_KEY> -e CAF_API_BASE=<CAF_API_BASE> caf npx -y @codespar/mcp-cafReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-caf
How do I install mcp-caf in Claude Code?
Run claude mcp add mcp-caf -e CAF_API_KEY=<CAF_API_KEY> -- npx -y @codespar/mcp-caf.
What does mcp-caf do?
It exposes KYC/KYB, biometric, document, and Trust Platform flow tools to an AI coding client.
What does mcp-caf need to work?
It needs CAF_API_KEY and a reachable API base set with CAF_API_BASE. The default api.caf.io host fails DNS resolution, so the standard setup cannot complete requests.