Skip to main content
Glama
datagouv

datagouv-mcp

by datagouv

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_PORTNoPort for the MCP HTTP server8000
DATAGOUV_ENVNoControls which data.gouv.fr environment to use: 'prod' for https://www.data.gouv.fr or 'demo' for https://demo.data.gouv.frprod

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_datasetsA

Search for datasets on data.gouv.fr by keywords.

This is typically the first step in exploring data.gouv.fr. Use short, specific queries (the API uses AND logic, so generic words like "données" or "fichier" may return zero results).

Use sort to order results. Accepted values: created, last_update, reuses, followers, views. Optionally prefixed with '-' for descending (e.g. -last_update). Use last_update_range to restrict results to recently updated datasets: last_30_days, last_12_months, last_3_years.

Typical workflow: search_datasets → list_dataset_resources → query_resource_data.

search_organizationsA

Find publishing organizations on data.gouv.fr (who publishes datasets and reuses).

Pass a short query with distinctive words (acronym, ministry name, city, "INSEE", etc.). Generic or very broad terms often return large result sets; combine with page / page_size or add badge / name / business_number_id when you need a narrow list.

Leave query empty to list organizations with pagination (same as browsing the catalog). Use sort to order results (e.g. name, datasets, reuses, followers, views, created, last_modified, or the same with a leading '-' for descending, such as -datasets).

badge filters by publisher type: public-service, certified, association, company, local-authority.

The reply includes how many organizations matched, the current page, and for each hit: name (and acronym if any), id, slug, badges, optional usage metrics, and links to the organization page.

search_dataservicesA

Search for third-party APIs (dataservices) on data.gouv.fr by keywords.

Third-party APIs (or dataservices) are APIs registered in the data.gouv.fr catalog that provide programmatic access to data (unlike datasets which are static files). Use short, specific queries (the API uses AND logic, so generic words like "données" or "fichier" may return zero results).

Typical workflow: search_dataservices → get_dataservice_info → get_dataservice_openapi_spec → call the API using base_api_url per spec.

get_dataservice_infoA

Get detailed metadata about a specific third-party API (dataservice).

Returns title, description, organization, base_api_url, machine_documentation_url (OpenAPI/Swagger spec), license, and dates.

To use a third-party API: (1) get its info here, (2) fetch the OpenAPI spec via get_dataservice_openapi_spec, (3) call base_api_url per spec.

get_dataservice_openapi_specA

Fetch and summarize the OpenAPI/Swagger spec for a third-party API (dataservice).

Retrieves machine_documentation_url from catalog metadata (dataservice record), fetches the spec, and returns a summary of available endpoints with their parameters. Use this to understand how to call the API.

Typical workflow: search_dataservices → get_dataservice_info → get_dataservice_openapi_spec → call the API using base_api_url per spec.

query_resource_dataA

Query tabular data from a resource via the Tabular API (no download needed).

Works for CSV/XLSX files. Start with small page_size (20) to preview structure. Use filter_column/filter_value/filter_operator to filter, sort_column/sort_direction to sort. Filter operators: exact, contains, less, greater, strictly_less, strictly_greater. For large datasets requiring full analysis, paginate through pages or use get_resource_info to retrieve the raw file URL and fetch it directly.

get_dataset_infoA

Get detailed metadata about a specific dataset.

Returns title, description, organization, tags, resource count, creation/update dates, and license information.

list_dataset_resourcesA

List all resources (files) in a dataset with their metadata.

Returns resource ID, title, format, size, and URL for each file. Next step: use query_resource_data for CSV/XLSX files via the Tabular API, or fetch the resource URL directly for other formats (JSON, JSONL) or large datasets.

get_resource_infoA

Get detailed information about a specific resource (file).

Returns format, size, MIME type, URL, and checks Tabular API availability. Helps decide whether to use query_resource_data (if Tabular API is available) or fetch the raw file URL directly for unsupported formats or large files.

get_metricsA

Get usage metrics (visits, downloads) for a dataset or resource.

Returns monthly statistics sorted by most recent first. At least one of dataset_id or resource_id must be provided. Note: Only available in production environment (not demo).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/datagouv/datagouv-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server