Skip to main content
Glama
Canada Travel Advisory MCP Server

Canada Travel Advisory MCP Server

by w-metcalfe

Canada Travel Advisory MCP Server

An MCP server for Government of Canada travel advisories, backed by the Global Affairs Canada open data index of 230 destinations.

Lightweight by design: a single index.js, one dependency (@modelcontextprotocol/sdk), no build step, no TypeScript compile, no HTTP library.

インストール

npm install

Requires Node.js 18+ (uses the built-in fetch).

Related MCP server: travel-advisories

セットアップ

No API key is needed — the dataset is public and unauthenticated. All clients below run the same stdio command: node <path-to>/index.js.

プロジェクトが別の場所にある場合は、自分の絶対パスに置き換えてください。

Claude Code

claude mcp add canada-travel-advisory -- node E:/Claude/mcp-servers/canada-travel-advisory/index.js

--scope userを追加すると、現在のプロジェクトだけでなく、すべてのプロジェクトで利用できるようになります。

Claude Desktop

In claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "canada-travel-advisory": {
      "command": "node",
      "args": ["E:/Claude/mcp-servers/canada-travel-advisory/index.js"]
    }
  }
}

保存後、Claude Desktopを再起動してください。

Codex CLI

codex mcp add canada-travel-advisory -- node E:/Claude/mcp-servers/canada-travel-advisory/index.js

または、~/.codex/config.tomlを直接編集します(プロジェクトルートの.codex/config.tomlを使用すると、信頼する1つのプロジェクトにスコープを限定できます):

[mcp_servers.canada-travel-advisory]
command = "node"
args = ["E:/Claude/mcp-servers/canada-travel-advisory/index.js"]

codex mcp listで確認します。

Cursor

プロジェクトルートに.cursor/mcp.jsonを作成するか、~/.cursor/mcp.jsonを作成してグローバルに有効にします:

{
  "mcpServers": {
    "canada-travel-advisory": {
      "command": "node",
      "args": ["E:/Claude/mcp-servers/canada-travel-advisory/index.js"]
    }
  }
}

サーバーはSettings → MCPに表示され、そこでトグルをオンにする必要があります。

Windowsパスに関する注意

上記のフォワードスラッシュはWindowsでも問題なく動作します。JSON設定でバックスラッシュを使用する場合は、エスケープしてください:"E:\\Claude\\mcp-servers\\canada-travel-advisory\\index.js"。

ツール

Tool

目的

get_travel_advisory

1つの目的地に対する勧告。名前(英語またはフランス語)、ISOコード(JP)、またはスラッグ(costa-rica)を受け入れます。あいまいな入力の場合は候補が返されます。

list_travel_advisories

すべての目的地をrisk_level、min_risk_level、has_regional_advisoryでフィルタリングおよびブラウズ;name / risk / updatedでソート;limit + offsetでページネーション。

get_recent_updates

最近変更された勧告を新しい順に表示。daysおよびupdate_typeでフィルタリング。

search_countries

名前、ISOコード、スラッグに対する部分一致検索。

compare_advisories

複数の目的地を一度に比較、リスクの高い順にランク付け。

get_advisory_statistics

データセットの概要:リスクレベルごとの数、地域勧告の数、変更タイプの内訳、鮮度。

すべてのツールはlanguage(デフォルトは"en"、または"fr")を受け入れ、名前、勧告テキスト、および目的地リンクをtravel.gc.caとvoyage.gc.caの間で切り替えます。

リスクレベル

レベル

意味

0

通常の安全上の注意を払う

1

十分な注意を払う

2

不要不急の旅行を避ける

3

すべての旅行を避ける

min_risk_level: 2は、カナダが旅行を避けるよう勧告しているすべての目的地を返します。フィルターはラベルテキストも受け入れます(例:risk_level: "avoid all travel")。

