Skip to main content
Glama
@cyanheads/brazil-parliament-mcp-server

@cyanheads/brazil-parliament-mcp-server

by cyanheads

Version License Docker MCP SDK npm TypeScript Bun

Install in Claude Desktop Install in Cursor Install in VS Code

Framework


Overview

Follow legislation through Brazil’s Câmara dos Deputados and Senado Federal. Find recorded votes and party orientations, look up members and mandates, read speeches, and inspect receipts paid from parliamentary quotas. Use Portuguese search terms such as inteligência artificial. Records retain the published Portuguese wording.

Tools

Tool

Description

brparl_search_bills

Find bills by type, number, year, keywords, author, or presentation dates

brparl_get_bill

Read a bill’s chamber stages, procedural history, and published disposition

brparl_search_votes

Find votes by date, bill, legislative body, or participating senator

brparl_get_vote

Read one recorded vote, with published member positions, counts, and leadership orientations

brparl_search_members

Find deputies and senators on current or historical rosters

brparl_get_member

Read one member’s profile, mandates, and selected supplementary records

brparl_search_speeches

Find speeches within a date window and request complete published transcripts

brparl_search_expenses

Read quota receipts and totals by category and supplier

brparl_list_reference

Look up chamber identifiers, coverage notes, and official reference codes

Related MCP server: canada-parliament-mcp-server

Capability reference

brparl_search_bills tool

  • Search both chambers or select camara or senado. Use author_state for Câmara and in_progress for Senado. Specify year for older bills because upstream defaults narrow some unscoped searches.

  • Search for PL 2338/2023 with {"type":"PL","number":"2338","year":2023}. Pass a returned chamber and ID to brparl_get_bill to select a particular record.

brparl_get_bill tool

  • Pass an identifier or a chamber and id. Bills can change numbers across chambers. Check coverage for the identifiers tried in each chamber and review the published disposition for linked stages.

  • Get a compact history page with {"identifier":"PL 2338/2023","include_related":false,"history_limit":5}. This omits related and attached bill lists. history_offset applies to every stage, and each stage reports its own next_history_offset.

brparl_search_votes tool

  • Search by paired inclusive dates, a bill such as {"bill":"PL 2338/2023"}, a body such as plenary or a Câmara body ID, or a Senado senator_id. Date-only Senado searches cover at most one calendar year.

  • Use brparl_get_bill for procedural history because symbolic decisions may appear only there. Pass a returned chamber and id to brparl_get_vote for the detail of a published vote.

brparl_get_vote tool

  • Câmara IDs use item-sequence. Senado IDs use session/session-vote, for example {"chamber":"senado","id":"594169/7109"}.

  • party, state, and position filter the displayed members. Counts cover the entire published roll. Secret votes may show attendance and aggregate totals.

brparl_search_members tool

  • Search by parliamentary name, party, state, sex, or legislature. The legislature defaults to the current one. Set in_office:true for members currently in exercise.

  • Historical Senado rosters can show a later party affiliation from the member’s identification record. Request party_history with brparl_get_member for dated evidence.

brparl_get_member tool

  • Use a chamber and a string member ID, for example {"chamber":"senado","id":"825","sections":["committees","party_history"]}. Both chambers support these sections. Senado also supports leaves. Câmara supports history, professions, occupations, and external mandates.

  • Check section_coverage for supplementary records that are unavailable.

brparl_search_speeches tool

  • Câmara requires a member_id. With a member, each chamber supports windows up to one year. A Senate plenary search without a member requires both dates and a window of at most one month.

  • contains looks for literal text within the selected window, ignoring case and accents. Set include_text:true for complete published transcripts. Check text_status and publication-lag notices, especially for recent Senate speeches.

brparl_search_expenses tool

  • Pass chamber and member_id, with an optional year. The default scope is the last six months for Câmara CEAP and the current Brasília year for Senado CEAPS. month and supplier_id filters apply to Câmara.

  • grand_total, totals_by_type, and totals_by_supplier cover the full filtered set. BRL amounts are decimal strings. senado_yearly_totals holds the separately published annual figures when available. Supplier CPFs are masked.

