mcpField
S
senado-br-mcp

senado-br-mcp

Local
github.com/SidneyBissoliLegal & Government0Updated 18w ago

About senado-br-mcp

senado-br-mcp provides structured access to Brazilian Federal Senate open data, including legislators, bills, votes, committees, and e-Cidadania participation. The repository is deprecated; the project has moved to senado-br-mcp-cloudflare, and the npm package now publishes the newer server.

Key features

  1. 01Looks up senators and mandates
  2. 02Searches bills and procedural history
  3. 03Retrieves votes and committee information
  4. 04Reads e-Cidadania consultations and ideas
  5. 05Returns structured JSON with source metadata

Use cases

  1. 01Check a senator's record or voting history
  2. 02Track a bill's status and legislative progress
  3. 03Review public consultations and citizen-proposed ideas

MCP support

The project exposes Senate open-data tools to MCP clients. The README directs users to the moved server, available as a hosted endpoint or through npm/stdio.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"sidneybissoli-senado-br": {
"command": "npx",
"args": [
"-y",
"senado-br-mcp"
]
}
}
}
Run commandnpx -y senado-br-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmsenado-br-mcp1.2.0

Tools

33

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
ufstringNoSigla do estado (ex: SP, RJ, MG)
partidostringNoParty abbreviation (e.g., PT, PL, MDB)
emExerciciobooleanNoFiltrar apenas senadores em exercício
legislaturaintegerNoNúmero da legislatura (ex: 57 para 2023-2027)

Details

From the project README

⚠️ Deprecated — this repository has moved

This server is no longer maintained here. The Brazilian Senate MCP server now lives at senado-br-mcp-cloudflare — 66 tools with level-1 provenance, available both hosted (https://senado.sidneybissoli.com/mcp, no setup) and via npm/stdio (npx senado-br-mcp, v3.x). The npm package senado-br-mcp now publishes that server (v3.2.1+); versions < 3.0.0 here are deprecated. Please migrate — this repository is archived.


Senado Brasil MCP Server

npm version npm downloads node MCP Registry GitHub stars GitHub Sponsors License: MIT

🇧🇷 Leia em Português

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.

See it in action

Ask your assistant, in plain Portuguese:

  • "Liste os senadores de SP em exercício." → senado_listar_senadores
  • "Mostre a tramitação da PEC 45/2019." → senado_buscar_materias + senado_obter_materia
  • "Quais ideias legislativas mais apoiadas estão abertas no e-Cidadania?" → senado_ecidadania_listar_ideias

The answers come live from the Senate's official open-data APIs — real data with provenance, not numbers guessed from training data.

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

ModeInstallationBest For
stdio/npmnpx senado-br-mcpTechnical users, local usage
HTTP remoteNone requiredNon-technical users, cloud access

Both modes provide access to the same 33 tools.


Option 1: stdio/npm (Local)

Installation

Using npx (Recommended):

npx senado-br-mcp

Global Installation:

npm install -g senado-br-mcp
senado-br-mcp

From Source:

git clone https://github.com/SidneyBissoli/senado-br-mcp.git
cd senado-br-mcp
npm install
npm run build
npm start
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

{
  "mcpServers": {
    "senado-br-mcp": {
      "command": "npx",
      "args": ["-y", "senado-br-mcp"]
    }
  }
}

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
EndpointDescription
GET /Server info and documentation
GET /healthHealth check
GET /statsUsage statistics
POST /mcpMCP 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)
ToolDescription
senado_listar_senadoresList senators in office or by legislature. Filters: state (UF), party
senado_obter_senadorGet detailed info about a senator (biography, mandates, committees)
senado_buscar_senador_por_nomeSearch senators by name
senado_votacoes_senadorList how a senator voted. Filters: year, date range
Legislative Matters (Matérias)
ToolDescription
senado_buscar_materiasSearch bills by type (PEC, PL, PLP, MPV), number, year, keyword, author
senado_obter_materiaGet bill details (summary, author, status, rapporteur)
senado_tramitacao_materiaGet bill's procedural history
senado_textos_materiaGet bill texts (original, substitute, final) with download URLs
senado_votos_materiaGet voting results for a bill
Votes (Votações)
ToolDescription
senado_listar_votacoesList plenary votes by year. Filters: month, date range
senado_obter_votacaoGet vote details with nominal votes by senator
senado_votacoes_recentesGet recent votes (last N days)
Committees (Comissões)
ToolDescription
senado_listar_comissoesList committees. Filters: type (permanent, temporary, CPI), active
senado_obter_comissaoGet committee details (president, vice-president, purpose)
senado_membros_comissaoList committee members with roles
senado_reunioes_comissaoList committee meetings with agenda
Agenda
ToolDescription
senado_agenda_plenarioGet plenary session schedule with voting agenda
senado_agenda_comissoesGet committee meeting schedule
Lookup/Auxiliary (Auxiliares)
ToolDescription
senado_legislatura_atualGet current legislature info (number, period, dates)
senado_tipos_materiaList valid bill types (PEC, PL, PLP, MPV, etc.)
senado_partidosList parties with senator count
senado_ufsList 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)
ToolDescription
senado_ecidadania_listar_consultasList public consultations with citizen voting on pending bills
senado_ecidadania_obter_consultaGet consultation details including votes, author, and comments
senado_ecidadania_consultas_polarizadasGet polarized consultations (~50/50 votes) - useful for identifying divisive issues
senado_ecidadania_consultas_consensuaisGet consensual consultations (>85% one way) - identifies broad agreement
Legislative Ideas (Ideias Legislativas)
ToolDescription
senado_ecidadania_listar_ideiasList citizen-proposed legislative ideas
senado_ecidadania_obter_ideiaGet idea details including full description and conversion to bill
senado_ecidadania_ideias_popularesGet most supported legislative ideas
Interactive Events (Eventos Interativos)
ToolDescription
senado_ecidadania_listar_eventosList interactive events (hearings, confirmations, livestreams)
senado_ecidadania_obter_eventoGet event details including agenda, guests, and video link
senado_ecidadania_eventos_popularesGet events with most citizen comments and questions
Analysis Tools
ToolDescription
senado_ecidadania_sugerir_tema_enqueteAI-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
Use senado_listar_senadores with uf: "SP"
Search for Constitutional Amendments in 2024
Use senado_buscar_materias with sigla: "PEC", ano: 2024
Get recent votes
Use senado_votacoes_recentes with dias: 7
Find a senator by name
Use senado_buscar_senador_por_nome with nome: "Randolfe"
Get CCJ committee members
Use senado_membros_comissao with sigla: "CCJ"
Get polarized public consultations
Use senado_ecidadania_consultas_polarizadas with minimoVotos: 5000
Get most supported citizen ideas
Use senado_ecidadania_ideias_populares with limite: 5
Find upcoming interactive events
Use senado_ecidadania_listar_eventos with status: "agendado"

