CPFHub MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CPFHub MCP Serverlook up CPF 529.982.247-25"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cpfhub-mcp: Official MCP Server for CPFHub.io
🇺🇸 English | 🇧🇷 Português
Official Model Context Protocol (MCP) server for CPFHub.io — Brazilian CPF Lookup API for AI agents.
What is CPFHub.io?
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
Related MCP server: mcp-brasil
Tools
This MCP server exposes the following tools:
Tool | Description |
| Retrieve identity data (full name, gender, date of birth) from a Brazilian CPF number |
| Retrieve remaining API credits and current plan status |
Tool Definition
{
"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"]
}
}Quick Start
# Set your API key
export CPFHUB_API_KEY=your_api_key_here
# Run the MCP server directly with npx (no install needed)
npx @cpfhub/mcpGet your free API key at app.cpfhub.io — no credit card required.
curl Example
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
}
}Configuration
Claude Desktop
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"
}
}
}
}Cursor
Go to Settings > Features > MCP.
Click + Add New MCP Server.
Name:
CPFHubType:
commandCommand:
export CPFHUB_API_KEY=YOUR_API_KEY_HERE && npx -y @cpfhub/mcp
Windsurf
Add to your MCP configuration file:
{
"mcpServers": {
"cpfhub": {
"command": "npx",
"args": ["-y", "@cpfhub/mcp"],
"env": {
"CPFHUB_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}OpenAI Function Calling Example
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)
result = get_person_by_cpf(args["cpf"])
print(result)LangChain Example
See examples/langchain_example.py for a full LangChain agent integration example.
Requirements
Node.js 18 or higher
A valid API key from app.cpfhub.io
Links
Resource | URL |
Documentation | |
Dashboard | |
OpenAPI Specification | |
Node.js SDK | |
Python SDK | |
All SDKs |
License
MIT © CPFHub.io
Português
🇺🇸 English | 🇧🇷 Português
Servidor Model Context Protocol (MCP) oficial para CPFHub.io — API de Consulta de CPF Brasileiro para agentes de IA.
O que é o CPFHub.io?
O CPFHub.io é uma API REST que retorna dados de identidade — nome completo, gênero e data de nascimento — de qualquer CPF brasileiro, em ~300ms, com 99,9% de uptime e total conformidade com a LGPD.
10M+ CPFs consultados · 1.300+ empresas ativas · 99,9% uptime
Ferramentas (Tools)
Este servidor MCP expõe as seguintes ferramentas:
Ferramenta | Descrição |
| Recupera dados de identidade (nome completo, gênero, data de nascimento) a partir de um CPF brasileiro |
| Recupera os créditos de API restantes e o status do plano atual |
Definição da Ferramenta
{
"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"]
}
}InÃcio Rápido
# Configure sua chave de API
export CPFHUB_API_KEY=sua_chave_de_api_aqui
# Execute o servidor MCP diretamente com npx (sem instalação)
npx @cpfhub/mcpObtenha sua chave de API gratuita em app.cpfhub.io — sem cartão de crédito.
Exemplo curl
curl -X GET "https://api.cpfhub.io/cpf/12345678909" \
-H "x-api-key: SUA_CHAVE_DE_API"Resposta:
{
"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
}
}Configuração
Claude Desktop
Adicione o seguinte ao seu claude_desktop_config.json:
{
"mcpServers": {
"cpfhub": {
"command": "npx",
"args": ["-y", "@cpfhub/mcp"],
"env": {
"CPFHUB_API_KEY": "SUA_CHAVE_DE_API_AQUI"
}
}
}
}Cursor
Acesse Settings > Features > MCP.
Clique em + Add New MCP Server.
Nome:
CPFHubTipo:
commandComando:
export CPFHUB_API_KEY=SUA_CHAVE_DE_API_AQUI && npx -y @cpfhub/mcp
Windsurf
Adicione ao seu arquivo de configuração MCP:
{
"mcpServers": {
"cpfhub": {
"command": "npx",
"args": ["-y", "@cpfhub/mcp"],
"env": {
"CPFHUB_API_KEY": "SUA_CHAVE_DE_API_AQUI"
}
}
}
}Exemplo com OpenAI Function Calling
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": "Quem é a pessoa com 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)
result = get_person_by_cpf(args["cpf"])
print(result)Exemplo com LangChain
Veja examples/langchain_example.py para um exemplo completo de integração com agente LangChain.
Requisitos
Node.js 18 ou superior
Uma chave de API válida de app.cpfhub.io
Links
Recurso | URL |
Documentação | |
Dashboard | |
Especificação OpenAPI | |
SDK Node.js | |
SDK Python | |
Todos os SDKs |
Licença
MIT © CPFHub.io
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for AgentFolio — the identity and reputation layer for AI agents. Query agent profiles, trust scores, verification status, and marketplace listings through 8 MCP tools.Last updated91111MIT
- Alicense-qualityDmaintenanceAn MCP server that connects AI agents to over 200 tools across 27 Brazilian public APIs, covering economic, legislative, transparency, and judicial data. It enables users to query and cross-reference extensive government datasets from sources like IBGE, the Central Bank, and the Brazilian Congress.Last updated1,697MIT
- Alicense-qualityBmaintenanceMCP Server for accessing 36 Brazilian public data sources and 1 agent, enabling AI agents to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.Last updatedMIT
- Alicense-qualityDmaintenanceMCP server that connects AI agents to 28 Brazilian public APIs, providing tools to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.Last updatedMIT
Related MCP Connectors
Identity resolution MCP server for phone/email lookups across 31+ services. Global + India coverage.
MCP server for AI dialogue using various LLM models via AceDataCloud
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cpfhub/cpfhub-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server