mullvad-mcp
The mullvad-mcp server provides full control over Mullvad VPN through any MCP-compatible AI client (e.g. Claude Desktop, Cursor) by wrapping the Mullvad CLI into structured tools.
Connection Control
connect— Connect to the VPN, optionally specifying a country, city, or hostnamedisconnect— Disconnect from the VPNreconnect— Disconnect and reconnect, optionally to a new location
Status & Diagnostics
get_status— Retrieve current connection state, relay details, protocol, and IP addressescheck_leak— Queryam.i.mullvad.netto verify traffic is correctly exiting through Mullvad
Server Selection
list_countries— List all available countries with city and server countslist_cities— List available cities within a given countrylist_servers— List servers with optional filters by country, city, or Mullvad-owned onlyset_location— Set your preferred relay location by country, city, or hostname
Account & Device Management
get_account_info— View masked account number and subscription expiry dateget_device_info— List all devices registered to your Mullvad account
Settings & Configuration
get_settings— Retrieve all current settings (kill switch, DNS, tunnel, relay, obfuscation)set_killswitch— Enable or disable lockdown mode (blocks all traffic when VPN is disconnected)set_daita— Enable or disable DAITA (Defence Against AI-guided Traffic Analysis)set_multihop— Enable or disable multihop with optional entry country/cityset_dns— Use Mullvad default DNS (with optional blocking of ads, trackers, malware, adult content, gambling, social media) or set custom DNS serversset_protocol— Configure WireGuard options such as quantum-resistant key exchange and IPv6set_obfuscation— Set obfuscation/anti-censorship mode (auto, off, udp2tcp, shadowsocks, quic, etc.)
Provides tools for controlling Mullvad VPN, including connection management, server selection, account info, and settings like kill switch, DAITA, multihop, DNS, protocol, and obfuscation, as well as leak checking.
Allows configuration of WireGuard protocol options such as quantum resistance and IPv6 within the VPN settings.
mullvad-mcp
An MCP (Model Context Protocol) server for controlling Mullvad VPN through any MCP-compatible client — Claude Desktop, Cursor, Windsurf, and more.
All VPN interaction goes through the mullvad CLI. No direct API calls, no config file parsing, no credentials needed.
Prerequisites
Mullvad VPN app installed with the CLI available in your PATH
Verify:
mullvad --version
Python 3.11+
uv package manager — install uv
Installation
git clone https://github.com/your-username/mullvad-mcp.git
cd mullvad-mcp
uv syncClient Configuration
Claude Desktop
Add to ~/.config/claude-desktop/claude_desktop_config.json (Linux) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"mullvad": {
"command": "uv",
"args": ["--directory", "/path/to/mullvad-mcp", "run", "mullvad-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json in your project or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"mullvad": {
"command": "uv",
"args": ["--directory", "/path/to/mullvad-mcp", "run", "mullvad-mcp"]
}
}
}Generic MCP Client (stdio)
{
"mcpServers": {
"mullvad": {
"command": "uv",
"args": ["--directory", "/path/to/mullvad-mcp", "run", "mullvad-mcp"],
"transport": "stdio"
}
}
}Available Tools
Connection Control
Tool | Description |
| Connect to VPN, optionally specifying country/city/hostname |
| Disconnect from VPN |
| Reconnect, optionally to a new location |
Status & Diagnostics
Tool | Description |
| Current connection state, server, protocol, IPs |
| Query am.i.mullvad.net to verify VPN protection |
Server Selection
Tool | Description |
| All available countries with server counts |
| Cities for a given country |
| Servers with filters (country, city, owned_only) |
| Set preferred location by country, city, or hostname |
Account Management
Tool | Description |
| Masked account number, expiry date |
| Devices registered to the account |
Settings
Tool | Description |
| All current settings as a structured object |
| Enable/disable lockdown mode |
| Enable/disable DAITA (traffic analysis defence) |
| Enable/disable multihop with optional entry location |
| Set DNS: default (with blocking options) or custom IPs |
| Configure WireGuard options (quantum resistance, IPv6) |
| Set anti-censorship mode (auto/off/udp2tcp/shadowsocks/etc) |
Example Interactions
Connection
"Connect me to Sweden"
→ Calls
connect(country="se")— sets relay to Sweden and connects.
Status Check
"Am I leaking?"
→ Calls
check_leak()— queries am.i.mullvad.net and reports whether traffic exits through Mullvad.
Server Selection
"What cities are available in Germany?"
→ Calls
list_cities(country="de")— returns Berlin, Frankfurt, etc. with server counts.
Settings
"Enable the kill switch and block ads"
→ Calls
set_killswitch(enabled=True)thenset_dns(block_ads=True).
Environment Variables
Variable | Default | Description |
| Auto-detected | Override path to the |
|
| CLI command timeout in seconds |
How It Works
All tools call the mullvad CLI via subprocess. The CLI handles authentication natively — no API keys or secrets are needed. Output is parsed into structured dicts so LLMs can reason about the results.
Resources
License
MIT
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/oresam-xyz/mullvad-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server