Logo von MCP Canada

MCP Canada

Organisation
ReyemTech

MCP server for Canadian government data — 266 bilingual tools across 9 federal, 7 provincial & 2 municipal open-data APIs (Bank of Canada, StatCan, weather, recalls, drugs, immigration, BC/Alberta/Saskatchewan/Manitoba/Quebec/Ontario + more)

HerausgeberReyemTech
Repositorymcp-canada
SprachePython
Forks
8
Sterne
61
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    MCP Canada stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • 0 verfügbare Tools

    Sehen Sie sich unten die aufrufbaren Aktionen an, einschließlich Namen und Beschreibungen, sofern der Server diese bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    61 Sterne und 8 Forks im verlinkten Repository.


295 tools, ~107 prompts, and ~141 resources across 9 federal APIs + 9 provincial APIs + 2 municipal APIs + 1 local SQLite datastore — exchange rates, parliamentary data, product recalls, drug information, 80K+ open datasets, food nutrition data, real-time weather, immigration statistics, Ontario provincial data, Toronto municipal data, York Region ArcGIS Hub data, British Columbia CKAN + WFS geospatial data, Quebec Données Québec CKAN + ArcGIS IQA data, Alberta open data + AER energy + WMBappServices wildfire + AHSGIS health + 511 Alberta transport, Manitoba geoportal (ArcGIS Hub) + 511 Manitoba transport, Saskatchewan geoportal (ArcGIS Hub) + WSA water infrastructure + SPSA fire bans, Nova Scotia Socrata SODA portal (data.novascotia.ca), New Brunswick federal-CKAN discovery + GeoNB bare ArcGIS Server geospatial data + gnb.socrata.com Socrata portal + key-gated 511 NB transport, and persistent local storage. All bilingual (English/French).

First ArcGIS Hub module — shared infrastructure in shared/arcgis_hub.py is reusable for future Canadian municipal modules (BC, Calgary, Edmonton, and other cities publishing via ArcGIS Hub). First OGC WFS module — BC introduces WFS 2.0 (OGC) support via shared/ogc.py, making WFS the third portal technology alongside CKAN and ArcGIS Hub. See docs://bc/wfs-query-guide for the CKAN→WFS two-step workflow.

Quick Start

bash
# Auto-configure your platform (interactive)
uvx mcp-canada install

# Or name platforms directly
uvx mcp-canada install claude-desktop cursor vscode

Supports 14 platforms: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed, Codex CLI, Gemini CLI, Amazon Q, OpenCode, Cline, Roo Code, Goose CLI, Junie CLI.

Manual Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{
  "mcpServers": {
    "mcp-canada": {
      "command": "uvx",
      "args": ["mcp-canada"]
    }
  }
}
bash
claude mcp add mcp-canada -- uvx mcp-canada
bash
git clone https://github.com/reyemtech/mcp-canada.git
cd mcp-canada
uv run mcp-canada

Options

FlagDescriptionExample
--transportTransport protocol--transport sse
--portPort for SSE/HTTP--port 8000
--modulesLoad only specific modules--modules bank_of_canada,recalls
--verboseINFO-level logging--verbose
--debugDEBUG-level logging--debug

Environment variable: MCP_CANADA_MODULES=bank_of_canada,recalls

Examples

See the documentation site for cross-API intelligence scenarios — from tracing prairie drought to the Canadian dollar, to building pharmaceutical safety audits, to assembling MP accountability briefs, to joining data from multiple APIs in a single SQL query. Each example includes the exact prompt and tool chain you can run today. The source remains in EXAMPLES.md.

How Discovery Works

With 250 tools, listing all of them would consume half an agent's context window. Instead, BM25 search lets agents find exactly what they need:

Agent: "What tools do you have for exchange rates?"

→ discover_tools("exchange rate CAD")
→ Returns: boc_get_exchange_rates, boc_get_observations

→ call_tool("boc_get_exchange_rates", {"currency": "USD", "recent": 3})
→ Returns: {"_meta": {...}, "data": [{"date": "2026-04-02", "value": 1.3918, ...}]}

Agents see 5 always-visible tools:

ToolPurpose
discover_toolsBM25 natural language search across all tools
call_toolExecute any discovered tool by name
list_modulesList available API modules with tool counts
plan_queryPlan a multi-step query across Canadian government data APIs
execute_batchRun multiple tool calls in parallel with per-step error isolation

