Tailnet MCP bridge
Stdio MCP bridge that lets sandboxed agents reach MCP servers in your tailnet
Tailnet MCP bridge is an open-source MCP server for cloud and infrastructure. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Linux, macOS
- Runs
- Locally
- Version
- 0.3.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add tailnet-mcp --env TS_AUTHKEY='<TS_AUTHKEY>' -- docker run -i --rm -e TS_AUTHKEY ghcr.io/zedong-peng/tailnet-mcp:v0.3.0Add --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"tailnet-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TS_AUTHKEY",
"ghcr.io/zedong-peng/tailnet-mcp:v0.3.0"
],
"env": {
"TS_AUTHKEY": "<TS_AUTHKEY>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"tailnet-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TS_AUTHKEY",
"ghcr.io/zedong-peng/tailnet-mcp:v0.3.0"
],
"env": {
"TS_AUTHKEY": "<TS_AUTHKEY>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"tailnet-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TS_AUTHKEY",
"ghcr.io/zedong-peng/tailnet-mcp:v0.3.0"
],
"env": {
"TS_AUTHKEY": "<TS_AUTHKEY>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"tailnet-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TS_AUTHKEY",
"ghcr.io/zedong-peng/tailnet-mcp:v0.3.0"
],
"env": {
"TS_AUTHKEY": "<TS_AUTHKEY>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add tailnet-mcp --env TS_AUTHKEY='<TS_AUTHKEY>' -- docker run -i --rm -e TS_AUTHKEY ghcr.io/zedong-peng/tailnet-mcp:v0.3.0Or add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.tailnet-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0"]
env = { TS_AUTHKEY = "<TS_AUTHKEY>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"tailnet-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TS_AUTHKEY",
"ghcr.io/zedong-peng/tailnet-mcp:v0.3.0"
],
"env": {
"TS_AUTHKEY": "<TS_AUTHKEY>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }Or run: gemini mcp add -s user -e TS_AUTHKEY='<TS_AUTHKEY>' tailnet-mcp docker -- run -i --rm -e TS_AUTHKEY ghcr.io/zedong-peng/tailnet-mcp:v0.3.0
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "tailnet-mcp": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "TS_AUTHKEY", "ghcr.io/zedong-peng/tailnet-mcp:v0.3.0" ], "env": { "TS_AUTHKEY": "<TS_AUTHKEY>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
TS_AUTHKEYTagged, pre-authorized auth key; only needed the first time
About Tailnet MCP bridge
Hosted agents usually take MCP servers either by URL, which forces your server onto the public internet, or by command, which runs on a machine that is not in your tailnet and where you cannot run tailscaled. tailnet-mcp is the command option: it embeds a Tailscale node using tsnet, joins your tailnet as a tagged device and forwards stdio traffic to a Streamable HTTP server published with tailscale serve.
Setup is a one-time login with a tagged, pre-authorized auth key, after which the node key is kept in a state directory and the key is no longer needed. The README suggests three layers of restriction: a tailnet grant limited to one port, a secret path on tailscale serve, and permissions enforced on the server itself, such as a mail account that can only save drafts. Each process is its own tailnet node, so a second server needs a second process with a different hostname.
The bridge waits for the server's node to answer before the first request, retries only requests that never reached the server so a tool call is not sent twice, and replays initialize when the server forgets its session. The optional GET stream for server-initiated messages is not supported. Binaries for linux and darwin, a container image and a Go install path are provided.
What it does
- Embedded Tailscale node
- Joins your tailnet as a tagged device through tsnet, with no root or TUN device needed.
- Stdio to Streamable HTTP
- Presents a remote tailnet server to the agent as a local command.
- Check mode
- The -check flag connects, prints the server's tools to stderr and exits.
- Safe retries
- Only requests that never reached the server are retried, so tool calls are not duplicated.
- Session recovery
- Replays initialize and resends the request when the server restarts and loses the session.
- Static binaries and image
- Download for linux or darwin, build with Go, or run the OCI image.
Good for
- Let a cloud coding agent use a private MCP server without exposing it publicly
- Give a sandboxed assistant draft-only access to a mailbox on your tailnet
- Run several tailnet servers for one agent, one process per hostname
- Verify a tailnet MCP server's tool list from an agent machine before registering it
Pricing
Open source
Tailnet MCP bridge FAQ
Does my server need a public URL?
No. It stays behind tailscale serve on your tailnet, and the bridge reaches it as a tagged tailnet device.
Do I need the auth key every time?
No. The key is needed only for the first login; tagged nodes do not expire and the node key is kept in the state directory.
Which platforms have binaries?
Static binaries for linux and darwin on amd64 and arm64, plus an OCI image.
Can the server push messages to the client?
Not through the optional GET stream, which is unsupported; servers answer each request in its own response.
Is Tailnet MCP bridge free?
Yes. Tailnet MCP bridge is open source, so you can use and self-host it for free.
How do I add Tailnet MCP bridge to Claude Code?
Run this command in your terminal: claude mcp add tailnet-mcp --env TS_AUTHKEY='<TS_AUTHKEY>' -- docker run -i --rm -e TS_AUTHKEY ghcr.io/zedong-peng/tailnet-mcp:v0.3.0
What are the best alternatives to Tailnet MCP bridge?
The closest alternatives to Tailnet MCP bridge are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