brparl_list_reference tool

  • Use topic to select chambers, bill_types, situations, subjects, parties, committees, legislatures, vote_codes, expense_types, or states. For example, {"chamber":"camara","topic":"committees"} lists the body IDs accepted by vote search.

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

  • Results carry official sources URLs and attribution. Keep the source credit when quoting or republishing records.

  • Check coverage, next_offset, and notices before treating a page as complete. An unavailable chamber or transcript leaves gaps in the result.

  • The server omits member CPFs, personal contact details, and private addresses. Public parliamentary contact fields and masked supplier IDs can appear where published.

Data sources and reuse

Getting started

Add it to Claude Code with Node.js 24 or later available for npx:

claude mcp add brazil-parliament-mcp-server -- npx -y @cyanheads/brazil-parliament-mcp-server

For other clients, add this to your MCP client configuration file:

{
  "mcpServers": {
    "brazil-parliament-mcp-server": {
      "command": "npx",
      "args": ["-y", "@cyanheads/brazil-parliament-mcp-server"]
    }
  }
}

The data APIs require no keys. Connections to the Câmara and Senado legislative APIs timed out during testing on one US residential network. If a call reports a connection timeout, check whether those upstream hosts are reachable from the machine running the server.

For Docker or a source build, see Running the server.

Configuration

Variable

Description

Default

MCP_TRANSPORT_TYPE

Transport, stdio or http.

stdio

MCP_HTTP_HOST

Bind address in HTTP mode.

127.0.0.1

MCP_HTTP_PORT

Port in HTTP mode.

3010

MCP_HTTP_ENDPOINT_PATH

Local HTTP endpoint path.

/mcp

MCP_SESSION_MODE

HTTP session mode.

stateless

MCP_USAGE_REPORTING

Opt in to sharing tool-call summaries.

false

See .env.example for the full list of optional overrides.

Running the server

Local development

Building requires Bun v1.4.4 or higher. The built server runs on Node.js 24 or later.

git clone https://github.com/cyanheads/brazil-parliament-mcp-server.git
cd brazil-parliament-mcp-server
bun install
bun run rebuild
bun run start:stdio
# or
bun run start:http

In local HTTP mode, connect the client to http://127.0.0.1:3010/mcp.

bun run devcheck
bun run test
bun run lint:mcp

Docker

docker run --rm -p 127.0.0.1:3010:3010 ghcr.io/cyanheads/brazil-parliament-mcp-server:latest

The image defaults to HTTP transport, stateless sessions, and logs in /var/log/brazil-parliament-mcp-server. For stdio, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/brazil-parliament-mcp-server:latest"]. To build locally, run docker build -t brazil-parliament-mcp-server .. Pass --build-arg OTEL_ENABLED=false to omit OpenTelemetry peer dependencies.

Project structure

Path

Purpose

src/index.ts

Registers the nine tools and configures the MCP server

src/mcp-server/tools

MCP schemas, handlers, pagination, and response formatting

src/services

Chamber API integration, validation, and normalization

tests/

Contract and service tests

Development guide

  • Handlers throw failures for the framework to classify and render.

  • Use ctx.log for request-scoped logging and propagate ctx.signal to upstream work.

  • Register tools in src/index.ts. Keep structured and text outputs equivalent.

  • Validate upstream payloads, normalize them to domain types, and preserve missing or unknown values.

Contributing

Issues are welcome. Run bun run devcheck and bun run test before submitting. For vulnerabilities, follow the security policy.

License

Apache-2.0 applies to the server code. See LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables searching and retrieving Brazilian legislative propositions, reading their full texts, finding related propositions, and accessing dataset releases and downloads with provenance and official source URLs.
      7
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables tracking of Canadian federal parliamentary records by searching bills, members, House divisions, and indexed Hansard speeches, then retrieving detailed dossiers, profiles, tallies, and full speech text from official public sources. Runs over STDIO or Streamable HTTP with no API key required.
      364 npm
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables discovery and retrieval of European Parliament procedures, MEPs, plenary votes, documents, speeches, and questions from the Open Data API over STDIO or Streamable HTTP.
      353 npm
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables searching and retrieving UK Parliament records — bills, members, Commons and Lords divisions, Hansard contributions, written questions, and committee business — from the official Parliament APIs. Runs over STDIO or Streamable HTTP with no API key, linking records across their distinct identifiers.
      316 npm
      1
      Apache 2.0