Connect Metamap to Claude: Verify Global IDs & Government Records
Learn how to connect Metamap to Claude using a managed MCP server to automate KYC, AML watchlist screening, and global identity verification workflows.
If you need to connect Metamap to Claude to automate KYC reviews, AML watchlist screening, or global identity verification, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and Metamap's complex compliance APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on connecting Metamap to ChatGPT or explore our broader architectural overview on connecting Metamap to AI Agents.
Giving a Large Language Model (LLM) access to a highly regulated compliance platform like Metamap is an engineering challenge. You have to handle asynchronous government database checks, map highly localized JSON schemas to MCP tool definitions, and deal with strict security and rate limiting constraints. Every time Metamap adds a new regional GovCheck endpoint, you have to update your server code, redeploy, and test the integration.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Metamap, connect it natively to Claude Desktop, and execute complex identity verification workflows using natural language.
The Engineering Reality of the Metamap API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against Metamap's APIs requires significant heavy lifting. You are not just integrating a standard CRUD application - you are integrating an orchestration engine that interfaces with dozens of legacy government databases across the globe.
If you decide to build a custom MCP server for Metamap, you own the entire API lifecycle. Here are the specific challenges you will face:
Asynchronous Webhook Dependencies
Identity verification is inherently slow. When you trigger a Brazilian CPF check or a Mexican RFC validation, Metamap is querying a live government database. These endpoints typically return an immediate 202 Accepted response with an empty body, deferring the actual payload to an asynchronous webhook callback. LLMs are synchronous by design. If you expose raw Metamap endpoints to Claude, the model will assume the task failed when it receives an empty response. A managed MCP integration strategy involves pairing the initial submission tools with specific retrieval tools, allowing the agent to poll for the final computed status.
Highly Fragmented Regional Schemas
Metamap supports hundreds of countries, and each government registry returns entirely different data structures. A Ghana National Card verification returns placeOfIssueCode, biometricFeed, and birthDistrict. A Colombia Unified Legal Search returns police warrant data. Maintaining custom JSON schemas for LLM function calling across every regional endpoint requires constant maintenance. Truto dynamically generates these schemas directly from Metamap's API documentation and your environment configurations, ensuring the model always has the exact parameters required for a specific region.
Rate Limits and 429 Handling
Metamap enforces strict API quotas to prevent abuse of third-party registries. When building AI agents, LLMs can easily enter a loop and aggressively poll an endpoint, triggering a 429 Too Many Requests error. Truto does not retry, throttle, or apply backoff on rate limit errors. Instead, when Metamap returns a 429, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. You are responsible for implementing the retry and backoff logic in your agent framework, ensuring deterministic control over compliance operations.
How to Generate a Metamap MCP Server
Truto dynamically generates MCP servers by reading your connected Metamap account's available resources and documentation. You can generate a server via the Truto UI or programmatically via the API.
Method 1: Via the Truto UI
For ad-hoc tasks or local Claude Desktop usage, the UI is the fastest path:
- Log into your Truto dashboard and navigate to your connected Metamap account.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Configure the server name, allowed methods (e.g.,
read,write), and optional tool tags. - Copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4...).
Method 2: Via the Truto API
If you are dynamically provisioning AI workspaces for enterprise users, you should generate the MCP server programmatically.
Make a POST request to the /integrated-account/:id/mcp endpoint:
const response = await fetch('https://api.truto.one/integrated-account/YOUR_ACCOUNT_ID/mcp', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TRUTO_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: "Metamap Compliance Agent",
config: {
methods: ["read", "write", "custom"],
require_api_token_auth: false
},
expires_at: "2026-12-31T23:59:59Z"
})
});
const mcpServer = await response.json();
console.log(mcpServer.url); // Output: https://api.truto.one/mcp/...This endpoint validates that the Metamap integration has documented tools, generates a secure hashed token backed by Cloudflare KV, and returns a self-contained URL.
How to Connect the MCP Server to Claude
Once you have your Truto MCP server URL, you can connect it to Claude in two ways, depending on your deployment environment.
Method A: Via the Claude UI (or ChatGPT)
If you are using the consumer versions of these AI tools, connecting the server is a UI-driven process:
For Claude:
- Open Claude Settings.
- Navigate to Integrations.
- Click Add MCP Server.
- Paste your Truto MCP URL and click Add.
For ChatGPT:
- Navigate to Settings -> Apps -> Advanced settings.
- Enable Developer mode.
- Click Add custom connector under the MCP servers section.
- Paste the Truto MCP URL and save.
Method B: Via Manual Config File
If you are running Claude Desktop locally or deploying a headless Claude agent, you must configure the MCP server via the claude_desktop_config.json file. Because Truto uses Server-Sent Events (SSE) over HTTP for MCP, you will use the official @modelcontextprotocol/server-sse package as the command.
{
"mcpServers": {
"metamap-compliance": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/YOUR_GENERATED_TOKEN"
]
}
}
}Restart Claude Desktop. The agent will immediately perform a handshake with the Truto router, request the tools/list, and inject Metamap capabilities into the model's context window.
Metamap Hero Tools
Truto automatically generates highly descriptive snake_case tool names from Metamap's endpoints and documentation. Here are the core tools your agent will use to orchestrate identity checks.
1. create_a_metamap_verification
Initiates a standard identity verification flow based on a template configured in your Metamap dashboard. This is the entry point for custom document capture flows.
Contextual note: This tool requires a flowId. The metadata object is highly useful for passing internal CRM IDs (like a Salesforce Contact ID) into Metamap, ensuring the resulting webhooks tie the verification back to the correct user in your database.
"Trigger a new verification flow for our onboarding process using flow ID 'flw_xyz123'. Include metadata identifying the user as 'crm_id_8849'."
2. get_single_metamap_verification_by_id
Retrieves the complete state of a verification. Because Metamap operations are often asynchronous, agents use this tool to poll the verification status or extract the final computed identity data after the user submits documents.
Contextual note: The status field will indicate if the verification is pending, verified, or rejected. The agent must parse the steps array to understand exactly which document or liveness check failed.
"Check the status of verification ID 'ver_99384'. If it's complete, summarize the extracted identity data and flag any steps that were rejected."
3. create_a_metamap_govchecks_brazil_cpf_validation
Validates a Brazilian CPF (Cadastro de Pessoas Físicas) number and the owner's full name against the Brazilian Internal Revenue Service database in real-time.
Contextual note: Unlike full document uploads, GovChecks are purely data-driven. This tool requires the cpfNumber and fullName. It is crucial for instant KYC in the LATAM market without requiring the user to photograph a physical ID card.
"Validate the CPF number '12345678909' for the user 'João Silva' using the Brazilian CPF GovCheck tool."
4. create_a_metamap_comply_advantage
Screens a person or company against global Anti-Money Laundering (AML) watchlists powered by ComplyAdvantage. This checks over 800 global databases for sanctions, politically exposed persons (PEPs), and adverse media.
Contextual note: If the monitor flag is set to true, Metamap will continuously screen this entity over time. A callbackUrl is strictly required if monitoring is enabled.
"Run an AML watchlist screening for the entity 'Global Trading Corp'. Do not enable continuous monitoring."
5. create_a_metamap_email_risk_check
Evaluates an email address for fraud risk, checking against known disposable domains, honeypots, recent abuse registries, and overall deliverability.
Contextual note: This tool is excellent for frontline triage before you spend money on expensive document verifications. High fraud scores here can immediately route a user to a manual review queue.
"Perform a risk check on the email 'suspicious.user123@temp-mail.org'. If the disposable flag is true or the fraud score is high, alert me."
6. create_a_metamap_govchecks_mexico_rfc_status
Validates a Mexican RFC (Federal Taxpayers Registry) number against the SAT database to confirm an individual's or company's tax status is active and valid.
Contextual note: This tool relies heavily on a callbackUrl. The agent will submit the RFC, but the actual certificate status (Active/Inactive) will be delivered asynchronously to your infrastructure.
"Submit an RFC status check for the company RFC 'XAXX010101000' and configure the callback URL to 'https://api.mycompany.com/webhooks/metamap'."
To view the complete list of available identity, biometric, and GovCheck tools along with their exact JSON schemas, visit the Metamap integration page.
Workflows in Action
Exposing individual endpoints to an LLM is only step one. The real power of MCP is allowing Claude to orchestrate multi-step compliance workflows autonomously.
Workflow 1: Instant LatAm Merchant KYC
When onboarding a new merchant in Brazil, you need to verify their business registry and check their primary owner against global AML watchlists.
"I have a new merchant application for 'TechSolutions Ltda' in Brazil. The owner is 'Maria Santos' and their CPF is '98765432100'. Run the necessary CPF validation and screen Maria against global AML watchlists. Summarize the risk profile."
- CPF Validation: The agent calls
create_a_metamap_govchecks_brazil_cpf_validationpassing the CPF number and name. It receives validation that the CPF matches the Brazilian revenue service database. - AML Screening: The agent immediately calls
create_a_metamap_comply_advantagepassing "Maria Santos" to check for sanctions or PEP status. - Synthesis: The agent combines the results. If the CPF is valid and the AML check returns no hits, Claude outputs a clean compliance summary, approving the merchant for the next step of onboarding.
Workflow 2: Asynchronous Fraud Investigation
A human compliance officer needs to investigate a potentially fraudulent user sign-up in Colombia based on an anomalous email.
"Investigate the user who signed up with 'test.fraud.99@yopmail.com'. Run an email risk check. Also, query their Colombia Unified Legal Search record using their name 'Carlos Martinez' and set the webhook to 'https://webhook.site/abc'."
sequenceDiagram participant Agent as Claude Agent participant MCP as Truto MCP participant Metamap as Metamap API participant Webhook as Customer Webhook Agent->>MCP: Call create_a_metamap_email_risk_check MCP->>Metamap: POST /v1/email-risk Metamap-->>MCP: Returns fraud_score, disposable: true MCP-->>Agent: JSON Result Agent->>MCP: Call create_a_metamap_govchecks_colombia_unified_legal_search MCP->>Metamap: POST /v1/govchecks/colombia/legal-search Metamap-->>MCP: 202 Accepted (Async) MCP-->>Agent: Success Acknowledgment note right of Metamap: Metamap processes search Metamap->>Webhook: POST with warrant/arrest results
- Email Triage: The agent calls
create_a_metamap_email_risk_check. It instantly identifies the email as a disposable domain with a high spam trap score. - GovCheck Trigger: The agent calls
create_a_metamap_govchecks_colombia_unified_legal_searchpassing the user's name and the required callback URL. - Result: The agent informs the compliance officer that the email is high-risk and confirms that the background check has been initiated. The officer's system will receive the asynchronous webhook when the Colombian police record search concludes.
Security and Access Control
Compliance data is highly sensitive. Truto provides strict governance controls encoded directly into the MCP server URL token, ensuring your AI agents operate within defined boundaries.
- Method Filtering: Limit an AI agent to read-only operations by setting
methods: ["read"]during token generation. The agent can poll verification statuses but cannot create new checks or incur costs. - Tag Filtering: Group specific GovChecks (e.g., LATAM endpoints) using integration tool tags, and generate an MCP server that only exposes tools tagged with
["latam_compliance"]. - API Token Authentication: By default, possessing the MCP URL grants access. By setting
require_api_token_auth: true, you enforce a second authentication layer, requiring the client to pass a valid Truto API session token via headers. - Automatic Expiration: Set an
expires_attimestamp to create short-lived MCP servers. Once expired, Cloudflare KV automatically drops the token, cutting off agent access immediately - perfect for temporary audit investigations.
Scaling AI-Driven Compliance
Connecting Metamap to Claude transforms compliance from a manual, click-heavy operational burden into an autonomous, conversational workflow. By leveraging a managed MCP server, you abstract away the complexity of regional government endpoints, asynchronous webhooks, and complex binary document uploads.
Instead of wasting engineering cycles reading Metamap API docs and writing custom proxy code, your team can focus on defining agentic behavior, risk scoring rules, and automated remediation paths.
FAQ
- Does Truto automatically handle Metamap API rate limits for AI agents?
- No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Metamap returns an HTTP 429, Truto passes that error to the caller and normalizes the rate limit data into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). You must implement retry logic in your agent framework.
- How do AI agents handle Metamap's asynchronous government checks?
- Many Metamap GovChecks return a 202 Accepted and deliver results asynchronously via webhooks. AI agents can initiate the check using an MCP tool and provide a callback URL, allowing your backend system to process the final result when the webhook fires.
- Can I restrict the Claude agent to only view Metamap verification statuses?
- Yes. When generating the MCP server in Truto, you can use method filtering (methods: ["read"]) to ensure the server only exposes read operations, preventing the agent from creating new verifications or incurring costs.