Data.gouv.fr Tabular API MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Data.gouv.fr Tabular API MCP Server
This is a Model Context Protocol (MCP) server that provides access to the data.gouv.fr tabular API. It allows you to interact with French open data through a standardized interface.
Features
The MCP server provides 5 main tools:
get_resource- Get metadata and available endpoints for a specific resourceget_resource_profile- Get detailed column descriptions, types, and statisticsget_resource_data- Get paginated data with filtering and sorting capabilitiessearch_resources- Search for datasets and resources on data.gouv.frget_resource_swagger- Get API documentation showing available filters and sorts
Related MCP server: mcp-datagouv
Installation
Local Development
Install dependencies:
yarn installBuild the project:
yarn buildStart the server:
yarn devThe server will run on http://localhost:8000/mcp by default.
Usage
Finding a Resource ID
To use most tools, you need a Resource ID (rid). Here's how to find one:
Go to data.gouv.fr
Search for a dataset
Click on a dataset
Go to the Métadonnées tab of a resource
Copy the Resource ID (it looks like:
1c5075ec-7ce1-49cb-ab89-94f507812daf)
Example Resource ID
The documentation uses this example resource ID for films data:
1c5075ec-7ce1-49cb-ab89-94f507812daf
Tool Examples
1. Get Resource Metadata
{
"tool": "get_resource",
"parameters": {
"rid": "1c5075ec-7ce1-49cb-ab89-94f507812daf"
}
}2. Get Resource Profile
{
"tool": "get_resource_profile",
"parameters": {
"rid": "1c5075ec-7ce1-49cb-ab89-94f507812daf"
}
}3. Get Resource Data with Filtering
{
"tool": "get_resource_data",
"parameters": {
"rid": "1c5075ec-7ce1-49cb-ab89-94f507812daf",
"page": 1,
"page_size": 10,
"filters": {
"Producteur__exact": "20th Century Fox"
},
"sort": "Date de sortieau cinéma__sort=desc"
}
}4. Search for Resources
{
"tool": "search_resources",
"parameters": {
"query": "films cinéma",
"limit": 5
}
}5. Get API Documentation
{
"tool": "get_resource_swagger",
"parameters": {
"rid": "1c5075ec-7ce1-49cb-ab89-94f507812daf"
}
}Filtering Options
The get_resource_data tool supports various filtering operators:
column_name__exact=value- Exact matchcolumn_name__differs=value- Not equalcolumn_name__contains=value- Contains (for strings)column_name__in=value1,value2,value3- In listcolumn_name__less=value- Less thancolumn_name__greater=value- Greater thancolumn_name__strictly_less=value- Strictly less thancolumn_name__strictly_greater=value- Strictly greater than
Sorting Options
Use the sort parameter with:
column_name__sort=asc- Ascending ordercolumn_name__sort=desc- Descending order
Supported File Formats
The API supports these tabular formats:
CSV (max 100 MB)
CSV.GZ (max 100 MB)
XLS (max 50 MB)
XLSX (max 12.5 MB)
Rate Limits
The API has a rate limit of 100 requests per second.
Error Handling
The server includes comprehensive error handling for:
Network timeouts (30 seconds)
HTTP errors
Invalid resource IDs
API rate limiting
Development
To run in development mode:
yarn devTo build for production:
yarn buildTo clean build artifacts:
yarn clean🌐 Public Usage
Once deployed, your MCP server will be publicly available and can be used by anyone. Users can:
Connect via MCP clients using your server URL
Access French open data through the standardized MCP interface
Use all 5 tools for data exploration and analysis
Example Public Server Usage
{
"mcpServers": {
"datagouv-fr": {
"command": "npx",
"args": ["-y", "@huextrat/datagouv-tabular-api-mcp-server"],
"env": {
"MCP_SERVER_URL": "https://your-deployed-server.com/mcp"
}
}
}
}🤝 Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
📄 License
This project is licensed under the MIT License. The data.gouv.fr API is provided by the French government under open data policies.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
data.gouv.fr MCP — French open-data catalogue.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Search, sample and query open reproducible datasets published as immutable Parquet with schemas.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for exploring French public open data via APIs like data.gouv.fr, geo.api.gouv.fr, INSEE Sirene, and Radio France.11MIT
- AlicenseNot gradedqualityDmaintenanceMCP server to query French Open Data from data.gouv.frMIT
- AlicenseNot gradedqualityCmaintenanceToulouse Métropole Open Data MCP server. Enables searching datasets, retrieving metadata, and querying records using ODSQL.85 npmMIT
- AlicenseNot gradedqualityCmaintenanceMCP server for the French open-data catalogue data.gouv.fr, enabling dataset search and retrieval, organization lookup, and reuse discovery via natural language queries.80 npmMIT