# Tailscale MCP Server

An MCP server that hands your agent the Tailscale admin API: devices, ACLs, DNS, keys, users. Useful when you want to ask about the tailnet and act on the answer.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 35
- Author: YawLabs
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/YawLabs/tailscale-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/tailscale-mcp-server

## What it does

The server wraps the Tailscale v2 API in typed tools: 97 admin-API tools, 6 optional local-CLI diagnostics, one always-on catalog tool and 4 resources. Coverage runs across devices, ACLs, DNS, keys and trust credentials, users, invites, webhooks, log streaming, posture, services and organization tailnets. Inputs are validated with Zod and responses come back structured, so no brittle `tailscale status --json | jq` pipeline to maintain.

It is not a replacement for `curl`. The agent chains several endpoints in a single turn: it can list devices that stopped checking in and have key expiry off, pull the audit log to explain a DNS change made overnight, or draft a minimal ACL diff that keeps your comments. Write tools carry `destructiveHint` or `idempotentHint`, which lets your client require confirmation on mutations and skip it on reads.

You need a tailnet API key. Some diagnostics rely on the local CLI, and the integration suite turns on with `RUN_INTEGRATION_TESTS=1` plus a key. The server speaks stdio, so a client that only accepts URL-addressable Streamable-HTTP or SSE cannot host it. If your job is one endpoint inside CI, reach for `curl` instead — this server earns its place in exploratory work where you don't yet know what you need.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add tailscale-mcp -- npx -y @yawlabs/tailscale-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add tailscale-mcp-server -- npx -y @yawlabs/tailscale-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "tailscale-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@yawlabs/tailscale-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "tailscale-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@yawlabs/tailscale-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add tailscale-mcp-server npx -y @yawlabs/tailscale-mcp
```

## When to use it
- find devices that stopped checking in and have key expiry disabled
- explain an overnight DNS change from the audit log
- draft an ACL diff while keeping HuJSON comments
- create a scoped OAuth client for a CI pipeline
- rotate auth keys past their age and print the new ones

## Example prompts
- Who changed DNS in the last 24 hours? Pull the audit log and summarize it
- Draft an ACL change so `tag:mobile` reaches `tag:dashboard` but not `tag:db`, keeping my comments

## Similar
- [Tailscale](https://affpapa.org/en/nevibecode/mcp/tailscale.md) — MCP server · ★ 15
- [huawei-cloud-network-query](https://affpapa.org/en/nevibecode/skills/huawei-cloud-network-query.md) — skill · 17000 installs
- [tunnel-doctor](https://affpapa.org/en/nevibecode/skills/tunnel-doctor.md) — skill · 678 installs
- [node-connect](https://affpapa.org/en/nevibecode/skills/node-connect.md) — skill · 793 installs
- [network-engineer](https://affpapa.org/en/nevibecode/agents/network-engineer.md) — subagent · 1871 installs
- [edgesecurityaccess-wireguard-vpn](https://affpapa.org/en/nevibecode/skills/edgesecurityaccess-wireguard-vpn.md) — skill · 788 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