Response Format

All tools return structured JSON responses:

Success Response
{
  "success": true,
  "data": { ... },
  "metadata": {
    "fonte": "Senado Federal - Dados Abertos",
    "dataConsulta": "2024-01-15T10:30:00Z",
    "endpoint": "/senador/lista/atual"
  }
}
Error Response
{
  "success": false,
  "error": {
    "code": "SENADOR_NAO_ENCONTRADO",
    "message": "Senator with code 99999 was not found",
    "suggestion": "Use senado_buscar_senador_por_nome to find the correct code"
  }
}

Development

Prerequisites
  • Node.js 18+
  • npm
Setup
npm install
Build
# Build stdio version (npm package)
npm run build

# Build HTTP server version
npm run build:server

# Build both
npm run build:all
Development Mode
# stdio mode
npm run dev

# HTTP server mode
npm run dev:server
Type Check
npm run typecheck
Test with MCP Inspector
npm run inspect

Self-Hosting HTTP Server

You can host your own HTTP server instance.

Local
npm run build:server
npm run start:server
# Server runs on http://localhost:3000
Railway
  1. Fork this repository
  2. Connect Railway to your GitHub
  3. Deploy (auto-detects configuration from railway.json)
  4. Set environment variables:
    • MONTHLY_REQUEST_LIMIT (default: 10000)
    • ALERT_WEBHOOK_URL (optional, for notifications)
Environment Variables
VariableDescriptionDefault
PORTServer port3000
MONTHLY_REQUEST_LIMITMonthly request limit10000
ALERT_WEBHOOK_URLWebhook for alerts-
LOG_LEVELLogging levelinfo

Data Sources

Official API
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)

CodeNameDescription
PECProposta de Emenda à ConstituiçãoConstitutional Amendment
PLProjeto de LeiOrdinary Law Bill
PLPProjeto de Lei ComplementarComplementary Law Bill
MPVMedida ProvisóriaProvisional Measure
PDLProjeto de Decreto LegislativoLegislative Decree Bill
PRSProjeto de Resolução do SenadoSenate Resolution Bill
PLCProjeto de Lei da CâmaraChamber 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.