Repository avatar
Search & Data Extraction
v0.1.1
active

france-parliament-mcp-server

io.github.cyanheads/france-parliament-mcp-server

Search members, bills, votes, and amendments from both chambers of France’s Parliament.

Documentation

@cyanheads/france-parliament-mcp-server

Search members, bills, votes, and amendments from both chambers of France’s Parliament via MCP. STDIO or Streamable HTTP.
9 Tools

Version License npm Framework

Install in Claude Desktop Install in Cursor Install in VS Code

Overview

Search French parliamentary open data from the Assemblée nationale and Sénat. Use French search terms and pass the returned IDs to the detail tools to follow a bill, inspect a roll call, or read an amendment.

Tools

NameDescription
frparl_search_membersFind deputies and senators by name, status, group, department, or committee.
frparl_get_memberRead mandates, group history, committee roles, and recorded vote counts.
frparl_search_dossiersFind bills by title, origin, procedure, state, or date of last activity.
frparl_get_dossierFollow the legislative timeline across chambers and find linked roll calls.
frparl_search_votesFind roll calls by title, dossier, member, date, or outcome.
frparl_get_voteInspect tallies, group breakdowns, corrections, and named positions.
frparl_search_amendmentsFind amendments by text, dossier, signer, group, article, stage, or fate.
frparl_get_amendmentRead complete amendment text, rationale, signers, and relationships by ID.
frparl_list_referenceRead identifier formats, code tables, coverage, and mirror status.

Capability reference

All four search tools accept offset and limit, default to 25 results, and clamp at 100 unless otherwise noted. The chamber filter accepts assemblee or senat.

frparl_search_members tool

  • Filter by query, chamber, status (current or former), group, department, or committee.
  • Results include member IDs, a linked identity where verified, and current or last known group and constituency.

frparl_get_member tool

  • Supply an id from member search, a Sénat matricule, or an official Sénat profile URL.
  • Check found before reading mandates, roles, official links, and recorded position counts.

frparl_search_dossiers tool

  • Filter by query, origin (assemblee, senat, or gouvernement), procedure, state (in_progress, adopted, or promulgated), from_date, or to_date. Dates apply to the latest legislative activity.
  • Linked chamber records appear once, with their IDs and link_source.

frparl_get_dossier tool

  • Supply an id from dossier search or an official dossier URL.
  • Check found before reading the timeline, official citations, and the newest 25 linked roll calls. The result includes vote_total and vote_continuation when more roll calls are available.

frparl_search_votes tool

  • Filter by query, chamber, dossier_id, member_id, from_date, to_date, or outcome (adopted or rejected). type (ordinaire, solennel, or censure) applies to the Assemblée. amendment_number applies to the Sénat.
  • position (pour, contre, abstention, or non_votant) and against_group require member_id. Member results include the recorded position and the source of the group majority when known.

frparl_get_vote tool

  • Supply either id from vote search, including a supported Sénat vote URL, or the Sénat session and number.
  • Check found before reading official tallies, group breakdowns, linked amendments, and corrections. Named positions can be filtered by position or group. Page them with offset and positions_limit (default 25, maximum 600) and follow next_offset.

frparl_search_amendments tool

  • Filter by query, chamber, text_id or Sénat session with text_number, dossier_id, author_id, group, article, stage (commission or séance), fate (adopted, rejected, withdrawn, not_moved, or inadmissible), or filing dates from_date and to_date. The author filter also matches cosigners.
  • Results include amendment IDs, official links, and published fate. Set include_text for the complete dispositif and exposé. This changes the default limit to 10 and the maximum to 25.

frparl_get_amendment tool

  • Supply ids from amendment search. Each call resolves the first ten, with additional IDs in remaining_ids and a continuation.
  • Results include published text, fate, signers, and available relationships. A missing Assemblée ID can trigger a live lookup once the mirror is ready. not_found holds confirmed misses. Retry IDs in failures carrying the live_amendment_unavailable reason.

frparl_list_reference tool

  • Supply topic: identifiers, coverage, data_status, groups, procedures, act_codes, vote_codes, organ_types, or amendment_fates.
  • Read identifier guidance, known codes, and baseline coverage even with an empty mirror. Check data_status for the active generation and source refresh status, and coverage for date ranges and counts after import.

Features

  • Local SQLite mirror shared by clients and the CLI. Searches read a published snapshot while imports prepare the next one.
  • Standard I/O and Streamable HTTP via @cyanheads/mcp-ts-core.
  • Dossier timelines join the two chambers where an official cross-reference identifies the same bill.

Agent-friendly output

  • Source provenance includes dataset credits and official record URLs where available. Sénat group breakdowns identify their derived majority, and sitting-based dossier links carry their provenance.
  • Search results include effective selectors and pagination. Amendment batch results distinguish confirmed misses from retryable lookup failures.
  • Text and structured MCP results carry the same data, including French amendment text and official links.

Coverage and attribution

