claude-code-tailscale 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +149 -30
- package/dist/index.js +1 -1
- package/dist/tshelper.js +2 -2
- package/dist/tshelper.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -12,12 +12,12 @@ Claude Code
|
|
|
12
12
|
└── routes through your tailnet
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
On first tool invocation, the MCP server spawns `tshelper`, which:
|
|
16
16
|
1. Joins your tailnet as an ephemeral device using `tsnet`
|
|
17
|
-
2. Starts a SOCKS5 proxy
|
|
18
|
-
3. Returns
|
|
17
|
+
2. Starts a SOCKS5 proxy, a control API, and an agent listener
|
|
18
|
+
3. Returns connection details to the MCP server
|
|
19
19
|
|
|
20
|
-
Claude can then use `tailscale_fetch` to access any service on your tailnet — internal APIs, dashboards, databases — without exposing them to the internet.
|
|
20
|
+
Claude can then use `tailscale_fetch` to access any service on your tailnet — internal APIs, dashboards, databases — without exposing them to the internet. Multiple Claude Code sessions on different machines can discover each other, exchange messages, and coordinate work through shared task lists.
|
|
21
21
|
|
|
22
22
|
When the session ends, the device explicitly logs out and is immediately removed from your tailnet.
|
|
23
23
|
|
|
@@ -29,21 +29,7 @@ When the session ends, the device explicitly logs out and is immediately removed
|
|
|
29
29
|
|
|
30
30
|
## Setup
|
|
31
31
|
|
|
32
|
-
### 1.
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
# Clone the repo
|
|
36
|
-
git clone https://github.com/rosskukulinski/claude-code-tailscale.git
|
|
37
|
-
cd claude-code-tailscale
|
|
38
|
-
|
|
39
|
-
# Build the Go helper
|
|
40
|
-
cd tshelper && go build -o ../bin/tshelper . && cd ..
|
|
41
|
-
|
|
42
|
-
# Install npm dependencies and build TypeScript
|
|
43
|
-
npm install && npm run build
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### 2. Configure
|
|
32
|
+
### 1. Configure Credentials
|
|
47
33
|
|
|
48
34
|
Set your Tailscale credentials (pick one):
|
|
49
35
|
|
|
@@ -56,10 +42,12 @@ export TS_CLIENT_SECRET="tskey-client-..."
|
|
|
56
42
|
export TS_TAGS="tag:claude-code" # required for OAuth
|
|
57
43
|
```
|
|
58
44
|
|
|
59
|
-
###
|
|
45
|
+
### 2. Add to Claude Code
|
|
46
|
+
|
|
47
|
+
The simplest way — install directly from npm:
|
|
60
48
|
|
|
61
49
|
```bash
|
|
62
|
-
claude mcp add tailscale --
|
|
50
|
+
claude mcp add tailscale -- npx -y claude-code-tailscale
|
|
63
51
|
```
|
|
64
52
|
|
|
65
53
|
Or add to your project's `.mcp.json`:
|
|
@@ -68,8 +56,8 @@ Or add to your project's `.mcp.json`:
|
|
|
68
56
|
{
|
|
69
57
|
"mcpServers": {
|
|
70
58
|
"tailscale": {
|
|
71
|
-
"command": "
|
|
72
|
-
"args": ["
|
|
59
|
+
"command": "npx",
|
|
60
|
+
"args": ["-y", "claude-code-tailscale"],
|
|
73
61
|
"env": {
|
|
74
62
|
"TS_AUTHKEY": "tskey-auth-..."
|
|
75
63
|
}
|
|
@@ -78,14 +66,14 @@ Or add to your project's `.mcp.json`:
|
|
|
78
66
|
}
|
|
79
67
|
```
|
|
80
68
|
|
|
81
|
-
|
|
69
|
+
With an OAuth client secret:
|
|
82
70
|
|
|
83
71
|
```json
|
|
84
72
|
{
|
|
85
73
|
"mcpServers": {
|
|
86
74
|
"tailscale": {
|
|
87
|
-
"command": "
|
|
88
|
-
"args": ["
|
|
75
|
+
"command": "npx",
|
|
76
|
+
"args": ["-y", "claude-code-tailscale"],
|
|
89
77
|
"env": {
|
|
90
78
|
"TS_CLIENT_SECRET": "tskey-client-...",
|
|
91
79
|
"TS_TAGS": "tag:claude-code"
|
|
@@ -95,13 +83,82 @@ Or with an OAuth client secret:
|
|
|
95
83
|
}
|
|
96
84
|
```
|
|
97
85
|
|
|
86
|
+
With team coordination enabled:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"tailscale": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "claude-code-tailscale"],
|
|
94
|
+
"env": {
|
|
95
|
+
"TS_AUTHKEY": "tskey-auth-...",
|
|
96
|
+
"TS_ENABLE_TEAMS": "1"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Building from Source
|
|
104
|
+
|
|
105
|
+
If you prefer to build locally instead of using the npm package:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git clone https://github.com/rosskukulinski/claude-code-tailscale.git
|
|
109
|
+
cd claude-code-tailscale
|
|
110
|
+
|
|
111
|
+
# Build the Go helper
|
|
112
|
+
cd tshelper && go build -o ../bin/tshelper . && cd ..
|
|
113
|
+
|
|
114
|
+
# Install npm dependencies and build TypeScript
|
|
115
|
+
npm install && npm run build
|
|
116
|
+
|
|
117
|
+
# Add to Claude Code
|
|
118
|
+
claude mcp add tailscale -- node /path/to/claude-code-tailscale/dist/index.js
|
|
119
|
+
```
|
|
120
|
+
|
|
98
121
|
## Tools
|
|
99
122
|
|
|
123
|
+
### Networking
|
|
124
|
+
|
|
100
125
|
| Tool | Description |
|
|
101
126
|
|------|-------------|
|
|
102
127
|
| `tailscale_status` | Show tailnet connection status, IPs, and hostname |
|
|
103
|
-
| `tailscale_fetch` | HTTP fetch through the tailnet (
|
|
128
|
+
| `tailscale_fetch` | HTTP fetch through the tailnet (GET, POST, PUT, DELETE, PATCH, HEAD) |
|
|
104
129
|
| `tailscale_connect_test` | Test TCP connectivity to a tailnet host:port |
|
|
130
|
+
| `tailscale_port_forward` | Create, list, or close TCP port forwards to tailnet hosts |
|
|
131
|
+
|
|
132
|
+
### Diagnostics
|
|
133
|
+
|
|
134
|
+
| Tool | Description |
|
|
135
|
+
|------|-------------|
|
|
136
|
+
| `tailscale_dns_lookup` | Resolve DNS names via MagicDNS |
|
|
137
|
+
| `tailscale_whois` | Look up info about a tailnet IP (owner, hostname, tags) |
|
|
138
|
+
| `tailscale_devices` | List all devices on the tailnet |
|
|
139
|
+
| `tailscale_ping` | Ping a tailnet peer (disco, TSMP, ICMP, peerapi) |
|
|
140
|
+
| `tailscale_acl_check` | Show ACL packet filter rules for this node |
|
|
141
|
+
| `tailscale_netcheck` | DERP relay regions and latency probes |
|
|
142
|
+
| `tailscale_cert` | Get TLS certificate info for a tailnet domain |
|
|
143
|
+
|
|
144
|
+
### Inter-Agent Messaging
|
|
145
|
+
|
|
146
|
+
| Tool | Description |
|
|
147
|
+
|------|-------------|
|
|
148
|
+
| `tailscale_agents` | Discover other Claude Code agents (`cc-*` peers) on the tailnet |
|
|
149
|
+
| `tailscale_send_message` | Send a message to another agent (or `"*"` to broadcast) |
|
|
150
|
+
| `tailscale_check_messages` | Check inbox for messages from other agents |
|
|
151
|
+
|
|
152
|
+
### Team Coordination (opt-in: `TS_ENABLE_TEAMS=1`)
|
|
153
|
+
|
|
154
|
+
| Tool | Description |
|
|
155
|
+
|------|-------------|
|
|
156
|
+
| `tailscale_team_create` | Create a named team with this agent as lead |
|
|
157
|
+
| `tailscale_team_join` | Join a team hosted by another agent |
|
|
158
|
+
| `tailscale_team_info` | Show team membership and roles |
|
|
159
|
+
| `tailscale_task_create` | Create a task on the shared task list |
|
|
160
|
+
| `tailscale_task_list` | List tasks (filter by status: pending, in_progress, completed) |
|
|
161
|
+
| `tailscale_task_update` | Claim, complete, update, or delete a task |
|
|
105
162
|
|
|
106
163
|
### Example Usage
|
|
107
164
|
|
|
@@ -115,6 +172,46 @@ Once configured, Claude can access your tailnet services:
|
|
|
115
172
|
> What's my tailnet connection status?
|
|
116
173
|
```
|
|
117
174
|
|
|
175
|
+
### Multi-Agent Coordination
|
|
176
|
+
|
|
177
|
+
Multiple Claude Code sessions on different machines can communicate and coordinate work over the tailnet.
|
|
178
|
+
|
|
179
|
+
**Messaging** — any agent can send messages to other `cc-*` peers:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
> Find other agents on the tailnet
|
|
183
|
+
→ tailscale_agents
|
|
184
|
+
|
|
185
|
+
> Send a message to the backend agent
|
|
186
|
+
→ tailscale_send_message(to: "cc-ross-backend-a7b2", subject: "API ready", body: "...")
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Team task coordination** (requires `TS_ENABLE_TEAMS=1`) — a lead agent creates a team and shared task list. Teammates join and claim tasks:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Terminal 1 (Machine A — backend repo):
|
|
193
|
+
> "Create a team called api-migration"
|
|
194
|
+
→ tailscale_team_create(name: "api-migration")
|
|
195
|
+
|
|
196
|
+
> "Add tasks for the migration"
|
|
197
|
+
→ tailscale_task_create(subject: "Update /api/users response schema", ...)
|
|
198
|
+
→ tailscale_task_create(subject: "Update /api/auth token format", ...)
|
|
199
|
+
|
|
200
|
+
Terminal 2 (Machine B — frontend repo):
|
|
201
|
+
> "Join the api-migration team"
|
|
202
|
+
→ tailscale_team_join(lead_hostname: "cc-ross-backend-a7b2")
|
|
203
|
+
|
|
204
|
+
> "What tasks are available?"
|
|
205
|
+
→ tailscale_task_list(status: "pending")
|
|
206
|
+
|
|
207
|
+
> "Claim the users schema task"
|
|
208
|
+
→ tailscale_task_update(id: "task-1", action: "claim")
|
|
209
|
+
→ (works on it...)
|
|
210
|
+
→ tailscale_task_update(id: "task-1", action: "complete")
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The lead holds the canonical task list in memory. Teammates interact with it over HTTP via the tailnet. If the lead goes offline, task operations fail cleanly — teammates can keep working on already-claimed tasks.
|
|
214
|
+
|
|
118
215
|
## Configuration
|
|
119
216
|
|
|
120
217
|
| Environment Variable | Required | Default | Description |
|
|
@@ -126,25 +223,47 @@ Once configured, Claude can access your tailnet services:
|
|
|
126
223
|
| `TS_STATE_DIR` | No | `~/.cache/claude-code-tailscale/{hostname}` | State directory |
|
|
127
224
|
| `TS_CONTROL_URL` | No | — | Custom control server (for Headscale) |
|
|
128
225
|
| `TS_EPHEMERAL` | No | `true` | Register as ephemeral node |
|
|
226
|
+
| `TS_ENABLE_TEAMS` | No | — | Set to `1` to enable team/task coordination tools |
|
|
227
|
+
| `TS_VERBOSE` | No | — | Set to `1` for full tsnet debug logging |
|
|
129
228
|
|
|
130
229
|
**Hostname format:** `cc-{user}-{context}-{random4}` where `{context}` is the git repo name (or machine hostname if not in a repo) and `{random4}` is 4 random hex chars for uniqueness across concurrent sessions.
|
|
131
230
|
|
|
132
231
|
## Architecture
|
|
133
232
|
|
|
233
|
+
```
|
|
234
|
+
Machine A (Lead) Machine B (Teammate)
|
|
235
|
+
+------------------------------------------+ +------------------------------------------+
|
|
236
|
+
| Claude Code Session A | | Claude Code Session B |
|
|
237
|
+
| [Claude LLM] <-> [MCP Server (TS)] | | [Claude LLM] <-> [MCP Server (TS)] |
|
|
238
|
+
| | | | | |
|
|
239
|
+
| [tshelper (Go)] | | [tshelper (Go)] |
|
|
240
|
+
| | | | | | | | | | | |
|
|
241
|
+
| SOCKS5 API Agent Team+Tasks | | SOCKS5 API Agent (proxied) |
|
|
242
|
+
| :9321 (local) | | :9321 |
|
|
243
|
+
+------------------------------------------+ +------------------------------------------+
|
|
244
|
+
| |
|
|
245
|
+
+--------- Tailscale Tailnet --------------+
|
|
246
|
+
```
|
|
247
|
+
|
|
134
248
|
This plugin follows the same pattern as [kong-tailscale-plugin](https://github.com/rosskukulinski/kong-tailscale-plugin):
|
|
135
249
|
|
|
136
250
|
- **Kong plugin**: LuaJIT FFI → libtailscale → `tailscale_loopback()` → SOCKS5 → cosocket
|
|
137
251
|
- **This plugin**: Go tsnet binary → SOCKS5 proxy → Node.js `http.request` with `socks-proxy-agent`
|
|
138
252
|
|
|
139
|
-
The Go helper (`tshelper`) uses `tsnet.Server` directly instead of libtailscale's C API, since we're already in Go. It
|
|
253
|
+
The Go helper (`tshelper`) uses `tsnet.Server` directly instead of libtailscale's C API, since we're already in Go. It runs three listeners:
|
|
254
|
+
|
|
255
|
+
1. **SOCKS5 proxy** (localhost, random port) — routes HTTP traffic through the tailnet
|
|
256
|
+
2. **Control API** (localhost, random port) — serves MCP tool requests (DNS, ping, devices, etc.)
|
|
257
|
+
3. **Agent listener** (tailnet, port 9321) — inter-agent messaging, team join/leave, shared tasks
|
|
140
258
|
|
|
141
259
|
Key design decisions:
|
|
142
|
-
- **
|
|
260
|
+
- **Lazy connection**: Tailnet joins on first tool invocation to avoid wasting nodes
|
|
143
261
|
- **Ephemeral by default**: Device auto-removes when the session ends, with explicit logout for instant cleanup
|
|
144
262
|
- **Unique hostnames**: Each session gets a unique hostname (`cc-{user}-{repo}-{rand}`) to avoid collisions
|
|
145
263
|
- **OAuth + auth key support**: Works with both `TS_CLIENT_SECRET` (OAuth) and `TS_AUTHKEY` (plain auth keys)
|
|
146
264
|
- **No system Tailscale required**: tsnet embeds a full Tailscale node in the Go binary
|
|
147
|
-
- **
|
|
265
|
+
- **Centralized task list**: The team lead holds the canonical task store in memory; teammates proxy via HTTP. No distributed consensus needed
|
|
266
|
+
- **Feature-flagged teams**: Team/task tools only register when `TS_ENABLE_TEAMS=1`, keeping the default tool set lean
|
|
148
267
|
|
|
149
268
|
## License
|
|
150
269
|
|
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ async function callAPI(path, options) {
|
|
|
71
71
|
// --- MCP Server ---
|
|
72
72
|
const server = new McpServer({
|
|
73
73
|
name: "tailscale",
|
|
74
|
-
version: "0.
|
|
74
|
+
version: "0.2.0",
|
|
75
75
|
});
|
|
76
76
|
server.tool("tailscale_status", "Show Tailscale connection status: tailnet IPs, hostname, and proxy address. Call this first to verify the tailnet connection is working.", {}, async () => {
|
|
77
77
|
await ensureConnected();
|
package/dist/tshelper.js
CHANGED
|
@@ -28,9 +28,9 @@ export class TsHelper {
|
|
|
28
28
|
* Start the tshelper binary and wait for it to connect to the tailnet.
|
|
29
29
|
* Idempotent: returns the same promise if already starting/started.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
start() {
|
|
32
32
|
if (this.connected) {
|
|
33
|
-
return this._info;
|
|
33
|
+
return Promise.resolve(this._info);
|
|
34
34
|
}
|
|
35
35
|
if (this._startPromise) {
|
|
36
36
|
return this._startPromise;
|
package/dist/tshelper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tshelper.js","sourceRoot":"","sources":["../src/tshelper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAgB7B,MAAM,OAAO,QAAQ;IACX,IAAI,GAAwB,IAAI,CAAC;IACjC,KAAK,GAAwB,IAAI,CAAC;IAClC,aAAa,GAAiC,IAAI,CAAC;IAE3D,0FAA0F;IAClF,MAAM,CAAU,WAAW,GAAG,CAAC,CAAC;IAChC,MAAM,CAAU,eAAe,GAAG,IAAI,CAAC;IAE/C,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IAClF,CAAC;IAED;;;OAGG;IACH,KAAK
|
|
1
|
+
{"version":3,"file":"tshelper.js","sourceRoot":"","sources":["../src/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,GAAG,IAAI,CAAC;QACpB,CAAC;IACH,CAAC;IAED;;OAEG;IACK,UAAU;QAChB,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1D,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,MAAM,UAAU,GAAG;YACjB,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,GAAG,EAAE,CAAC;YAC9C,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,GAAG,EAAE,CAAC;YACnD,WAAW,GAAG,EAAE,EAAE,UAAU;SAC7B,CAAC;QAEF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;YAC3B,IAAI,CAAC,KAAK,UAAU,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;gBACtC,OAAO,CAAC,CAAC;YACX,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-tailscale",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Claude Code plugin that joins a Tailscale tailnet as an ephemeral device using libtailscale",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"build:all": "npm run build:go && npm run build",
|
|
14
14
|
"dev": "tsc --watch",
|
|
15
15
|
"start": "node dist/index.js",
|
|
16
|
+
"test": "cd tshelper && go test ./...",
|
|
16
17
|
"postinstall": "node scripts/postinstall.mjs"
|
|
17
18
|
},
|
|
18
19
|
"files": [
|