このサーバーが回答する質問例

  • 「ペルーの渡航勧告は何ですか?」

  • 「今すぐすべての旅行を避けるべき国はどこですか?」

  • 「先週変更された勧告は何ですか?」

  • 「日本、マリ、フランスを旅行先として比較してください。」

  • 「地域勧告がある目的地はいくつありますか?」

データソースと動作に関する注意

Source: https://data.international.gc.ca/travel-voyage/index-alpha-eng.json

  • 1つのエンドポイントのみを取得し、2つではありません。 公開されているindex-updated.jsonはindex-alpha-eng.jsonとバイト単位で同一であり(確認済み:同じMD5、同じアルファベット順のキー順序)、実際には最新順にソートされていません。そのため、get_recent_updatesはローカルでdate-published.timestampでソートします。これは、アップストリームファイルの順序に関係なく信頼性があります。

  • 1回の取得で両方の言語に対応。 -engサフィックスにもかかわらず、すべてのレコードにはengとfraの両方のブロックが埋め込まれています。-fraファイルはキーの順序のみが異なります。

  • キャッシュ: レスポンスは60分間メモリにキャッシュされ(データセットは約1時間ごとに再生成されます)、条件付きIf-None-Match / If-Modified-Sinceリクエストで更新されます。更新に失敗した場合、エラーにする代わりに、最後の有効なデータがstale: trueとともに提供されます。

  • サマリーデータのみ。 データセットには、リスクレベル、勧告テキスト、更新日、変更概要が含まれています。完全な勧告詳細(安全とセキュリティ、入国要件、健康、地域別内訳)はHTMLとしてのみ存在するため、すべての結果にはそれを読むための目的地urlが含まれています。

すべてのレスポンスにはdata_generated(アップストリームの生成時間)とソース帰属行も含まれているため、回答に日付を付けることができます。

ライセンス

MIT。勧告データ © Government of Canada、Open Government Licence – Canadaに基づいて使用。

Available Tools

6 tools
compare_advisoriesB

Compare travel advisories for several destinations at once, ranked from highest to lowest risk. Useful for planning a multi-country trip.

Inputs: countries (required), language.

get_advisory_statisticsA

Overview of the whole advisory dataset: how many destinations sit at each risk level, how many carry regional advisories, a breakdown of recent change types, and when the data was generated.

Inputs: language.

get_recent_updatesA

Get advisories updated most recently, newest first. Use this for 'what changed this week' questions. Optionally restrict to a change type such as 'Regional advisory added' or 'National advisory decreased'.

Inputs: days, limit, language, update_type.

get_travel_advisoryA

Get the current Government of Canada travel advisory for a single country. Accepts a country name (English or French), an ISO code, or a URL slug. Returns the risk level, advisory text, when it was last updated, what changed, and a link to the full advisory page.

Inputs: country (required), language.

list_travel_advisoriesA

List and filter travel advisories across all 230 destinations. Use min_risk_level: 2 to find everywhere Canada advises against travel. Sort by name, risk, or most recently updated.

Inputs: sort, limit, offset, language, +3 more.

search_countriesA

Search destinations by partial name, ISO code, or slug. Use this to discover or disambiguate a destination before calling get_travel_advisory.

Inputs: query (required), limit, language.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a distinct purpose: single-country lookup, list/filter across all, recent changes, search/disambiguation, comparison, and statistics. No two tools overlap in function; an agent can clearly choose based on need.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (get_, list_, get_recent_, search_, compare_, get_). This predictability helps an agent understand the action and target without ambiguity.

    Tool Count5/5

    Six tools is ideal for the scope: covering single query, list, recent updates, search, comparison, and statistics. Each tool serves a distinct and necessary use case without redundancy or unnecessary bloat.

    Completeness5/5

    The tool surface covers all common travel advisory workflows: lookup, filtering, discovering recent changes, searching/disambiguation, multi-country comparison, and aggregate statistics. No obvious gaps—users can answer questions about specific countries, broad trends, or comparisons.

    Related MCP Connectors

    Related MCP Servers