Use MCP mode to expose local MCP endpoints for remote clients. MCP mode is available on Pro and Business plans.
Plan requirement: MCP mode requires a logged-in API key on Pro or Business.
New user
Existing user
Prefer a guided flow? Open your dashboard and use MCP Setup Wizard v2 inside CLI Updates, MCP, and 2026 Best Practices. It helps you avoid config mistakes and generates copy-ready commands + JSON.
instatunnel ... --mcp --transport v2 command using your port and subdomain.v1 is the default transport. It is the most compatible option and best for standard HTTP forwarding and webhook-style traffic.
Use v2 when you need streaming behavior (MCP Streamable HTTP, long-lived tool responses, or server push-like flows). If unsure, start with v1 and switch to v2 only for streaming clients.
--transport v2 requires newer InstaTunnel CLI versions (1.1.7+). Recommended update: npm install -g instatunnel@latest.InstaTunnel supports an MCP token header for defense in depth. During the current staged rollout, your workspace may run in warn mode first and enforce mode later.
Generate a strong token and use it as YOUR_MCP_TOKEN in MCP JSON Authorization headers.
Use the generated HTTPS URL in your MCP client configuration and point it to the path your local MCP server expects.
stdio MCP servers. Headers are not used there.Generate and copy ready-to-use JSON for VS Code, Cursor, Claude Desktop, Windsurf, Codex, and Gemini Antigravity.
--transport v2 requires CLI 1.1.7+; keep updated with npm install -g instatunnel@latest.instatunnel --stats for account usage and instatunnel --logs for request-log polling.Mira planes y luego sigue una guia cuando quieras.
For MCP endpoints on Pro/Business, use instatunnel 8787 --mcp.
Generate IDE-ready JSON for VS Code, Cursor, Claude Desktop, Windsurf, Codex, and Gemini Antigravity with endpoint and token header.
MCP Endpoint
https://your-subdomain.instatunnel.my/mcpTarget: .vscode/mcp.json (workspace)
{
"mcpServers": {
"instatunnel-remote": {
"type": "streamable-http",
"url": "https://your-subdomain.instatunnel.my/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_TOKEN"
}
}
}
}headers.Authorization is not required by MCP clients by default. Add it only when your MCP server expects bearer-token auth. For local stdio MCP servers, headers are not used.
Token helper
Generate a strong token, paste it into YOUR_MCP_TOKEN, and use the same value in your local MCP server auth.
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" | Set-ClipboardCommon setup and troubleshooting questions for VS Code, Cursor, Claude Desktop, Windsurf, Codex, and Gemini Antigravity.
"Authorization": "Bearer YOUR_MCP_TOKEN" only if your remote MCP server enforces token auth. For local stdio MCP servers, headers are not used.https://YOUR-SUBDOMAIN.instatunnel.my/mcp. Start your local MCP server first, then run: instatunnel 8787 --mcp --transport v2 --subdomain YOUR-SUBDOMAIN.8787) and retry.instatunnel 3000 --subdomain webhook-demo). For MCP tools, use MCP mode with --mcp --transport v2 and the /mcp endpoint.instatunnel 8787 --mcp --transport v2. Note: --transport v2 requires newer CLI versions (1.1.7+). Update with npm install -g instatunnel@latest.codex mcp add.