Tailnet Server
БесплатноНе проверенQuery devices, check connectivity, and get network status from your Tailscale tailnet directly via an AI assistant.
Описание
Query devices, check connectivity, and get network status from your Tailscale tailnet directly via an AI assistant.
README
Why I built this: I built this to learn Tailscale - this was my first time using it. From past experience debugging network issues, I thought having an MCP to feed network state directly into an LLM could make diagnosing connectivity problems much easier than context-switching between CLI output and chat windows.
A Model Context Protocol (MCP) server that exposes your Tailscale tailnet as a queryable resource for LLMs. Query devices, check connectivity, and get network status directly from your AI assistant.
Prerequisites
- Docker
- A Tailscale account with at least one device on your tailnet
Setup & Test
Clone & enter the repo:
git clone https://github.com/AlexSKorn/TailscaleMCP.git cd TailscaleMCPGet an Auth Key: Go to your Tailscale Admin Console, click "Generate auth key", and copy the key (starts with
tskey-auth-).Configure & start:
make setup # creates .env from template # edit .env and paste your TS_AUTHKEY make docker-up # start containers make docker-test # should print "Connection test: OK"Try it interactively with the MCP Inspector:
npx @modelcontextprotocol/inspector docker compose exec -T tailnet-mcp python -m tailnet_mcp.serverOpen the URL shown in your terminal (usually
http://localhost:3000), click Connect and then "List Tools", then pick any tool and click "Run".
Available Tools
| Tool | Input | What it does |
|---|---|---|
list_devices |
{} or {"online_only": true} |
List all devices on your tailnet |
get_device |
{"hostname": "your-device"} |
Detailed info for a specific device |
get_tailnet_status |
{} |
Network overview (MagicDNS, version, device count) |
check_connectivity |
{"hostname": "your-device"} |
Ping a device and report latency |
list_exit_nodes |
{} |
List available exit nodes |
Cleanup
make docker-down # stop containers (keeps state)
make docker-clean # stop and remove all data
Architecture
MCP Client (stdio) ←→ tailnet-mcp (FastMCP) ←→ tailscale (Unix socket)
↓
/localapi/v0/*
- MCP client sends tool calls via stdio
- Server translates them to Tailscale Local API requests over a Unix socket
- Tailscale daemon responds with network state
- Server formats responses for human readability
Key design decisions:
- Read-only — the server cannot modify Tailscale settings, add/remove devices, or change ACLs
- Local API only — all calls stay on the local machine (no external network calls, no stored credentials)
- Async throughout — httpx for socket I/O, subprocess for pings
Project Structure
src/tailnet_mcp/
├── server.py # MCP server & tool definitions
├── tailscale.py # Tailscale local API client (async httpx over Unix socket)
├── models.py # Pydantic data models
tests/
└── test_server.py # pytest + pytest-asyncio tests
Development
pip install -e ".[dev]" # install with dev dependencies
make test # run tests
make check-all # lint + format + type-check + tests
License
MIT
Установка Tailnet Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/AlexSKorn/TailscaleMCPFAQ
Tailnet Server MCP бесплатный?
Да, Tailnet Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Tailnet Server?
Нет, Tailnet Server работает без API-ключей и переменных окружения.
Tailnet Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Tailnet Server в Claude Desktop, Claude Code или Cursor?
Открой Tailnet Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Tailnet Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
