
Tailnet MCP bridge
io.github.zedong-peng由 GitHub 账号 zedong-peng 发布v0.3.0更新于 Nov 3, 2026
通过 stdio,从代理沙箱访问 Tailscale tailnet 内的 MCP 服务器。
AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。
原文描述
Reach an MCP server inside your Tailscale tailnet from an agent's sandbox, over stdio.
概览
Tailnet MCP bridge 的本地 MCP 服务;无需登录;STDIO。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
安装
在 SourceWeft 中
- 打开 控制台中的 Tailnet MCP bridge,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
tailnet-mcp
A stdio MCP server that forwards everything to a Streamable HTTP MCP server inside your tailnet.
Hosted agents (Grok, cloud coding agents, sandboxed assistants) usually take MCP servers two ways. By URL: the vendor's servers connect, so your server has to be on the public internet. By command: the agent starts a process on its own computer, but that computer is not in your tailnet and you can't run tailscaled there (no root, no TUN). tailnet-mcp is the command: it embeds a Tailscale node (tsnet), joins your tailnet as a tagged device and bridges stdio to the server. Your server stays behind tailscale serve, never on the internet.
Install
Download a static binary for linux or darwin, amd64 or arm64, from Releases and check it against SHA256SUMS. Or build it yourself:
Or run the image ghcr.io/zedong-peng/tailnet-mcp with a volume on /home/nonroot/.local/state/tailnet-mcp. It is also listed in the MCP Registry as io.github.zedong-peng/tailnet-mcp.
Use
-
Publish the server to the tailnet only, on a path nobody can guess:
-
Mint a one-time, pre-authorized auth key with a tag for the agent (admin console, or the API), and log in once from the agent's computer:
-checkconnects, prints the server's tools on stderr and exits. The node key is kept in-state(default~/.local/state/tailnet-mcp/<hostname>); keep it on persistent storage. Tagged nodes don't expire, so the key is not needed again. -
Register the same command, without the key, as the agent's MCP server:
Each process is its own tailnet node. For a second server, run a second process with a different -hostname.
Lock it down
The agent reads untrusted input (web pages, mail), so assume it can be talked into anything its tools allow. Three layers, none of which rely on the agent behaving:
-
Network. Give the tag one grant to the ports it needs and nothing else:
Grants that allow everything (
"src": ["autogroup:member"], "dst": ["*"]) don't cover tagged devices, so that one grant is all the tag gets. -
Path.
tailscale serve --set-pathanswers only on the secret path; any other path on the port is a 404. Other devices in the tailnet can't use the server by guessing the port. -
Server. Enforce permissions where the data lives, not in the agent: a mail server that can only save drafts, a password vault account that is a view-only member of one shared collection. examples/private-tools sets up both.
Behaviour
- Before the first request it pings the server's node until it answers. Right after a restart the server may still hold a stale path to the node, and the first dial would time out.
- Only requests that never reached the server are retried, so a tool call is never sent twice.
- When the server restarts and forgets the session (404, or a 400 about the session), the bridge replays
initializeand resends the request. The client doesn't notice. - A failed request comes back as a JSON-RPC error with the reason, so the client never waits for an answer that won't come.
- On EOF it ends the session with
DELETE. Logs go to stderr; stdout carries only MCP frames.-vadds tsnet's own logs.
Not supported: the optional GET stream that lets a server send messages outside a response. Servers answer each request in its own response, as almost all tool servers do.
Compared with
mcp-remoteand other stdio-to-HTTP bridges need a network path to the server. In an agent's sandbox that means a public URL.tailscale upin the sandbox needs root and a TUN device. If someone logs in as a user instead of with a tagged key, the sandbox gets that user's access to the whole tailnet.- Tailscale Aperture is a gateway on the server side: it aggregates HTTP MCP servers and grants tools per user. It doesn't get a sandboxed agent into the tailnet, so the two fit together.
Build and test
Tagging v* publishes the four binaries, the image and the registry entry.
来源:README.md,提交 479d4e0
工具
0版本历史
1- v0.3.0最新Nov 3, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分