Base dos Dados MCP
Click on "Deploy 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., "@Base dos Dados MCPfind datasets on population by municipality"
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.
Base dos Dados MCP
A Model Context Protocol (MCP) server that provides AI-optimized access to Base dos Dados, Brazil's largest open data platform.
💡 Create Reports with Real Brazilian Datasets with Claude Desktop
Ask it to replicate a news article:
User:
https://www.gov.br/secom/pt-br/assuntos/noticias/2025/05/no-melhor-abril-do-novo-caged-brasil-gera-257-mil-vagas-com-carteira-assinada
consegue replicar a materia e checar os numeros?
Claude: https://claude.ai/public/artifacts/15d7f5c5-f017-4a96-9380-a93e535001fdOr a research question
User:
https://claude.ai/share/f8dbbe5b-1c34-4804-9462-1bfb9008558d
Claude: https://claude.ai/share/f8dbbe5b-1c34-4804-9462-1bfb9008558dRelated MCP server: recife-open-data-mcp
✨ Features
🔍 Smart Search: Portuguese language support with accent normalization
📊 BigQuery Integration: Direct SQL execution and table references
🇧🇷 Brazilian Data Focus: IBGE, RAIS, TSE, INEP datasets
🤖 AI-Optimized: Single-call comprehensive data retrieval
🚀 Quick Install to Claude Desktop
Just run this line in your terminal
bash -i <(curl -LsSf https://raw.githubusercontent.com/JoaoCarabetta/basedosdados-mcp/refs/heads/main/install.sh)Add your BigQuery project_id, location and service account.
Restart Claude Desktop and you are good to go!
⚠️ I just tested it in my Mac M-Series
🛠️ Tools
Tool | Description |
| Search datasets with Portuguese support |
| Get complete dataset overview with tables |
| Get table details with columns and SQL samples |
| Execute SQL queries directly |
| Check BigQuery authentication |
🔧 Development
Quick Development Setup
Set up the MCP server for local development with live code reloading:
git clone https://github.com/JoaoCarabetta/basedosdados-mcp
cd basedosdados-mcp
./dev_install.shThis script will:
✅ Install all dependencies in development mode
✅ Create a development wrapper script with live reloading
✅ Configure Claude Desktop with
basedosdadosdevserver✅ Set up proper environment variables and paths
Manual Development Setup
If you prefer manual setup:
# Clone and install dependencies
git clone https://github.com/JoaoCarabetta/basedosdados-mcp
cd basedosdados-mcp
uv sync --extra dev
# Run development server
uv run basedosdados-mcp-dev
# Or test directly
./run_dev_server.shDevelopment Features
🔄 Live Code Reloading: Changes to
src/are reflected immediately🐛 Debug Logging: Enhanced logging for development
🧪 Full Test Suite: Comprehensive pytest-based tests
🎯 Separate Server:
basedosdadosdevserver in Claude Desktop⚡ Fast Development: No need to reinstall after code changes
🧪 Testing
Install development dependencies and run the comprehensive test suite:
# Install dev dependencies (includes pytest)
uv sync --extra dev
# Run all encoding tests
pytest tests/ -v
# Run specific test categories
pytest tests/ -k "encoding" -v # Encoding tests only
pytest tests/ -k "live" -v # Live server tests only
pytest tests/ -m "not live" -v # Skip live tests (faster)
# Run with coverage
pytest tests/ --cov=basedosdados_mcp --cov-report=htmlTest Structure
The pytest-based test suite includes:
test_encoding_pytest.py: Core Portuguese character encoding testsUTF-8 encoding/decoding validation
JSON serialization integrity
MCP protocol compatibility
Parametrized tests for individual Portuguese words
test_live_mcp_pytest.py: Live MCP server endpoint testsReal API response validation
Backend API encoding verification
Large response handling
End-to-end encoding flow
conftest.py: Shared fixtures and pytest configurationCommon test data and utilities
Automatic test marking and organization
Encoding Validation
Portuguese characters tested: população, educação, saúde, região, satélites, políticas, públicas, and 30+ more common Brazilian dataset terms.
Corruption patterns detected: é, á, Ã, ó, ú, ã, ç, ô, ê, à , õ (common UTF-8 corruption)
If you experience encoding issues in Claude Desktop (e.g., seeing satélites instead of satélites), run the tests to verify the issue is in the display layer, not the MCP server itself.
📚 About
Base dos Dados is Brazil's largest open data platform, providing standardized access to Brazilian public datasets through BigQuery.
Data Coverage: Demographics, Economics, Education, Politics, Health, Environment
📄 License
MIT License
This server cannot be deployed
Maintenance
Related MCP Connectors
This MCP server provides seamless access to Malaysia's government open data, including datasets, w…
The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.
MCP server for Brazilian Federal Senate open data (legislative, administrative, e-Cidadania).
- UnifAPIOAuthcom.unifapi
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn 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.71,759MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to query public open data from Recife, Brazil using natural language. It exposes tools for schema exploration and SQL query generation via Gemini 2.5 Flash, backed by a local DuckDB database.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP 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.MIT
- AlicenseNot gradedqualityDmaintenanceMCP 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.MIT