ChamberCoverage
Assemblée nationale17th legislature exports, including carried-over dossiers and historical mandates in the covered roster. Recorded roll calls start in October 2024. The publication feed adds newer and republished amendments.
SénatSenators since 1958 in ODSEN. DOSLEG dossiers start in October 1977, with some adopted texts from October 1958. Nominal roll calls start in October 2006. AMELI covers séance filings from October 2001 and commission filings from around October 2010.

Use frparl_list_reference with topic: "coverage" for the ranges and counts in your snapshot. Assemblée votes expose published named positions. Sénat group breakdowns use dated group memberships. The service is unofficial. Data comes from Assemblée nationale open data and Sénat open data, under their respective Assemblée licence and Sénat licence.

Getting started

With Node.js 24 or later, initialize the mirror in a terminal before connecting your client. The public data sources require no API key.

npx -y @cyanheads/france-parliament-mcp-server mirror:init

Initialization downloads and indexes the official datasets. A measured published SQLite snapshot occupied 8,069,689,344 bytes (about 8.1 GB). Budget additional local disk space for downloaded archives, indexes, SQLite staging, and the active snapshot retained during a refresh. The CLI checks available space as it imports.

The CLI and server use ~/.local/share/france-parliament-mcp-server by default. For a different location, set FRPARL_DATA_DIR to the same writable absolute path in the terminal and the client configuration. An empty directory still allows an MCP session and reference calls. Search and detail tools report mirror_not_ready until initialization publishes the first snapshot.

Add it to Claude Code:

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

For other clients, add this to your MCP configuration:

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

For a source build or local HTTP transport, see Running the server.

Configuration

VariableDescriptionDefault
FRPARL_DATA_DIRWritable local mirror directory shared by the CLI and server.~/.local/share/france-parliament-mcp-server
MCP_TRANSPORT_TYPETransport (stdio or http).stdio
MCP_HTTP_HOSTHTTP bind address.127.0.0.1
MCP_HTTP_PORTHTTP port.3010
MCP_HTTP_ENDPOINT_PATHMCP endpoint path over HTTP./mcp

See .env.example for optional overrides.

Running the server

Maintain the mirror

npx -y @cyanheads/france-parliament-mcp-server mirror:refresh
npx -y @cyanheads/france-parliament-mcp-server mirror:top-up
npx -y @cyanheads/france-parliament-mcp-server mirror:verify

mirror:refresh checks for updated bulk archives. mirror:top-up imports standalone Assemblée amendments from today's and yesterday's publication lists in Paris time. mirror:verify checks the active snapshot and reports counts. STDIO sessions rely on explicit maintenance. HTTP mode schedules a daily bulk refresh at 04:20 and an hourly top-up at minute 00 in the server's time zone. Run mirror:init explicitly in either mode.

Local development

Requires Bun 1.4.4 or later for development and Node.js 24 or later for the start scripts.

git clone https://github.com/cyanheads/france-parliament-mcp-server.git
cd france-parliament-mcp-server
bun install
bun run rebuild
bun dist/index.js mirror:init
bun run start:stdio
# Or serve locally over HTTP at http://127.0.0.1:3010/mcp
bun run start:http

bun run bundle builds the Claude Desktop bundle. The bundle also uses the same mirror, which you prepare with the CLI before connecting.

Docker

Build locally and reuse one volume for initialization and serving. The container's bun user needs write access to the mounted directory.

docker build -t france-parliament-mcp-server .
docker run --rm -v frparl-mirror:/usr/src/app/.mirror france-parliament-mcp-server bun dist/index.js mirror:init
docker run --rm -p 127.0.0.1:3010:3010 -v frparl-mirror:/usr/src/app/.mirror france-parliament-mcp-server

Project structure

PathPurpose
src/index.tsMCP entry point and mirror CLI dispatch.
src/mcp-server/toolsThe nine tool definitions and their shared response schema.
src/services/assemblee, src/services/senatChamber-specific archive readers and normalizers.
src/services/mirrorArchive downloads, generation publication, and refresh jobs.
src/services/parliamentShared identifiers, schema, and read queries.
testsTool and service tests.

See the project tree and design notes for details.

Development guide

See CLAUDE.md or AGENTS.md for development guidance.

  • Register tools in the createApp() tool array in src/index.ts.
  • Let handlers throw typed errors and use ctx.log for request-scoped logging.
  • Validate raw source data, normalize to domain types, and return the output schema. Preserve missing fields as unknown and keep the provenance for derived values.

Contributing

Issues are welcome. Run checks and tests before submitting.

bun run devcheck
bun run test

License

Apache-2.0. See LICENSE.

NPM
@cyanheads/france-parliament-mcp-server
Install Command
npm install @cyanheads/france-parliament-mcp-server
Runtime: npx
NPM
@cyanheads/france-parliament-mcp-server
Install Command
npm install @cyanheads/france-parliament-mcp-server
Runtime: npx