Loading...
Loading...
Use the data.gouv.fr MCP server to search, explore, and analyze French Open Data datasets through AI chatbots
npx skill4agent add aradotso/mcp-skills datagouv-mcp-serverSkill by ara.so — MCP Skills collection.
https://mcp.data.gouv.fr/mcphttps://mcp.data.gouv.fr/mcp~/.config/Claude/claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"datagouv": {
"command": "npx",
"args": [
"mcp-remote",
"https://mcp.data.gouv.fr/mcp"
]
}
}
}{
"isUsingBuiltInNodeForMcp": false,
"mcpServers": {
"datagouv": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.data.gouv.fr/mcp"]
}
}
}SettingsApps and connectorsAdvanced settingsConnectorsBrowse connectorsAdd a new connectorhttps://mcp.data.gouv.fr/mcp{
"mcpServers": {
"datagouv": {
"url": "https://mcp.data.gouv.fr/mcp",
"transport": "http"
}
}
}{
"servers": {
"datagouv": {
"url": "https://mcp.data.gouv.fr/mcp",
"type": "http"
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"datagouv": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.data.gouv.fr/mcp"]
}
}
}IntelligenceConnectorsAdd connectorCustom MCP Connectorhttps://mcp.data.gouv.fr/mcpMCP ServersManage MCP Servers+ Add Serverhttps://mcp.data.gouv.fr/mcpAdd ServerHealth Check# 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# 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| Variable | Default | Description |
|---|---|---|
| | Host to bind to (use |
| | Port for the MCP HTTP server |
| | Environment name (for Sentry): |
| | data.gouv.fr environment: |
| | Python logging level: |
| (unset) | Sentry DSN for error monitoring (optional) |
| | Sentry trace sampling rate (0.0-1.0) |
"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""What datasets does INSEE publish?"
"List all datasets from the Ministry of Health""Give me information about dataset ID abc123"
"What resources are available in this dataset?"search_datasetsqpage_sizepageorganizationtagbadgefeaturedtemporal_coveragegranularityschemalicenseget_datasetdataset_idlist_resourcesdataset_idget_resourceresource_idimport 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()){
"mcpServers": {
"datagouv-local": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8007"
]
}
}
}# 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# 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
}
)get_datasetlist_resourcesget_resource# 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}
)"isUsingBuiltInNodeForMcp": falseclaude_desktop_config.json{
"isUsingBuiltInNodeForMcp": false,
"mcpServers": { ... }
}curl https://mcp.data.gouv.fr/mcpuv run main.pyuvpip install uvpyproject.toml.envLOG_LEVEL=DEBUGDATAGOUV_API_ENVproddemo# Install dev dependencies
uv sync --dev
# Run tests
uv run pytest
# Run with coverage
uv run pytest --cov=srcLOG_LEVEL=DEBUG uv run main.pyDATAGOUV_API_ENV=demo uv run main.py