Accesses Canadian government transportation infrastructure data through ESRI REST services, enabling queries of bridges, airports, and other infrastructure from provincial open data portals in multiple data formats including GeoJSON.
Government of Canada Open Data MCP Servers
Python-based Model Context Protocol (MCP) servers for accessing Canada's Open Government data. This project includes two complementary MCP servers:
GOV CA DATASET MCP - Universal dataset discovery, search, and metadata retrieval across all Canadian government open data
GOV CA TRANSPORTATION MCP - Specialized infrastructure querying for bridges, tunnels, airports, ports, and railways with Statistics Canada cost data
Features
Dataset Discovery (gov_mcp)
Search across 250,000+ datasets from Open Government Canada
Browse by topic, organization, or jurisdiction (federal/provincial/municipal)
Get detailed dataset schemas and download URLs
Track recent dataset updates
Transportation Infrastructure (gov_ca_transportation)
Query bridge conditions using Statistics Canada national data for all provinces
Get infrastructure replacement costs from Statistics Canada surveys
Search airports and ports across Canada
Query railway infrastructure
Search tunnels by province and type
Unified data approach: Uses Statistics Canada Core Public Infrastructure Survey for consistent national coverage
Quick Start
Installation
Running the Servers
Docker Deployment
Both MCP servers can be run as Docker containers individually or together using Docker Compose.
Using Docker Compose (Recommended)
Building Individual Docker Images
Running Individual Containers
Docker Endpoints
Server | Container Port | Host Port | SSE Endpoint |
Dataset Discovery | 8002 | 8002 | |
Transportation | 8001 | 8001 |
SSE (Server-Sent Events) Transport
Both MCP servers support an SSE transport for HTTP-based streaming. Start either server with the --sse flag and a port argument to enable the SSE endpoint:
When SSE is enabled, the server logs the SSE endpoint (e.g., http://0.0.0.0:8001/sse). You can connect to that endpoint using a web client, curl, or a Python SSE client.
Example connections:
Curl (raw stream):
JavaScript (EventSource):
Python (httpx-sse):
Notes:
The SSE endpoint serves MCP events and results over HTTP for compatible clients.
The MCP server will print the SSE endpoint URL and port when started with
--sse.SSE-based transports require client support for Server-Sent Events (EventSource), or using Python/HTTP libraries with SSE support like
httpx-sse.
Architecture
Data Sources
The Transportation MCP uses Statistics Canada as the primary data source for national coverage:
Data Type | Primary Source | Coverage |
Bridge Conditions | Statistics Canada Table 34-10-0288-01 | All provinces/territories |
Infrastructure Costs | Statistics Canada Table 34-10-0284-01 | All provinces/territories |
Detailed Bridge Records | Provincial Open Data | Ontario, Quebec, Nova Scotia |
Airports | Quebec Open Data, BC OpenMaps | Quebec, British Columbia |
Railways | National Railway Network | National |
Available Tools
Dataset Discovery MCP (gov_mcp) - 7 Tools
Tool | Description |
| Search across all 250,000+ Canadian government datasets |
| Get complete schema with field definitions and download URLs |
| Browse by department/organization |
| Explore datasets by subject area |
| Check which specialized MCPs are available |
| See recently updated datasets |
| Query data directly (fallback mode) |
Transportation Infrastructure MCP (gov_ca_transportation) - 7 Tools
Tool | Description |
| Search bridge infrastructure by province with StatCan condition data |
| Aggregate condition analysis using Statistics Canada data |
| Get replacement costs by condition from Statistics Canada |
| Search airports, ports, marinas, heliports |
| Search railway lines and stations |
| Search tunnel infrastructure |
| Compare infrastructure across provinces |
Example Usage
Search for Datasets
Analyze Bridge Conditions
Get Infrastructure Costs
Query Bridges
Project Structure
Configuration
VS Code MCP Settings
Add to your VS Code settings.json or MCP config:
Development
Running Tests
Running Validation
Key Capabilities
250,000+ datasets searchable from Open Government Canada
Statistics Canada integration for authoritative national infrastructure data
All provinces covered for bridge conditions and infrastructure costs
Real infrastructure data from provincial/municipal open data portals
Multiple data formats: GeoJSON, CSV, ZIP (StatCan)
Condition analysis: Bridge condition percentages, replacement costs by condition
Geographic filtering: By province or national aggregate
API Sources
Source | Data Types |
Statistics Canada | Infrastructure costs, bridge conditions (national) |
open.canada.ca | Federal datasets |
donnees.montreal.ca | Montreal bridge records |
data.ontario.ca | Ontario bridge records |
openmaps.gov.bc.ca | BC airports, railways |
data.novascotia.ca | Nova Scotia structures |
donneesquebec.ca | Quebec airports |
License
MIT License - See LICENSE file for details
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Add tests for new functionality
Submit a pull request