Modules

All tools accept lang: "en" | "fr" for bilingual support. Responses include a _meta envelope with source attribution and cache status. Browse the complete, searchable tool reference for current tool parameters and source APIs.

ModuleLevelToolsPromptsResourcesDescription
Meta / Discovery—5——Always-visible orchestration tools (discover_tools, call_tool, list_modules, plan_query, execute_batch)
Bank of CanadaFederal857Exchange rates, interest rates, commodity prices, inflation — Valet API
CKAN Open DataFederal75780,000+ federal datasets — open.canada.ca
Drug DatabaseFederal857Drug products, ingredients, schedules — Health Canada DPD
IRCC ImmigrationFederal1057PR, study/work permits, Express Entry, asylum — IRCC Open Data
Nutrient FileFederal857Food nutrition data — Canadian Nutrient File
Open ParliamentFederal1057Bills, MPs, votes, ballots, Hansard debates — Open Parliament API
Recalls & SafetyFederal646Food, vehicle, and health product recalls — Healthy Canadians
Statistics CanadaFederal1568Time series, cube metadata, SDMX filtering — StatCan WDS
WeatherFederal3468Conditions, climate, air quality, hydrology, marine, radar — MSC GeoMet
AlbertaProvincial2467CKAN + AER energy + WMBappServices wildfire + AHSGIS health + 511 Alberta — open.alberta.ca
British ColumbiaProvincial2067CKAN + WFS geospatial — BC Data Catalogue
ManitobaProvincial2067ArcGIS Hub + 511 Manitoba — geoportal.gov.mb.ca
SaskatchewanProvincial1367ArcGIS Hub + WSA water + SPSA fire bans — geohub.saskatchewan.ca
New Brunswick (new_brunswick/)Provincial2267Federal CKAN + GeoNB bare ArcGIS Server + gnb.socrata.com Socrata + key-gated 511 NB transport — geonb.snb.ca
Nova ScotiaProvincial1667Socrata SODA portal (aquaculture, environment, health) — data.novascotia.ca
OntarioProvincial6463,000+ provincial datasets — Ontario Open Data
QuebecProvincial1867Federated CKAN (139 orgs) — Données Québec
TorontoMunicipal1268TTC, neighbourhoods, 311, RentSafe — Toronto Open Data
York RegionMunicipal27584 ArcGIS Hub portals (York Region, Markham, Newmarket, Aurora)
Local DatastoreLocal646SQLite persistence for cross-API SQL JOINs — ~/.mcp-canada/datastore.db
Total295~107~141

Response Format

All tools return a consistent envelope:

json
{
  "_meta": {
    "source": {"api": "bank-of-canada-valet", "url": "https://..."},
    "cached": true,
    "lang": "en",
    "timestamp": "2026-04-04T12:00:00Z"
  },
  "data": [ ... ]
}

Errors return:

json
{
  "error": {
    "code": "INVALID_SERIES",
    "message": "Series 'FXXYZCAD' not found.",
    "suggestions": ["FXUSDCAD", "FXEURCAD"]
  }
}

Architecture

