mcp-gouv-fr
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-gouv-fr Find datasets about air quality in France"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-gouv-fr
MCP server built with FastMCP for Claude Desktop, Cursor, and other clients. Use it to explore French public open data through ready-made tools instead of calling each portal yourself.
Source repository: github.com/gghez/mcp-gouv-fr
APIs
API | What you can do |
Search and open datasets: metadata, organization, and links to files or APIs. | |
Look up communes, departments, and regions (names, codes, and related geography). | |
Look up a legal entity (SIREN) or an establishment (SIRET); needs an INSEE API key. | |
Run GraphQL queries on Radio France open data; needs an API token. |
data.gouv.fr
Tools use the datagouv_ prefix.
Tool | What it does |
| Search datasets by title, description, or organization, with pagination. |
| Full metadata and resource links for one dataset (id or slug). |
geo.api.gouv.fr
Tools use the geo_ prefix.
Tool | What it does |
| Search communes by name, postal code, and/or department (at least one filter). |
| Commune details by INSEE municipality code. |
| List or search departments. |
| Department detail by code. |
| List or search regions. |
| Region detail by code. |
INSEE API Sirene
Tools use the insee_ prefix. Set MCP_GOUV_INSEE_API_KEY or these tools will report a configuration error.
Tool | What it does |
| Legal unit (unité légale) by 9-digit SIREN. |
| Establishment (établissement) by 14-digit SIRET. |
Radio France Open API
Tools use the radiofrance_ prefix. Set MCP_GOUV_RADIOFRANCE_API_TOKEN for radiofrance_graphql.
Tool | What it does |
| Execute a GraphQL query against Radio France public data. |
Default transport is stdio for local MCP clients; streamable HTTP is optional for remote access (see Transports and CLI options).
Related MCP server: mcp-datagouv
Prerequisites
uv installed and available on your
PATH(souvxworks).This project targets Python 3.14 (
requires-pythoninpyproject.toml). uv will provision a compatible interpreter when installing from Git or from a local checkout.If you use
uvxwith agit+https://...URL (recommended install-from-GitHub flow below), Git must be installed andgitmust be on thePATHof the MCP subprocess. uv clones or updates the repo using Git; if Git is missing you get:Git executable not found. On Windows, Claude Desktop sometimes spawns MCP servers with a shorterPATHthan your terminal: either use the clone +uv runsetup, or extendPATHin the serverenvblock (see below).
Recommended setup: MCP config with uvx (GitHub)
uvx runs the published console script mcp-gouv-fr in an isolated environment. You can point it at this repository with --from and a Git URL (no manual clone required).
Command shape:
uvx --from git+https://github.com/gghez/mcp-gouv-fr.git mcp-gouv-frOptional: pin a branch, tag, or commit after @ in the URL (see uv tools guide), for example git+https://github.com/gghez/mcp-gouv-fr.git@v0.1.0.
Claude Desktop (claude_desktop_config.json)
Typical path on Windows: %APPDATA%\Claude\claude_desktop_config.json.
{
"mcpServers": {
"mcp-gouv-fr": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/gghez/mcp-gouv-fr.git",
"mcp-gouv-fr"
],
"env": {
"PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW"
}
}
}
}Restart Claude Desktop after editing. If uvx is not found, use the full path to the uv executable and run uv tool run instead of uvx, or add uv to your user PATH.
If uv fails with “Git executable not found” (common on Windows), the MCP host did not expose git on PATH. Fixes:
System-wide (simplest): add
C:\Program Files\Git\cmd(or your Git install) to the user or systemPATHin Windows Settings so GUI apps (Claude Desktop) inherit it, then restart Claude.Per server: set
env.PATHin the MCP JSON to a single string that lists every folder the process needs, in order — at minimum Git’scmdand the folder containinguv.exe/uvx.exe(e.g.C:\Users\YOU\.local\bin). Some clients replace the processPATHentirely whenenvis set, so do not rely on${PATH}expansion unless you verified your client merges variables.Avoid Git at MCP startup: use clone +
uv run(uv run --directory … mcp-gouv-fr) afteruv syncin that clone; uv then runs the project without cloning from Git on each start.
Cursor and other editors
Use the same JSON shape in your MCP servers configuration: command uvx, args as above. For stdio, do not pass extra arguments unless you need non-default transport (see below).
If uvx is not on PATH (Windows)
Use the full path to uv.exe and the equivalent invocation:
{
"mcpServers": {
"mcp-gouv-fr": {
"command": "C:\\Users\\YOU\\AppData\\Local\\Programs\\uv\\uv.exe",
"args": [
"tool",
"run",
"--from",
"git+https://github.com/gghez/mcp-gouv-fr.git",
"mcp-gouv-fr"
]
}
}
}Adjust the command path to match your uv installation.
Alternative: clone the repo and run with uv
For a fixed checkout or local changes:
git clone https://github.com/gghez/mcp-gouv-fr.git
cd mcp-gouv-fr
uv sync
uv run mcp-gouv-frMCP JSON (stdio) — set --directory to your clone:
{
"mcpServers": {
"mcp-gouv-fr": {
"command": "uv",
"args": [
"run",
"--directory",
"C:\\path\\to\\mcp-gouv-fr",
"mcp-gouv-fr"
]
}
}
}Transports and CLI options
Default is stdio (suitable for Claude Desktop and Cursor).
uvx --from git+https://github.com/gghez/mcp-gouv-fr.git mcp-gouv-fr --transport stdioStreamable HTTP (bind address, port, path can be changed):
uvx --from git+https://github.com/gghez/mcp-gouv-fr.git mcp-gouv-fr --transport streamable-http --host 127.0.0.1 --port 8765 --path /mcpEnvironment variables (optional): MCP_GOUV_TRANSPORT, MCP_GOUV_HOST, MCP_GOUV_PORT, MCP_GOUV_HTTP_PATH, MCP_GOUV_APIS (comma-separated API ids; default: all), MCP_GOUV_LOG_LEVEL (logging level for stderr; default: INFO).
Environment variables (API behavior)
Variable | Description |
| Comma-separated API ids to load ( |
| data.gouv API base URL (default: |
| Geo API base URL (default: |
| INSEE portal consumer key for Sirene (required for |
| Sirene 3.11 API base (default: |
| Radio France GraphQL endpoint (default: |
| Radio France Open API key ( |
| Outbound HTTP timeout in seconds (default: |
|
|
| Stderr log level for the server process ( |
In MCP JSON, set these under env next to command / args if your client supports it.
INSEE Sirene (API key required)
Unlike data.gouv and geo.api.gouv.fr, Sirene lookups will not work until you set an API key. Subscribe to the Sirene API on the INSEE developer portal, generate a consumer key, and expose it to the MCP process as MCP_GOUV_INSEE_API_KEY. The server sends it as the X-INSEE-Api-Key-Integration header to api.insee.fr. If this variable is missing or empty, the insee_* tools return an error that asks you to configure it.
When using Claude Desktop or Cursor, add MCP_GOUV_INSEE_API_KEY to the server’s environment (e.g. env in the MCP JSON config) so the subprocess inherits it.
Development
Contributors: tests and lint live in the repo. Run uv run pytest and uv run ruff check src. Install Git hooks with uv run pre-commit install (runs ruff check --fix on commit). Tool outputs use Pydantic models (JSON Schema for MCP clients). See AGENTS.md for layout conventions (nested tests next to the code they cover).
License
Not set yet (no LICENSE file in this repository).
Available Tools
11 toolsdatagouv_get_datasetA
Return dataset metadata and resources for one dataset.
Args: dataset_id: Dataset id or slug.
Inputs: dataset_id (required). Returns: Full dataset metadata and resource list for the ``get_dataset`` tool.
datagouv_search_datasetsA
Search datasets (title, description, organization).
Args: query: Free-text search query. page: Page number (1-based). page_size: Page size (keep reasonably small, e.g. ≤ 100).
Inputs: query (required), page, page_size. Returns: Paginated dataset search results for the ``search_datasets`` tool.
geo_get_communeA
Return one commune by INSEE municipality code.
Args:
code: INSEE code commune (5 characters for mainland; includes Corsica 2A/2B
departments' communes with standard 5-digit codes).
Inputs: code (required). Returns: Commune row from a search/list response or full commune detail.
geo_get_departementA
Return one department by code, including its region when available.
Args:
code: Official department code (e.g. 13, 75, 2A).
Inputs: code (required). Returns: Department row from list/search or embedded under a commune.
geo_get_regionA
Return one region by code.
Args:
code: Official region code (e.g. 11 for Île-de-France).
Inputs: code (required). Returns: Region row from list/search or nested reference.
geo_search_communesA
Search communes by name, postal code, and/or parent department.
At least one of nom, code_postal, or code_departement must be non-empty so the
query stays bounded (the upstream API can return very large slices without filters).
Args:
nom: Substring or fuzzy name (e.g. Paris); optional if other filters are set.
code_postal: Five-digit postal code; optional if other filters are set.
code_departement: Department code (e.g. 75); optional if other filters are set.
boost_population: When true, rank name search by population (upstream boost param).
limit: Maximum number of results (keep small, e.g. ≤ 50).
Inputs: nom, limit, code_postal, boost_population, +1 more. Returns: List of communes returned by ``search_communes``.
geo_search_departementsA
List all departments or fuzzy-search them by name.
Args:
nom: When set, filters departments by name; when omitted, returns the full list
(subject to limit).
limit: Cap on returned rows (default covers all mainland + overseas departments).
Inputs: nom, limit. Returns: List of departments from ``search_departements``.
geo_search_regionsA
List all regions or fuzzy-search them by name.
Args: nom: When set, filters regions by name; when omitted, returns every region. limit: Cap on returned rows (France has fewer than 20 regions).
Inputs: nom, limit. Returns: List of regions from ``search_regions``.
insee_get_etablissementA
Return the establishment (établissement) for one 14-digit SIRET.
Use this for a specific branch or address (SIRET includes the SIREN plus a NIC). Requires a valid portal API key.
Args: siret: Fourteen-digit SIRET (spaces optional).
Inputs: siret (required). Returns: Response body for a single SIRET lookup on API Sirene 3.11.
insee_get_unite_legaleA
Return the legal unit (unité légale) for one 9-digit SIREN.
Use this to resolve a company identifier to its official INSEE record (status, denomination, activity codes, etc.). Requires a valid portal API key.
Args: siren: Nine-digit SIREN (spaces optional).
Inputs: siren (required). Returns: Response body for a single SIREN lookup on API Sirene 3.11.
radiofrance_graphqlA
Execute a GraphQL query or mutation against the Radio France Open API.
The upstream API is documented at https://developers.radiofrance.fr/ (programs, channels, podcasts). Use introspection or the hosted explorer (with your API token) to discover fields and types.
Args: query: GraphQL document (query or mutation). variables: Optional variables object; omit or pass empty dict when the query has none.
Inputs: query (required), variables. Returns: Result of a GraphQL operation against the Radio France Open API.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct resource and action: datasets, communes, departements, regions, legal units, establishments, and a generic GraphQL access point are all cleanly separated. Search vs. get operations are unambiguous within each domain, and no two tools appear to overlap in purpose.
Tool names follow a consistent domain_verb_noun pattern: datagouv_search/get, geo_search/get, insee_get, and radiofrance_graphql. snake_case is used uniformly, and the verbs search/get clearly indicate whether a tool lists/filters or fetches a single entity.
11 tools is a reasonable, well-scoped count for a public-data server covering datasets, administrative geography, and company records. The radiofrance_graphql tool is a broad catch-all that slightly expands the server's scope, but it is still a single coherent integration point.
The dataset and geography domains have solid search/get coverage for their core entities, and INSEE identifiers map directly to legal units and establishments. Missing search-by-name for INSEE and some administrative geography depth (e.g., arrondissements) are minor gaps for a read-only public-data server.
Maintenance
Related MCP Connectors
Independent platform exposing French official public territorial data through read-only MCP tools.
MCP server for French (BOAMP) + EU (TED) public procurement data via TenderAPI.
French public-data MCP: cross-ref health, demographics, business, geo & real-estate.
data.gouv.fr MCP — French open-data catalogue.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Datagouv APIs, primarily allowing users to search for up-to-date information about companies registered in France.11-
- AlicenseNot gradedqualityDmaintenanceMCP server to query French Open Data from data.gouv.frMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for accessing Strasbourg Open Data (data.strasbourg.eu). Allows searching datasets, retrieving metadata, and querying records with ODSQL.109 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for querying and exploring Issy-les-Moulineaux open data datasets (city services, mobility, environment) via OpenDataSoft API.107 npmMIT