loading…
Search for a command to run...
loading…
Exposes any stdio-based MCP server to the internet via HTTP/SSE transport, enabling remote agents to access MCP tools over a network.
Exposes any stdio-based MCP server to the internet via HTTP/SSE transport, enabling remote agents to access MCP tools over a network.
Expose any stdio-based MCP server (like @browsermcp/mcp) to the internet via HTTP/SSE transport. Perfect for remote agents that need to access MCP tools over a network.
@browsermcp/mcpnpm install
cp .env.example .env
# Edit .env to set your API key
Generate a secure API key:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
npm run build
npm start
Or for development:
npm run dev
| Endpoint | Method | Description |
|---|---|---|
/sse |
GET | Establish SSE connection (returns endpoint URL) |
/message?sessionId=xxx |
POST | Send JSON-RPC messages |
/health |
GET | Health check (no auth required) |
/sessions |
GET | List active sessions (auth required) |
Tailscale provides secure, private access without exposing to the public internet.
# Install Tailscale if not already installed
# Then serve via Tailscale
tailscale serve --bg --http 3000
Or use your Tailscale IP directly:
tailscale status # Find your Tailscale IP
Your MCP server will be available at:
https://your-machine.tailnet-name.ts.net (via serve)http://your-tailscale-ip:3000 (direct IP)Use from your agent:
{
"mcpServers": {
"browser-remote": {
"url": "http://your-tailscale-ip:3000/sse",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}
# Install ngrok if not already installed
ngrok http 3000
ngrok will provide a public URL like https://abc123.ngrok.io.
# Install cloudflared if not already installed
cloudflared tunnel --url http://localhost:3000
/sse - Server creates session, sends endpoint event with message URL/message?sessionId=xxx - Server forwards JSON-RPC to MCP processmessage eventscurl http://localhost:3000/health
Response:
{
"status": "healthy",
"sessions": 0,
"uptime": 10.5,
"transport": "sse",
"endpoints": {
"sse": "/sse (GET - establishes SSE connection)",
"message": "/message?sessionId=xxx (POST - send JSON-RPC messages)"
}
}
const eventSource = new EventSource('http://localhost:3000/sse', {
headers: { 'Authorization': 'Bearer your-api-key' }
});
eventSource.addEventListener('endpoint', (e) => {
console.log('Message endpoint:', e.data);
// e.data = "/message?sessionId=xxx"
});
eventSource.addEventListener('message', (e) => {
console.log('MCP response:', JSON.parse(e.data));
});
curl -X POST "http://localhost:3000/message?sessionId=your-session-id" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
| Environment Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3000 |
HOST |
Host to bind to | 0.0.0.0 |
MCP_API_KEY |
API key for authentication | (none) |
MCP_COMMAND |
Command to run MCP server | npx |
MCP_ARGS |
JSON array of arguments | ["@browsermcp/mcp@latest"] |
You can use this proxy with any stdio-based MCP server:
# Example: Use a custom MCP server
MCP_COMMAND=node
MCP_ARGS=["/path/to/your/mcp-server/dist/index.js"]
# Example: Use Python MCP server
MCP_COMMAND=python
MCP_ARGS=["-m", "your_mcp_server"]
/sessions endpointCheck the console logs for errors. The MCP server stderr is forwarded to the proxy's console.
curl http://localhost:3000/healthtailscale status.env matches your request header/sse endpoint (not just base URL)MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"mcp-http-proxy": {
"command": "npx",
"args": []
}
}
}