
datagouv-mcp-server
Use the data.gouv.fr MCP server to search, explore, and analyze French Open Data datasets through AI chatbots
- Installs
- 206
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/mcp-skills --skill datagouv-mcp-server- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads datagouv-mcp-server automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
datagouv-mcp-server
Skill by ara.so — MCP Skills collection.
Overview
The data.gouv.fr MCP Server is a Model Context Protocol (MCP) server that enables AI chatbots (Claude, ChatGPT, Gemini, etc.) to search, explore, and analyze datasets from data.gouv.fr, the French national Open Data platform, directly through conversation.
Instead of manually browsing the website, users can ask natural language questions like:
- "Quels jeux de données sont disponibles sur les prix de l'immobilier?"
- "Montre-moi les dernières données de population pour Paris"
Key Features:
- Read-only access to French Open Data (no API key required)
- Search datasets by keywords, topics, and filters
- Explore dataset metadata, resources, and organizations
- Works with all major MCP-compatible chatbots
- Public hosted instance at
https://mcp.data.gouv.fr/mcp - Self-hostable with Docker or Python
Installation & Configuration
Using the Public Hosted Instance (Recommended)
The easiest way to use this MCP server is to connect to the public instance at https://mcp.data.gouv.fr/mcp. No installation required.
Client-Specific Configuration
Claude Desktop
Add to ~/.config/Claude/claude_desktop_config.json (Linux), ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"datagouv": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.data.gouv.fr/mcp"
]
}
}
}
Windows-specific fix: If the server doesn't connect, add this at the root level:
{
"isUsingBuiltInNodeForMcp": false,
"mcpServers": {
"datagouv": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.data.gouv.fr/mcp"]
}
}
}
ChatGPT (Paid Plans Only)
- Go to
Settings→Apps and connectors - Enable Developer mode in
Advanced settings - Go to
Connectors→Browse connectors→Add a new connector - Set URL to
https://mcp.data.gouv.fr/mcpand save
Cursor
In Cursor Settings, search for "MCP" and add:
{
"mcpServers": {
"datagouv": {
"url": "https://mcp.data.gouv.fr/mcp",
"transport": "http"
}
}
}
VS Code
Run MCP: Open User Configuration from Command Palette, then add:
{
"servers": {
"datagouv": {
"url": "https://mcp.data.gouv.fr/mcp",
"type": "http"
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"datagouv": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.data.gouv.fr/mcp"]
}
}
}
Le Chat (Mistral)
- Go to
Intelligence→Connectors - Click
Add connector→Custom MCP Connector - Name it (e.g., "DataGouv")
- Set URL to
https://mcp.data.gouv.fr/mcp - Leave authentication disabled and click Create
HuggingChat
- Click + icon →
MCP Servers→Manage MCP Servers - Click
+ Add Server - Enter Server Name (e.g., "Data Gouv")
- Set Server URL to
https://mcp.data.gouv.fr/mcp - Click
Add Server, thenHealth Checkto verify
Running Locally
Prerequisites
- Docker & Docker Compose (recommended)
- OR Python with uv installed
With Docker (Recommended)
# Clone the repository
git clone git@github.com:datagouv/datagouv-mcp.git
cd datagouv-mcp
# Run with default settings (port 8000, prod environment)
docker compose up -d
# Run with custom settings
MCP_PORT=8007 DATAGOUV_API_ENV=demo LOG_LEVEL=DEBUG docker compose up -d
# Stop
docker compose down
With Python/uv
# Clone the repository
git clone git@github.com:datagouv/datagouv-mcp.git
cd datagouv-mcp
# Install dependencies
uv sync
# Create environment file
cp .env.example .env
# Edit .env as needed (optional)
# MCP_HOST=127.0.0.1
# MCP_PORT=8007
# DATAGOUV_API_ENV=prod
# LOG_LEVEL=INFO
# Load environment variables
set -a && source .env && set +a
# Start the server
uv run main.py
Environment Variables
| Variable | Default | Description |
|---|---|---|
MCP_HOST | 0.0.0.0 | Host to bind to (use 127.0.0.1 for local dev) |
MCP_PORT | 8000 | Port for the MCP HTTP server |
MCP_ENV | local | Environment name (for Sentry): local, prod, preprod, demo |
DATAGOUV_API_ENV | prod | data.gouv.fr environment: prod or demo |
LOG_LEVEL | INFO | Python logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL |
SENTRY_DSN | (unset) | Sentry DSN for error monitoring (optional) |
SENTRY_SAMPLE_RATE | 1.0 | Sentry trace sampling rate (0.0-1.0) |
Using the MCP Server
Once configured, you can interact with the MCP server through your AI chatbot by asking questions in natural language.
Example Queries
Search datasets:
"Find datasets about real estate prices in France"
"Quels jeux de données existent sur la pollution de l'air?"
"Show me population data for Paris"
Explore organizations:
"What datasets does INSEE publish?"
"List all datasets from the Ministry of Health"
Dataset details:
"Give me information about dataset ID abc123"
"What resources are available in this dataset?"
Available MCP Tools
The server exposes read-only tools for searching and exploring data.gouv.fr:
search_datasets
Search for datasets by keywords, topics, organizations, etc.
Parameters:
q(string, optional): Search querypage_size(int, optional): Results per page (default: 20)page(int, optional): Page number (default: 1)- Additional filters:
organization,tag,badge,featured,temporal_coverage,granularity,schema,license
get_dataset
Retrieve detailed information about a specific dataset.
Parameters:
dataset_id(string, required): The dataset ID or slug
list_resources
List all resources (files, APIs) within a dataset.
Parameters:
dataset_id(string, required): The dataset ID or slug
get_resource
Get detailed information about a specific resource.
Parameters:
resource_id(string, required): The resource ID
Code Examples
Python Client Example
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def search_datasets():
server_params = StdioServerParameters(
command="npx",
args=["mcp-remote", "https://mcp.data.gouv.fr/mcp"]
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# Initialize the connection
await session.initialize()
# Search for datasets
result = await session.call_tool(
"search_datasets",
arguments={"q": "population", "page_size": 5}
)
print(result)
asyncio.run(search_datasets())
Connecting a Custom Local Server
If you're running the server locally on port 8007:
{
"mcpServers": {
"datagouv-local": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8007"
]
}
}
}
Docker Compose Custom Configuration
# docker-compose.yml
services:
mcp-server:
build: .
ports:
- "8007:8007"
environment:
- MCP_HOST=0.0.0.0
- MCP_PORT=8007
- MCP_ENV=prod
- DATAGOUV_API_ENV=prod
- LOG_LEVEL=INFO
- SENTRY_DSN=${SENTRY_DSN}
restart: unless-stopped
Common Patterns
Searching with Filters
When helping users search datasets, combine text queries with filters:
# Search for recent environmental datasets from a specific org
result = await session.call_tool(
"search_datasets",
arguments={
"q": "environment climate",
"organization": "ademe",
"badge": "climate-change",
"page_size": 10
}
)
Progressive Exploration
- Start with broad search
- Get dataset details with
get_dataset - List resources with
list_resources - Get specific resource details with
get_resource
Handling Pagination
# Get first page
page1 = await session.call_tool(
"search_datasets",
arguments={"q": "transport", "page": 1, "page_size": 20}
)
# Get next page
page2 = await session.call_tool(
"search_datasets",
arguments={"q": "transport", "page": 2, "page_size": 20}
)
Troubleshooting
Server Not Connecting in Claude Desktop (Windows)
Symptom: Server appears in list but never connects, no tools visible
Solution: Add "isUsingBuiltInNodeForMcp": false to the root of claude_desktop_config.json:
{
"isUsingBuiltInNodeForMcp": false,
"mcpServers": { ... }
}
See issue #69
Connection Timeout
Symptom: Server fails to respond or times out
Solutions:
- Verify the public instance is up:
curl https://mcp.data.gouv.fr/mcp - Check your network/firewall settings
- Try running a local instance instead
Local Server Won't Start
Symptom: Error when running uv run main.py
Solutions:
- Ensure
uvis installed:pip install uv - Verify Python version compatibility (check
pyproject.toml) - Check
.envfile exists and is loaded - Review logs with
LOG_LEVEL=DEBUG
No Results Returned
Symptom: Search returns empty results
Solutions:
- Verify
DATAGOUV_API_ENVis set correctly (prodvsdemo) - Try broader search terms
- Check if specific filters are too restrictive
- Test the same query on https://www.data.gouv.fr directly
CORS Issues (Browser-Based Clients)
Symptom: CORS errors in browser console
Solution: The public instance should handle CORS. If self-hosting, ensure your server configuration allows CORS from your client origin.
Development & Testing
Run Tests
# Install dev dependencies
uv sync --dev
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov=src
Enable Debug Logging
LOG_LEVEL=DEBUG uv run main.py
Test Against Demo Environment
DATAGOUV_API_ENV=demo uv run main.py
This connects to https://demo.data.gouv.fr instead of production.
Resources
- Project Repository: https://github.com/datagouv/datagouv-mcp
- Public Instance: https://mcp.data.gouv.fr/mcp
- data.gouv.fr Platform: https://www.data.gouv.fr
- MCP Specification: https://modelcontextprotocol.io
- Feedback Form: https://tally.so/r/KYMboX
License
MIT License - See the repository for full details.
FAQ
What does the datagouv-mcp-server skill do?
Use the data.gouv.fr MCP server to search, explore, and analyze French Open Data datasets through AI chatbots
How do I install datagouv-mcp-server?
Run npx skills add https://github.com/reason-machines/mcp-skills --skill datagouv-mcp-server in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/datagouv-mcp-server/ (personal) or .claude/skills/datagouv-mcp-server/ (project).
Which AI agents can use datagouv-mcp-server?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is datagouv-mcp-server safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains datagouv-mcp-server?
It is published by reason-machines in reason-machines/mcp-skills. It has 206 recorded installs.
More from reason-machines/mcp-skills
codebase-memory-mcp-intelligence
reason-machines/mcp-skills
High-performance code intelligence MCP server that indexes codebases into knowledge graphs for structural queries, call traces, and architecture analysis
playwright-mcp-server
reason-machines/mcp-skills
Browser automation MCP server using Playwright's accessibility tree for LLM-friendly web interaction
tradingview-mcp-assistant
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
lanhu-mcp-collaboration
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
chrome-devtools-mcp-automation
reason-machines/mcp-skills
Expert guidance for Chrome DevTools MCP server - browser automation, debugging, and performance analysis for AI agents
github-mcp-server
reason-machines/mcp-skills
Open the skill to read its SKILL.md instructions.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available