mullvad-mcp
mullvad-mcp
Mullvad VPNを、Claude Desktop、Cursor、WindsurfなどのMCP互換クライアントから制御するためのMCP(Model Context Protocol)サーバーです。
すべてのVPN操作はmullvad CLIを通じて行われます。直接的なAPI呼び出しや設定ファイルの解析は不要で、認証情報も必要ありません。
前提条件
Mullvad VPNアプリがインストールされており、CLIがPATHに含まれていること
確認方法:
mullvad --version
Python 3.11+
uvパッケージマネージャー — uvのインストール
Related MCP server: Proton-MCP
インストール
git clone https://github.com/your-username/mullvad-mcp.git
cd mullvad-mcp
uv syncクライアント設定
Claude Desktop
~/.config/claude-desktop/claude_desktop_config.json (Linux) または ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) に以下を追加します:
{
"mcpServers": {
"mullvad": {
"command": "uv",
"args": ["--directory", "/path/to/mullvad-mcp", "run", "mullvad-mcp"]
}
}
}Cursor
プロジェクト内の.cursor/mcp.jsonまたはグローバルの~/.cursor/mcp.jsonに以下を追加します:
{
"mcpServers": {
"mullvad": {
"command": "uv",
"args": ["--directory", "/path/to/mullvad-mcp", "run", "mullvad-mcp"]
}
}
}汎用MCPクライアント (stdio)
{
"mcpServers": {
"mullvad": {
"command": "uv",
"args": ["--directory", "/path/to/mullvad-mcp", "run", "mullvad-mcp"],
"transport": "stdio"
}
}
}利用可能なツール
接続制御
ツール | 説明 |
| VPNに接続します(国、都市、ホスト名を指定可能) |
| VPNから切断します |
| 再接続します(新しい場所を指定可能) |
ステータスと診断
ツール | 説明 |
| 現在の接続状態、サーバー、プロトコル、IPを表示します |
| am.i.mullvad.netにクエリを送り、VPN保護を確認します |
サーバー選択
ツール | 説明 |
| サーバー数を含む利用可能なすべての国を表示します |
| 指定した国の都市を表示します |
| フィルター(国、都市、所有サーバーのみ)を適用してサーバーを表示します |
| 国、都市、またはホスト名で優先場所を設定します |
アカウント管理
ツール | 説明 |
| マスクされたアカウント番号と有効期限を表示します |
| アカウントに登録されているデバイスを表示します |
設定
ツール | 説明 |
| 現在のすべての設定を構造化オブジェクトとして取得します |
| ロックダウンモードの有効/無効を切り替えます |
| DAITA(トラフィック分析防御)の有効/無効を切り替えます |
| マルチホップの有効/無効を切り替えます(エントリ場所の指定が可能) |
| DNSを設定します:デフォルト(ブロックオプション付き)またはカスタムIP |
| WireGuardオプションを設定します(量子耐性、IPv6) |
| 検閲回避モードを設定します(auto/off/udp2tcp/shadowsocksなど) |
インタラクションの例
接続
"スウェーデンに接続して"
→
connect(country="se")を呼び出し、リレーをスウェーデンに設定して接続します。
ステータスチェック
"漏洩していないか確認して"
→
check_leak()を呼び出し、am.i.mullvad.netにクエリを送信して、トラフィックがMullvad経由で流れているか報告します。
サーバー選択
"ドイツで利用可能な都市は?"
→
list_cities(country="de")を呼び出し、ベルリン、フランクフルトなどの都市とサーバー数を返します。
設定
"キルスイッチを有効にして広告をブロックして"
→
set_killswitch(enabled=True)を呼び出した後、set_dns(block_ads=True)を呼び出します。
環境変数
変数 | デフォルト | 説明 |
| 自動検出 |
|
|
| CLIコマンドのタイムアウト時間(秒) |
仕組み
すべてのツールはサブプロセスを通じてmullvad CLIを呼び出します。CLIがネイティブで認証を処理するため、APIキーやシークレットは不要です。出力は構造化された辞書に解析されるため、LLMが結果を推論できます。
リソース
ライセンス
MIT
Available Tools
18 toolscheck_leakA
Check if your connection is protected by Mullvad VPN.
Queries am.i.mullvad.net to verify whether traffic exits through a Mullvad server. Use this to confirm the VPN is working correctly.
Returns: Dict with your visible IP, country, city, whether traffic exits through a Mullvad server, the exit hostname, and a leak_detected boolean (True means traffic is NOT going through Mullvad).
Inputs: no named parameters. Returns: object
connectA
Connect to Mullvad VPN.
Optionally set the relay location before connecting. If no location parameters are provided, connects using the currently configured relay.
Args: country: Two-letter country code (e.g. "se", "us"). city: Three-letter city code (e.g. "got", "nyc"). hostname: Specific server hostname (e.g. "se-got-wg-004").
Returns: Current VPN status after the connect attempt, including connection state, relay hostname, country, city, and IP addresses.
Inputs: country, city, hostname. Returns: object
disconnectA
Disconnect from Mullvad VPN.
Idempotent — returns current status even if already disconnected.
Returns: Current VPN status after the disconnect attempt.
Inputs: no named parameters. Returns: object
get_account_infoA
Get Mullvad account information.
Returns: Dict with masked account number (last 4 digits visible), expiry date, and device name.
Inputs: no named parameters. Returns: object
get_device_infoA
Get information about devices registered to the Mullvad account.
Returns:
Dict with a devices list of device names registered
on the account.
Inputs: no named parameters. Returns: object
get_settingsA
Get all current Mullvad VPN settings as a structured object.
Returns:
Dict with keys: killswitch, dns, tunnel, relay,
and anti_censorship, each containing the relevant settings.
Inputs: no named parameters. Returns: object
get_statusA
Get current Mullvad VPN connection status.
Returns: Dict with connection state, relay details, protocol, IP addresses, country, city, and whether traffic is locked down.
Inputs: no named parameters. Returns: object
list_citiesA
List available cities for a given country.
Args: country: Two-letter country code (e.g. "se", "us", "de").
Returns:
Dict with a cities key containing a list of dicts,
each with name, code, coordinates, and server_count.
Inputs: country (required). Returns: object
list_countriesA
List all available Mullvad VPN countries with server counts.
Returns:
Dict with a countries key containing a list of dicts,
each with name, code, city_count, and server_count.
Inputs: no named parameters. Returns: object
list_serversA
List available Mullvad VPN servers with optional filters.
Args:
country: Filter by two-letter country code (e.g. "se").
city: Filter by three-letter city code (e.g. "got").
Requires country to also be set.
owned_only: If True, only show Mullvad-owned servers.
Returns:
Dict with a servers key containing a list of server dicts,
each with hostname, country, city, ips,
provider, ownership, and protocol.
Inputs: country, city, owned_only. Returns: object
reconnectA
Reconnect to Mullvad VPN.
Disconnects and reconnects, optionally to a new relay location.
Args: country: Two-letter country code (e.g. "se", "us"). city: Three-letter city code (e.g. "got", "nyc"). hostname: Specific server hostname (e.g. "se-got-wg-004").
Returns: Current VPN status after the reconnect attempt.
Inputs: country, city, hostname. Returns: object
set_daitaA
Enable or disable DAITA (Defence Against AI-guided Traffic Analysis).
DAITA adds padding to WireGuard traffic to defeat traffic analysis.
Args: enabled: True to enable, False to disable.
Returns: Current tunnel settings after the change.
Inputs: enabled (required). Returns: object
set_dnsA
Configure DNS settings.
Args: mode: "default" for Mullvad DNS (with optional blocking), or "custom" to use your own DNS servers. servers: List of DNS server IPs when mode is "custom". block_ads: Block ad domains (default DNS mode only). block_trackers: Block tracker domains (default DNS mode only). block_malware: Block malware domains (default DNS mode only). block_adult_content: Block adult content domains (default DNS mode only). block_gambling: Block gambling domains (default DNS mode only). block_social_media: Block social media domains (default DNS mode only).
Returns: Current DNS settings after the change.
Inputs: mode, servers, block_ads, block_trackers, +4 more. Returns: object
set_killswitchA
Enable or disable the kill switch (lockdown mode).
When enabled, all network traffic is blocked unless the VPN is connected.
Args: enabled: True to enable, False to disable.
Returns:
Dict with enabled boolean confirming the new state.
Inputs: enabled (required). Returns: object
set_locationA
Set preferred VPN connection location.
Args: country: Two-letter country code (e.g. "se") or "any" for automatic. city: Three-letter city code (e.g. "got"). hostname: Specific server hostname (e.g. "se-got-wg-004").
Returns: Current relay constraints after the change.
Inputs: country (required), city, hostname. Returns: object
set_multihopB
Enable or disable multihop (chained VPN connections).
When enabled, traffic is routed through an entry server before reaching the exit server, adding an extra layer of privacy.
Args: enabled: True to enable, False to disable. entry_country: Two-letter country code for the entry server. entry_city: Three-letter city code for the entry server.
Returns: Current relay constraints after the change.
Inputs: enabled (required), entry_country, entry_city. Returns: object
set_obfuscationA
Set anti-censorship / obfuscation mode.
Controls how Mullvad disguises VPN traffic to bypass censorship.
Args: mode: One of "auto", "off", "wireguard-port", "udp2tcp", "shadowsocks", "quic", or "lwo".
Returns: Current anti-censorship settings after the change.
Inputs: mode (required). Returns: object
set_protocolA
Configure WireGuard tunnel protocol options.
Note: Mullvad CLI 2026.1 is WireGuard-only. This tool configures WireGuard-specific options like quantum resistance and IPv6.
Args: quantum_resistant: Enable quantum-resistant key exchange ("on" or "off"). ipv6: Enable IPv6 in the tunnel ("on" or "off").
Returns: Current tunnel settings after the change.
Inputs: quantum_resistant, ipv6. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Each tool targets a distinct aspect of VPN management: connection, settings, status, info, and listings. There is no overlap in functionality.
All tool names follow a consistent verb_noun pattern with underscores, making them predictable and easy to understand. Examples include check_leak, get_status, set_dns, list_countries.
18 tools is slightly above the ideal range of 3-15, but each tool covers a necessary function for a comprehensive VPN configuration surface, so the count is still reasonable.
The set covers core VPN operations (connect, disconnect, status, settings) and advanced features (DAITA, multihop, obfuscation). Minor gaps like account login/logout or device management are not critical for the primary use case.
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP of MCPs. Automatic discovery and configure MCP servers on your local machine. Integration with Claude and Cursor.51Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server for the Proton privacy suite — Mail, Pass, Drive, Calendar, and VPN. 36 tools for Claude and other MCP-compatible AI agents.31MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that lets Claude Desktop and Claude Code control your PC — take screenshots, click, type, manage windows, and more.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that enables Claude to control your computer, similar to Anthropic's computer use but easy to set up locally.6,792 npm411MIT