france-parliament-mcp-server
by cyanheads
README.md
<div align="center">
<h1>@cyanheads/france-parliament-mcp-server</h1>
<p><b>Search members, bills, votes, and amendments from both chambers of France’s Parliament via MCP. STDIO or Streamable HTTP.</b><br>9 Tools</p>
</div>
<div align="center">
 [](./LICENSE) [](https://www.npmjs.com/package/@cyanheads/france-parliament-mcp-server) [](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
[](https://github.com/cyanheads/france-parliament-mcp-server/releases/download/v0.1.1/france-parliament-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=france-parliament-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvZnJhbmNlLXBhcmxpYW1lbnQtbWNwLXNlcnZlciJdfQ==) [](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22france-parliament-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Ffrance-parliament-mcp-server%22%5D%7D)
</div>
## 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
| Name | Description |
| :--- | :--- |
| `frparl_search_members` | Find deputies and senators by name, status, group, department, or committee. |
| `frparl_get_member` | Read mandates, group history, committee roles, and recorded vote counts. |
| `frparl_search_dossiers` | Find bills by title, origin, procedure, state, or date of last activity. |
| `frparl_get_dossier` | Follow the legislative timeline across chambers and find linked roll calls. |
| `frparl_search_votes` | Find roll calls by title, dossier, member, date, or outcome. |
| `frparl_get_vote` | Inspect tallies, group breakdowns, corrections, and named positions. |
| `frparl_search_amendments` | Find amendments by text, dossier, signer, group, article, stage, or fate. |
| `frparl_get_amendment` | Read complete amendment text, rationale, signers, and relationships by ID. |
| `frparl_list_reference` | Read 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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` <sub>tool</sub>
- 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`](https://github.com/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
| Chamber | Coverage |
| :--- | :--- |
| Assemblée nationale | 17th 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énat | Senators 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](https://data.assemblee-nationale.fr/) and [Sénat open data](https://data.senat.fr/), under their respective [Assemblée licence](https://data.assemblee-nationale.fr/licence-ouverte-open-licence) and [Sénat licence](https://data.senat.fr/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.
```sh
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:
```sh
claude mcp add france-parliament-mcp-server -- npx -y @cyanheads/france-parliament-mcp-server
```
For other clients, add this to your MCP configuration:
```json
{
"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](#running-the-server).
## Configuration
| Variable | Description | Default |
| :--- | :--- | :--- |
| `FRPARL_DATA_DIR` | Writable local mirror directory shared by the CLI and server. | `~/.local/share/france-parliament-mcp-server` |
| `MCP_TRANSPORT_TYPE` | Transport (`stdio` or `http`). | `stdio` |
| `MCP_HTTP_HOST` | HTTP bind address. | `127.0.0.1` |
| `MCP_HTTP_PORT` | HTTP port. | `3010` |
| `MCP_HTTP_ENDPOINT_PATH` | MCP endpoint path over HTTP. | `/mcp` |
See [`.env.example`](./.env.example) for optional overrides.
## Running the server
### Maintain the mirror
```sh
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](https://bun.sh/) for development and Node.js 24 or later for the `start` scripts.
```sh
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.
```sh
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
| Path | Purpose |
| :--- | :--- |
| `src/index.ts` | MCP entry point and mirror CLI dispatch. |
| `src/mcp-server/tools` | The nine tool definitions and their shared response schema. |
| `src/services/assemblee`, `src/services/senat` | Chamber-specific archive readers and normalizers. |
| `src/services/mirror` | Archive downloads, generation publication, and refresh jobs. |
| `src/services/parliament` | Shared identifiers, schema, and read queries. |
| `tests` | Tool and service tests. |
See [the project tree](./docs/tree.md) and [design notes](./docs/design.md) for details.
## Development guide
See [`CLAUDE.md`](./CLAUDE.md) or [`AGENTS.md`](./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.
```sh
bun run devcheck
bun run test
```
## License
Apache-2.0. See [LICENSE](./LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues