Tailscale MCP Server
About
Integrate with Tailscale's CLI and API for automated network management and monitoring.
Details
- Author
- hexsleeves
- Categories
- Cloud Service, Infrastructure, Security
Jump to
Setup
Install Tailscale MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/hexsleeves/tailscale-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
- Features
- Requirements
- Quick Start
- Claude Desktop
- Claude Code (CLI)
- Cursor
- Device management— list, authorize, deauthorize, delete, expire keys, manage routes.
- Network operations— connect/disconnect host, ping peers, get CLI status and version.
- Administration— tailnet info, file sharing, exit nodes, webhooks, device tags, server version.
- ACL and policy— read/validate/update ACL, DNS settings, auth keys, policy file, network lock.
- Read-only resources— tailnet summary, device list, per-device detail, current ACL.
- Prompts— guided connectivity diagnosis and ACL change review.
- Risk-gated tools—read,write, andadminlevels viaTAILSCALE_ALLOWED_TOOL_RISK.
- OAuth + API key— OAuth client credentials (preferred) or legacy API key.
- Private HTTP mode— bearer auth, Host validation, request size limits, health check endpoint.
- Docker support— pre-built images on Docker Hub and GHCR; sidecar deployment with Tailscale Serve.
- Node.js 20+— run vianpxor install globally (no extra runtime needed).
- Bun 1.3+— used for development; also works as a production runtime.
- Docker— use the pre-built image (no local runtime required).
- OAuth client credentials:TAILSCALE_OAUTH_CLIENT_ID+TAILSCALE_OAUTH_CLIENT_SECRET(preferred).
- Legacy API key:TAILSCALE_API_KEY.
The localTailscale CLIis optional. It is only required for CLI-backed tools:get_network_status,connect_network,disconnect_network,ping_peer,get_version, andmanage_exit_nodes(set/clear operations).
Edit~/.claude/claude_desktop_config.json(create if absent).
{ "mcpServers": { "tailscale": { "command": "npx", "args": ["-y", "@hexsleeves/tailscale-mcp-server"], "env": { "TAILSCALE_OAUTH_CLIENT_ID": "your-client-id", "TAILSCALE_OAUTH_CLIENT_SECRET": "your-client-secret", "TAILSCALE_TAILNET": "-" } } } }
{ "mcpServers": { "tailscale": { "command": "npx", "args": ["-y", "@hexsleeves/tailscale-mcp-server"], "env": { "TAILSCALE_API_KEY": "tskey-api-...", "TAILSCALE_TAILNET": "-" } } } }
AddTAILSCALE_ALLOWED_TOOL_RISKto theenvblock:
"TAILSCALE_ALLOWED_TOOL_RISK": "write"
Set to"admin"to unlock destructive operations (delete, deauthorize, connect/disconnect, key mutation).
{ "mcpServers": { "tailscale": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "TAILSCALE_API_KEY=tskey-api-...", "-e", "TAILSCALE_TAILNET=your-tailnet", "hexsleeves/tailscale-mcp-server:latest" ] } } }
claude mcp add tailscale \ -e TAILSCALE_API_KEY=tskey-api-... \ -e TAILSCALE_TAILNET=- \ -- npx -y @hexsleeves/tailscale-mcp-server
claude mcp add tailscale \ -e TAILSCALE_API_KEY=tskey-api-... \ -e TAILSCALE_TAILNET=- \ -e TAILSCALE_ALLOWED_TOOL_RISK=write \ -- npx -y @hexsleeves/tailscale-mcp-server
Add to.cursor/mcp.json(project) or~/.cursor/mcp.json(global):
{ "mcpServers": { "tailscale": { "command": "npx", "args": ["-y", "@hexsleeves/tailscale-mcp-server"], "env": { "TAILSCALE_API_KEY": "tskey-api-...", "TAILSCALE_TAILNET": "-" } } } }
- read— list devices, inspect status, read resources, run diagnostics.
- write— update ACLs, DNS, routes, policy files, webhooks, tags, and other mutating settings.
- admin— destructive or host-affecting operations: delete, deauthorize, connect, disconnect, auth key mutation, file sharing changes, exit node control.
HTTP mode is intended for private tailnet access. It requiresMCP_HTTP_BEARER_TOKENand binds to127.0.0.1by default.
export MCP_TRANSPORT=http export MCP_HTTP_BEARER_TOKEN="$(openssl rand -base64 32)" export TAILSCALE_OAUTH_CLIENT_ID="your-client-id" export TAILSCALE_OAUTH_CLIENT_SECRET="your-client-secret" export TAILSCALE_TAILNET="-" npx -y @hexsleeves/tailscale-mcp-server --http --host 127.0.0.1 --port 3000
Expose privately with Tailscale Serve (recommended for tailnet deployments):
Do not use Tailscale Funnel for normal MCP operation. Funnel makes the endpoint publicly reachable on the internet.
AGET /healthendpoint returns200 OKwhen the server is running.
For full Docker sidecar deployment instructions, seedocs/docker.md.
docker run --rm \ -e TAILSCALE_API_KEY="tskey-api-..." \ -e TAILSCALE_TAILNET="-" \ -p 127.0.0.1:3000:3000 \ hexsleeves/tailscale-mcp-server:latest
docker run --rm \ -e TAILSCALE_API_KEY="tskey-api-..." \ -e TAILSCALE_TAILNET="-" \ -p 127.0.0.1:3000:3000 \ ghcr.io/hexsleeves/tailscale-mcp-server:latest
For sidecar deployment with Tailscale Serve, seedocs/docker.md.
Once the server is connected to your MCP client, try these:
- "List my Tailscale devices and show which ones are offline."
- "What is the current Tailscale network status on this machine?"
- "Diagnose connectivity to my NAS at 100.64.0.5."
- "Show me the current ACL policy for my tailnet."
- "Review this ACL change before I apply it."(attach the new policy)
- "What DNS nameservers is my tailnet using?"
- "List all active webhooks in my tailnet."
# Install dependencies (Bun required for development) bun install # Type check bun run typecheck # Run tests bun test # Lint and format bun run check # Build bun run build # Full verification (typecheck + lint + test + build) bun run qa:full # Security audit bun audit
SeeCONTRIBUTING.mdfor the full development workflow, commit conventions, and release process.
Contributions are welcome. Please readCONTRIBUTING.mdbefore opening a pull request.
- CONTRIBUTING.md— development setup, commit conventions, PR process.
- SECURITY.md— responsible disclosure policy.
- LICENSE— MIT.
Network reconnaissance and security scanning with port scanning, DNS analysis, and vulnerability assessment
Provides a unified interface to AWS services for security investigations and incident response.
Interact with the Illumio Policy Compute Engine (PCE) to manage workloads, labels, and analyze traffic flows.
A Python-based MCP server for Cisco's Meraki Dashboard, providing tools to query the API for discovering, monitoring, and managing your Meraki environment.
Network diagnostics from 6 global regions — SSL, DNS, ping, whois, traceroute, port scan, latency. Works without an API key.
MCP access to cluster-wide L4 and L7 network traffic, packets, APIs, and complete payloads.
Retrieves essential network information from devices using gNMI and OpenConfig models.
Civilian situational awareness for AI deployments — real-time risk dashboards, multi-source threat correlation, anomaly detection, and automated alerting for critical infrastructure and enterprise AI systems.
MCP servers for managing homelab infrastructure through Claude Desktop. Monitor Docker/Podman containers, Ollama AI models, Pi-hole DNS, Unifi networks, and Ansible inventory.
MCP server to Automate Exposure Management
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
