Symptoms
Connection refused
or timeout
{ "mcpServers": { "remote-http": { "url": "https://api.example.com/mcp", "type": "http", "headers": { "Authorization": "Bearer ${API_TOKEN}" } } }}
{ "mcpServers": { "remote-sse": { "url": "https://stream.example.com/mcp", "type": "sse", "headers": { "Authorization": "Bearer ${API_TOKEN}" } } }}
{ "headers": { "Authorization": "Bearer ${API_TOKEN}" } }
{ "headers": { "X-API-Key": "${API_KEY}" } }
{ "url": "https://api.example.com/mcp?api_key=${API_KEY}" }
{ "headers": { "Authorization": "Basic ${BASE64_CREDENTIALS}" } }
import { createHub } from '@himorishige/hatago-hub';export default { async fetch(_req: Request, env: Env) { const hub = createHub({ servers: { 'remote-api': { url: env.REMOTE_MCP_URL, type: 'http', headers: { Authorization: `Bearer ${env.API_TOKEN}` } } } }); // handle request with hub... }}
Symptoms
Connection refused
or timeout
Fixes:
Symptoms
401
or 403
Fixes:
Set CORS headers on the server or use a proxy/edge runtime like Workers.
--verbose
while debugging