Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"cpfhub": {
"env": {
"CPFHUB_API_KEY": "YOUR_API_KEY_HERE"
},
"args": [
"-y",
"@cpfhub/mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Official Model Context Protocol (MCP) server for CPFHub.io — Brazilian CPF Lookup API for AI agents.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@cpfhub/mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @cpfhub/mcp against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
An open-source AI agent that brings the power of Gemini directly into your terminal.
Just a Better Chatbot. Powered by Agent & MCP & Workflows.
MCP Security Weekly
Get CVE alerts and security updates for io.github.cpfhub/cpfhub and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
🇺🇸 English | 🇧🇷 Português
Official Model Context Protocol (MCP) server for CPFHub.io — Brazilian CPF Lookup API for AI agents.
CPFHub.io is a REST API that returns identity data — full name, gender, and date of birth — from any Brazilian CPF number, in ~300ms, with 99.9% uptime and full LGPD compliance.
10M+ CPFs queried · 1,300+ active companies · 99.9% uptime
This MCP server exposes the following tools:
| Tool | Description |
|---|---|
get_person_by_cpf | Retrieve identity data (full name, gender, date of birth) from a Brazilian CPF number |
get_quota_information | Retrieve remaining API credits and current plan status |
{
"name": "get_person_by_cpf",
"description": "Retrieve identity data from a Brazilian CPF number",
"parameters": {
"type": "object",
"properties": {
"cpf": {
"type": "string",
"description": "Brazilian CPF number (digits only or formatted as XXX.XXX.XXX-XX)"
}
},
"required": ["cpf"]
}
}
# Set your API key
export CPFHUB_API_KEY=your_api_key_here
# Run the MCP server directly with npx (no install needed)
npx @cpfhub/mcp
Get your free API key at app.cpfhub.io — no credit card required.
curl -X GET "https://api.cpfhub.io/cpf/12345678909" \
-H "x-api-key: YOUR_API_KEY"
Response:
{
"success": true,
"data": {
"cpf": "12345678909",
"name": "Fulano de Tal",
"nameUpper": "FULANO DE TAL",
"gender": "M",
"birthDate": "15/06/1990",
"day": 15,
"month": 6,
"year": 1990
}
}
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"cpfhub": {
"command": "npx",
"args": ["-y", "@cpfhub/mcp"],
"env": {
"CPFHUB_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
CPFHubcommandexport CPFHUB_API_KEY=YOUR_API_KEY_HERE && npx -y @cpfhub/mcpAdd to your MCP configuration file:
{
"mcpServers": {
"cpfhub": {
"command": "npx",
"args": ["-y", "@cpfhub/mcp"],
"env": {
"CPFHUB_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
import os
import json
import requests
from openai import OpenAI
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
CPFHUB_API_KEY = os.environ["CPFHUB_API_KEY"]
tools = [
{
"type": "function",
"function": {
"name": "get_person_by_cpf",
"description": "Retrieve identity data from a Brazilian CPF number",
"parameters": {
"type": "object",
"properties": {
"cpf": {"type": "string", "description": "Brazilian CPF number"}
},
"required": ["cpf"],
},
},
}
]
def get_person_by_cpf(cpf: str) -> dict:
response = requests.get(
f"https://api.cpfhub.io/cpf/{cpf.replace('.', '').replace('-', '')}",
headers={"x-api-key": CPFHUB_API_KEY},
)
return response.json()
messages = [{"role": "user", "content": "Who is the person with CPF 123.456.789-09?"}]
response = client.chat.completions.create(model="gpt-4o", messages=messages, tools=tools)
message = response.choices[0].message
if message.tool_calls:
args = json.loads(message.tool_calls[0].function.arguments)
... [View full README on GitHub](https://github.com/cpfhub/cpfhub-mcp#readme)