Open Source - MIT - Python 3.11+

Données Québec MCP

Quebec open data for AI agents

Model Context Protocol server that lets AI agents (Claude, ChatGPT, Gemini, Cursor, VS Code, etc.) search, explore, and analyze open datasets from Donnees Quebec, City of Montreal, and Quebec's geospatial services (IGO), directly through conversation.

Instead of manually browsing portals, simply ask your questions and get instant answers — including SQL-powered analytics.

SQL queries on DataStore | OGC geospatial layers | 3 data sources | Bilingual FR/EN

docker compose up -d
GitHub

Key Features

16 MCP Tools

Dataset search, metadata, SQL queries, geospatial layers, organizations and catalog statistics.

3 Data Sources

Donnees Quebec (provincial portal), City of Montreal (municipal data) and IGO geospatial services.

Direct SQL

SQL queries on CKAN DataStore — aggregations, GROUP BY, joins, subqueries on open data.

OGC Geospatial

WFS/WMS layers via Infrastructure Geomatique Ouverte — GeoJSON features, schemas and map images.

Query Examples

What are the top 10 police stations with the most criminal acts in Montreal?

The agent automatically runs a SQL GROUP BY query on Montreal's DataStore. Result: Centre-Sud (24,942), Plateau-Mont-Royal (23,041), Ville-Marie East (20,135)...

Find data on Montreal's public trees, explore the structure, then tell me how many trees per borough.

The agent chains 3 tools: search_montreal_datasets, query_montreal_data, then query_montreal_sql. Result: 333,556 trees across 13 boroughs, Mercier-Hochelaga-Maisonneuve leading (37,871).

How many organizations publish data on Donnees Quebec?

139 organizations, 1,584 datasets. City of Montreal leads with 383 datasets (24% of catalog), followed by Laval (133) and MELCCFP (119).

What geospatial layers are available for Quebec's cultural heritage?

The agent queries IGO WFS and finds 7 layers from the Ministry of Culture: national heritage sites, declared sites, cited sites, protected lands — with full schema.

16 Available Tools

Donnees Quebec (9 tools)

search_datasetsSearch by keywords, organization, tags
get_dataset_infoFull dataset metadata
list_dataset_resourcesList files/resources of a dataset
get_resource_infoResource details
query_resource_dataQuery DataStore with filters and pagination
query_resource_sqlDirect SQL — aggregations, joins, subqueries
list_organizationsMinistries, cities, agencies
get_organization_infoOrganization details
get_catalog_statsGlobal catalog statistics

City of Montreal (3 tools)

search_montreal_datasetsSearch on donnees.montreal.ca
query_montreal_dataQuery Montreal's DataStore
query_montreal_sqlSQL on Montreal data

Geospatial / IGO (4 tools)

list_geospatial_layersWFS/WMS layers from IGO
get_geospatial_featuresGeoJSON features from WFS
describe_geospatial_layerLayer schema (fields, types)
get_map_urlWMS map image URL

Connect Your AI Agent

claude mcp add --transport http donneesqc http://localhost:8000/mcp

Run Locally

Docker (recommended)

git clone https://github.com/Stefen-Taime/donneesqc-mcp.git
cd donneesqc-mcp
docker compose up -d

Manual install

git clone https://github.com/Stefen-Taime/donneesqc-mcp.git
cd donneesqc-mcp
uv sync
cp .env.example .env
set -a && source .env && set +a
uv run python main.py

MIT License - Maintained by mcsEdition

pythonmcpopen-dataquebecmontrealckangeospatialigosql

Python 3.11+ required · Streamable HTTP only

In brief

What is the Données Québec MCP server?

The Données Québec MCP server is an open-source connector that implements the Model Context Protocol (MCP) to expose Quebec open data to AI agents. MCP is an open standard published by Anthropic in 2024 that lets an agent — Claude Desktop, ChatGPT with plugin, Gemini, Cursor — use external tools in a standardised way. The server exposes 16 tools covering 3 sources: Données Québec (the province's CKAN portal, over 1,800 datasets), Données Montréal (the city portal, around 800 datasets) and IGO (the government geospatial infrastructure, OGC WFS and WMS layers). Tools include keyword search, schema inspection, SQL execution against datastores, and geospatial bounding-box queries. The connector targets data analysts, journalists, and AI agent builders.

How do I install Données Québec MCP with Claude or Cursor?

The Données Québec MCP server is distributed as a Python package on PyPI and a JSON configuration file for major MCP clients. For Claude Desktop, the user adds 8 lines to the `claude_desktop_config.json` file located in the app's configuration folder — installation takes under 2 minutes after a `pip install donneesqc-mcp` command. For Cursor, the equivalent configuration goes into `~/.cursor/mcp.json`. Once active, the agent can answer questions such as "Which Montreal boroughs have the most public trees per capita?" by running an SQL query against the "Public tree inventory" dataset and cross-referencing population data. The source code is available under the MIT license on GitHub and is maintained by mcsÉdition.

Frequently asked questions

What is MCP and why this server?

The Model Context Protocol (MCP) lets AI agents like Claude or ChatGPT use external tools. This server exposes Quebec, Montreal and IGO open data through 16 tools (search, SQL, OGC layers) directly callable by AI agents.

Which clients work with this MCP?

Any Model Context Protocol-compatible client: Claude Desktop, Cursor, ChatGPT (via compatible plugin), Gemini, and any MCP SDK.

Données Québec MCP — MCP Server for Quebec Open Data | mcsÉdition