src/mcp_canada/
├── server.py              # FastMCP entry point, transport, module loading
├── shared/                # Cross-module utilities
│   ├── cache.py           # TTL-based in-memory cache (aiocache)
│   ├── envelope.py        # Response/error envelope (make_response/make_error)
│   ├── http.py            # Shared HTTP client with retry (tenacity)
│   ├── rate_limiter.py    # Per-source token bucket
│   └── i18n.py            # Bilingual error messages
├── meta/
│   └── list_modules.py    # list_modules meta-tool
└── modules/
    ├── bank_of_canada/    # 8 tools — Valet API
    ├── open_parliament/   # 10 tools — Parliament API
    ├── recalls/           # 6 tools — Healthy Canadians API
    ├── drug_database/     # 8 tools — Health Canada DPD
    ├── ckan/              # 7 tools — Open Data Portal
    ├── nutrient_file/     # 8 tools — Canadian Nutrient File
    ├── datastore/         # 6 tools — local SQLite persistence
    ├── ircc/              # 10 tools — IRCC Immigration Open Data
    ├── ontario/           # 6 tools — Ontario Open Data Catalogue
    ├── toronto/           # 12 tools — City of Toronto Open Data Portal
    ├── york_region/       # 27 tools — York Region ArcGIS Hub (4 portals)
    ├── british_columbia/  # 20 tools — BC Data Catalogue + WFS
    ├── manitoba/          # 20 tools — geoportal.gov.mb.ca ArcGIS Hub + 511 Manitoba
    ├── saskatchewan/      # 13 tools — geohub.saskatchewan.ca ArcGIS Hub + WSA water + SPSA fire bans
    ├── quebec/            # 18 tools — Données Québec CKAN
    ├── alberta/           # 24 tools — open.alberta.ca CKAN + AER + WMB + AHSGIS + 511
    ├── nova_scotia/       # 16 tools — data.novascotia.ca Socrata SODA
    ├── statcan/           # 15 tools — Statistics Canada WDS + SDMX
    └── weather/           # 34 tools — MSC GeoMet OGC API
        ├── current/       # 5 tools — realtime conditions, forecast, alerts
        ├── climate/       # 7 tools — daily/monthly/normals/trends
        ├── aqhi/          # 3 tools — air quality health index
        ├── hydro/         # 5 tools — water levels, flow, flood risk
        ├── marine/        # 3 tools — marine forecasts, hurricane tracks
        ├── severe/        # 3 tools — radar, lightning, UV index
        ├── snow/          # 2 tools — snow depth, snow water equivalent
        ├── collections/   # 2 tools — collection browser and direct query
        └── summary/       # 4 tools — composite summary, extremes, growing season, degree days

Each module follows a 7-file pattern:

FilePurpose
__init__.pyModule name and description
constants.pyBase URL, rate limits, cache TTLs, API mappings
schemas.pyPydantic v2 response models (always flat)
client.pyAsync HTTP functions with caching and rate limiting
tools.py@tool decorated MCP tool functions
prompts.py@prompt functions — guided workflows + quick lookups
resources.py@resource functions — catalogs, docs, templates

New modules are auto-discovered — drop a folder in modules/ and it registers via FileSystemProvider.

Development

bash
# Install dependencies
uv sync

# Run tests (~2000 unit tests, ~15s)
uv run pytest

# Run integration tests against live APIs (~2min)
uv run pytest tests/integration/ -v -m integration --timeout=120

# Type check and lint
uv run pyright
uv run ruff check src/ tests/

# Coverage (must be ≥95%)
uv run pytest --cov=src/mcp_canada --cov-fail-under=95

Contributing

Each module is self-contained. To add a new API:

  1. Create src/mcp_canada/modules/your_api/ with the 7-file pattern
  2. Add colocated __tests__/ with unit tests
  3. Add integration tests in tests/integration/test_tool_scenarios.py
  4. Add a module doc in docs/modules/ and update the Modules table in this README

See CLAUDE.md for coding conventions.

Changelog

See CHANGELOG.md for version-by-version changes, or browse GitHub Releases.

Security

Found a vulnerability? Please do not open a public issue. Email contact@reyem.tech with details and reproduction steps. We support the latest minor version on PyPI.

Community

License

MIT — Reyem Tech

Data Attributions

Data from the following government sources is accessed by this library subject to their respective licences:

Star History

Installation

TypingMind
{
  "mcpServers": {
    "mcp-canada": {
      "command": "uvx",
      "args": [
        "mcp-canada"
      ]
    }
  }
}

MCP Canada MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald MCP Canada verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor-Setup“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Optionen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor-Setup“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie unter macOS Terminal bzw. unter Windows Windows Terminal.
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

MCP Canada als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server ändern“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server ändern“.
  3. Fügen Sie die MCP-Server-Konfiguration für MCP Canada ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server ändern“
{
  "mcpServers": {
    "mcp-canada": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von MCP Canada. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von MCP Canada.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit MCP Canada bei dieser Aufgabe helfen?
MCP Canada
Gerne. Ich habe es gelesen.
Das habe ich mit MCP Canada gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server MCP Canada verwendet?

MCP Canada ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich MCP Canada MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie MCP Canada mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum MCP Canada MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald MCP Canada verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich MCP Canada MCP mit TypingMind?

MCP Canada wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt MCP Canada MCP in TypingMind bereit?

MCP Canada stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um MCP Canada MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal, sodass Sie die Kontrolle über Ihre Modellanbieter, API-Schlüssel, Prompts und MCP-Konfiguration behalten. Falls MCP Canada eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