@dotmcp/tunnel 1.0.1 β†’ 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +210 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,210 @@
1
+ # @dotmcp/tunnel
2
+
3
+ Connect your local MCP servers to the [dotMCP Marketplace](https://dotmcp.io) without deploying code to the cloud.
4
+
5
+ ## Features
6
+
7
+ - πŸ”Œ **Expose local MCP servers** to the marketplace
8
+ - πŸ”’ **Secure WebSocket connection** with TLS encryption
9
+ - πŸ”„ **Auto-reconnect** with exponential backoff
10
+ - πŸ’» **Works with any MCP server** - Node.js, Python, or any language
11
+ - πŸš€ **Zero cloud deployment** - keep your code on-premise or on your own cloud
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ # Install globally
17
+ npm install -g @dotmcp/tunnel
18
+
19
+ # Or run directly with npx
20
+ npx @dotmcp/tunnel --help
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ ### 1. Create a Tunnel Server on dotMCP
26
+
27
+ 1. Go to [app.dotmcp.io](https://app.dotmcp.io) and log in
28
+ 2. Navigate to **Dashboard** β†’ **My Servers** β†’ **New Server**
29
+ 3. Select **"Tunnel (Local MCP Server)"**
30
+ 4. Enter your server name and description
31
+ 5. Copy your **Tunnel Key** from the server settings
32
+
33
+ ### 2. Create Configuration
34
+
35
+ Create a `tunnel.yaml` file:
36
+
37
+ ```yaml
38
+ key: "dott_your_tunnel_key_here"
39
+
40
+ servers:
41
+ - id: "your-server-id"
42
+ command: "node"
43
+ args: ["./my-mcp-server.js"]
44
+ ```
45
+
46
+ ### 3. Start the Tunnel
47
+
48
+ ```bash
49
+ dotmcp-tunnel -c tunnel.yaml
50
+ ```
51
+
52
+ ## Configuration Reference
53
+
54
+ ### Basic Configuration
55
+
56
+ ```yaml
57
+ key: "dott_xxx..."
58
+
59
+ servers:
60
+ - id: "server-id-from-dashboard"
61
+ command: "node"
62
+ args: ["server.js"]
63
+ ```
64
+
65
+ ### Full Configuration Options
66
+
67
+ ```yaml
68
+ key: "dott_xxx..."
69
+
70
+ # Optional: Custom relay URL (defaults to wss://relay.dotmcp.io)
71
+ # relay: "wss://relay.dotmcp.io"
72
+
73
+ servers:
74
+ - id: "server-id"
75
+
76
+ # Option 1: Command-based (stdio transport)
77
+ command: "node"
78
+ args: ["./server.js", "--flag"]
79
+ cwd: "/path/to/working/directory"
80
+ env:
81
+ API_KEY: "secret"
82
+ DEBUG: "true"
83
+
84
+ # Option 2: HTTP-based (for running servers)
85
+ # url: "http://localhost:3000/mcp"
86
+ ```
87
+
88
+ ## CLI Usage
89
+
90
+ ```bash
91
+ # Start tunnel with config file
92
+ dotmcp-tunnel -c tunnel.yaml
93
+
94
+ # Start with verbose logging
95
+ dotmcp-tunnel -c tunnel.yaml -v
96
+
97
+ # Show help
98
+ dotmcp-tunnel --help
99
+ ```
100
+
101
+ ## Examples
102
+
103
+ ### Node.js MCP Server
104
+
105
+ ```yaml
106
+ key: "dott_xxx..."
107
+ servers:
108
+ - id: "my-server"
109
+ command: "node"
110
+ args: ["server.js"]
111
+ ```
112
+
113
+ ### Using NPM Packages
114
+
115
+ Expose the official MCP demo server:
116
+
117
+ ```yaml
118
+ key: "dott_xxx..."
119
+ servers:
120
+ - id: "demo-server"
121
+ command: "npx"
122
+ args: ["-y", "@modelcontextprotocol/server-everything"]
123
+ ```
124
+
125
+ ### Python MCP Server
126
+
127
+ ```yaml
128
+ key: "dott_xxx..."
129
+ servers:
130
+ - id: "python-server"
131
+ command: "python"
132
+ args: ["-m", "my_mcp_server"]
133
+ cwd: "/home/user/mcp-project"
134
+ env:
135
+ PYTHONPATH: "/home/user/mcp-project"
136
+ ```
137
+
138
+ ### Multiple Servers
139
+
140
+ ```yaml
141
+ key: "dott_xxx..."
142
+ servers:
143
+ - id: "weather-api"
144
+ command: "node"
145
+ args: ["./servers/weather.js"]
146
+
147
+ - id: "database-tools"
148
+ command: "node"
149
+ args: ["./servers/database.js"]
150
+ env:
151
+ DB_HOST: "localhost"
152
+ ```
153
+
154
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” WebSocket β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
155
+ β”‚ dotmcp-tunnel │◄──────────────────►│ dotMCP Relay β”‚
156
+ β”‚ (your machine) β”‚ β”‚ Server β”‚
157
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
158
+ β”‚ stdio β”‚
159
+ β–Ό β–Ό
160
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
161
+ β”‚ Local MCP Serverβ”‚ β”‚ Your MCP Serverβ”‚
162
+ β”‚ (Node/Python) β”‚ β”‚ (deployed on β”‚
163
+ β”‚ β”‚ β”‚ dotmcp.io) β”‚
164
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
165
+ β”‚
166
+ β–Ό
167
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
168
+ β”‚ API Consumers β”‚
169
+ β”‚ (Claude, apps) β”‚
170
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
171
+ ```
172
+
173
+ 1. **Tunnel daemon** connects to relay via secure WebSocket
174
+ 2. **Relay** holds the connection and routes requests
175
+ 3. **Proxy worker** forwards API requests through relay to your tunnel
176
+ 4. **Local MCP server** processes requests and returns responses
177
+
178
+ ## Security
179
+
180
+ - πŸ”‘ **Tunnel keys** are scoped to your account
181
+ - πŸ” **Traffic** is encrypted via WebSocket TLS
182
+ - 🚫 **No inbound ports** required on your machine
183
+ - πŸ”„ **Keys can be rotated** from the dashboard
184
+
185
+ ## Requirements
186
+
187
+ - Node.js >= 18.0.0
188
+
189
+ ## Troubleshooting
190
+
191
+ ### "Config file not found"
192
+ Create a `tunnel.yaml` file or specify the path with `-c path/to/config.yaml`
193
+
194
+ ### "Connection closed immediately"
195
+ - Verify your tunnel key is correct
196
+ - Check that the server ID matches your dashboard
197
+
198
+ ### "Tunnel connected but tools not syncing"
199
+ - Ensure your MCP server responds to `initialize` and `tools/list`
200
+ - Check server logs for errors with `-v` flag
201
+
202
+ ## Links
203
+
204
+ - πŸ“– [Full Documentation](https://docs.dotmcp.io/publishers/tunnel)
205
+ - 🌐 [dotMCP Marketplace](https://dotmcp.io)
206
+ - πŸ’¬ [Support](mailto:hello@dotmcp.io)
207
+
208
+ ## License
209
+
210
+ BUSL-1.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotmcp/tunnel",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "CLI daemon to connect local MCP servers to dotmcp.io",
6
6
  "author": "dotMCP <hello@dotmcp.io>",