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