senado-br-mcp
MCP server for Brazilian Federal Senate open data (legislators, bills, votes, committees).
Servidor MCP (Model Context Protocol) que permite acesso estruturado aos dados abertos do Senado Federal do Brasil, democratizando o acesso a informações legislativas através de conversas com IA.
Features
33 tools for accessing Senate data
Real-time data from official API
e-Cidadania integration: citizen participation data via web scraping
Structured JSON responses
Error handling with actionable suggestions
TypeScript with full type safety
Two access modes: stdio (npm) and HTTP remote
Two Ways to Use
Mode | Installation | Best For |
stdio/npm |
| Technical users, local usage |
HTTP remote | None required | Non-technical users, cloud access |
Both modes provide access to the same 33 tools.
Option 1: stdio/npm (Local)
Installation
Using npx (Recommended):
Global Installation:
From Source:
Claude Desktop Configuration
Add to your claude_desktop_config.json:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Option 2: HTTP Remote (Cloud)
No installation required. Connect directly via URL.
Claude Desktop Configuration
In Claude Desktop settings, go to "Add Custom Connector" and enter:
Name: senado-br-mcp
URL:
https://senado-br-mcp.up.railway.app/mcp
Endpoints
Endpoint | Description |
| Server info and documentation |
| Health check |
| Usage statistics |
| MCP protocol endpoint |
Rate Limiting
The HTTP server has a monthly request limit to stay within free tier:
Alerts are sent at 50%, 80%, and 100% usage
When limit is reached, use the npm version instead
Limit resets on the 1st of each month
Available Tools
Senators (Senadores)
Tool | Description |
| List senators in office or by legislature. Filters: state (UF), party |
| Get detailed info about a senator (biography, mandates, committees) |
| Search senators by name |
| List how a senator voted. Filters: year, date range |
Legislative Matters (Matérias)
Tool | Description |
| Search bills by type (PEC, PL, PLP, MPV), number, year, keyword, author |
| Get bill details (summary, author, status, rapporteur) |
| Get bill's procedural history |
| Get bill texts (original, substitute, final) with download URLs |
| Get voting results for a bill |
Votes (Votações)
Tool | Description |
| List plenary votes by year. Filters: month, date range |
| Get vote details with nominal votes by senator |
| Get recent votes (last N days) |
Committees (Comissões)
Tool | Description |
| List committees. Filters: type (permanent, temporary, CPI), active |
| Get committee details (president, vice-president, purpose) |
| List committee members with roles |
| List committee meetings with agenda |
Agenda
Tool | Description |
| Get plenary session schedule with voting agenda |
| Get committee meeting schedule |
Lookup/Auxiliary (Auxiliares)
Tool | Description |
| Get current legislature info (number, period, dates) |
| List valid bill types (PEC, PL, PLP, MPV, etc.) |
| List parties with senator count |
| List states with senator count |
e-Cidadania (Citizen Participation)
Tools for accessing e-Cidadania data - the Senate's citizen participation platform.
Public Consultations (Consultas Públicas)
Tool | Description |
| List public consultations with citizen voting on pending bills |
| Get consultation details including votes, author, and comments |
| Get polarized consultations (~50/50 votes) - useful for identifying divisive issues |
| Get consensual consultations (>85% one way) - identifies broad agreement |
Legislative Ideas (Ideias Legislativas)
Tool | Description |
| List citizen-proposed legislative ideas |
| Get idea details including full description and conversion to bill |
| Get most supported legislative ideas |
Interactive Events (Eventos Interativos)
Tool | Description |
| List interactive events (hearings, confirmations, livestreams) |
| Get event details including agenda, guests, and video link |
| Get events with most citizen comments and questions |
Analysis Tools
Tool | Description |
| AI-assisted analysis to suggest topics for monthly surveys based on participation metrics |
Note: e-Cidadania tools use web scraping with rate limiting and caching. If the e-Cidadania website is temporarily unavailable, API tools (senators, bills, votes) remain operational.
Usage Examples
List senators from São Paulo
Search for Constitutional Amendments in 2024
Get recent votes
Find a senator by name
Get CCJ committee members
Get polarized public consultations
Get most supported citizen ideas
Find upcoming interactive events
Response Format
All tools return structured JSON responses:
Success Response
Error Response
Development
Prerequisites
Node.js 18+
npm
Setup
Build
Development Mode
Type Check
Test with MCP Inspector
Self-Hosting HTTP Server
You can host your own HTTP server instance.
Local
Railway
Fork this repository
Connect Railway to your GitHub
Deploy (auto-detects configuration from
railway.json)Set environment variables:
MONTHLY_REQUEST_LIMIT(default: 10000)ALERT_WEBHOOK_URL(optional, for notifications)
Environment Variables
Variable | Description | Default |
| Server port | 3000 |
| Monthly request limit | 10000 |
| Webhook for alerts | - |
| Logging level | info |
Data Sources
Official API
Documentation: https://legis.senado.leg.br/dadosabertos/docs/
Format: JSON
Authentication: None (public data)
e-Cidadania (Web Scraping)
Website: e-Cidadania
Content: Public consultations, legislative ideas, interactive events
Method: HTML scraping with rate limiting (1 req/sec) and caching (15min-24h)
Fallback: If e-Cidadania is unavailable, API tools continue working
Bill Types (Tipos de Matéria)
Code | Name | Description |
PEC | Proposta de Emenda à Constituição | Constitutional Amendment |
PL | Projeto de Lei | Ordinary Law Bill |
PLP | Projeto de Lei Complementar | Complementary Law Bill |
MPV | Medida Provisória | Provisional Measure |
PDL | Projeto de Decreto Legislativo | Legislative Decree Bill |
PRS | Projeto de Resolução do Senado | Senate Resolution Bill |
PLC | Projeto de Lei da Câmara | Chamber of Deputies Bill |
License
MIT
Author
Sidney da Silva Pereira Bissoli
Repository
https://github.com/SidneyBissoli/senado-br-mcp
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
1.1.0
Added e-Cidadania integration (11 new tools)
Web scraping infrastructure with rate limiting and caching
Public consultations analysis (polarized/consensual)
Legislative ideas tracking
Interactive events monitoring
Survey topic suggestion tool
1.0.0
Initial release
22 tools for Senate data access
Senators, bills, votes, committees, agenda, and lookup tools