MCPInstall

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
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads datagouv-mcp-server automatically when relevant.

  3. 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)

  1. Go to Settings → Apps and connectors
  2. Enable Developer mode in Advanced settings
  3. Go to Connectors → Browse connectors → Add a new connector
  4. Set URL to https://mcp.data.gouv.fr/mcp and 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)

  1. Go to Intelligence → Connectors
  2. Click Add connector → Custom MCP Connector
  3. Name it (e.g., "DataGouv")
  4. Set URL to https://mcp.data.gouv.fr/mcp
  5. Leave authentication disabled and click Create

HuggingChat

  1. Click + icon → MCP Servers → Manage MCP Servers
  2. Click + Add Server
  3. Enter Server Name (e.g., "Data Gouv")
  4. Set Server URL to https://mcp.data.gouv.fr/mcp
  5. Click Add Server, then Health Check to 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

VariableDefaultDescription
MCP_HOST0.0.0.0Host to bind to (use 127.0.0.1 for local dev)
MCP_PORT8000Port for the MCP HTTP server
MCP_ENVlocalEnvironment name (for Sentry): local, prod, preprod, demo
DATAGOUV_API_ENVproddata.gouv.fr environment: prod or demo
LOG_LEVELINFOPython logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL
SENTRY_DSN(unset)Sentry DSN for error monitoring (optional)
SENTRY_SAMPLE_RATE1.0Sentry 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 query
  • page_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

  1. Start with broad search
  2. Get dataset details with get_dataset
  3. List resources with list_resources
  4. 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:

  1. Verify the public instance is up: curl https://mcp.data.gouv.fr/mcp
  2. Check your network/firewall settings
  3. Try running a local instance instead

Local Server Won't Start

Symptom: Error when running uv run main.py

Solutions:

  1. Ensure uv is installed: pip install uv
  2. Verify Python version compatibility (check pyproject.toml)
  3. Check .env file exists and is loaded
  4. Review logs with LOG_LEVEL=DEBUG

No Results Returned

Symptom: Search returns empty results

Solutions:

  1. Verify DATAGOUV_API_ENV is set correctly (prod vs demo)
  2. Try broader search terms
  3. Check if specific filters are too restrictive
  4. 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

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

View all →

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

AI & Agents505 installs

playwright-mcp-server

reason-machines/mcp-skills

Browser automation MCP server using Playwright's accessibility tree for LLM-friendly web interaction

AI & Agents285 installs

tradingview-mcp-assistant

reason-machines/mcp-skills

Open the skill to read its SKILL.md instructions.

AI & Agents256 installs

lanhu-mcp-collaboration

reason-machines/mcp-skills

Open the skill to read its SKILL.md instructions.

AI & Agents245 installs

chrome-devtools-mcp-automation

reason-machines/mcp-skills

Expert guidance for Chrome DevTools MCP server - browser automation, debugging, and performance analysis for AI agents

AI & Agents239 installs

github-mcp-server

reason-machines/mcp-skills

Open the skill to read its SKILL.md instructions.

AI & Agents237 installs

Popular ai & agents skills

View category →

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).

AI & Agents513.9K installs

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).

AI & Agents513.5K installs

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.

OfficialAI & Agents416.4K installs

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.

AI & Agents402.1K installs

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.

AI & Agents401K installs

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

AI & Agents245.7K installs