Smithery requires SSE transport to connect to our MCP server. Currently we only have Stdio transport (mcp-server.ts). Our HTTP API (Hono) has no SSE endpoint. Vincent is blocked waiting for this.
File: src/middleware/auth.ts Add fallback: if no Authorization header exists, check for query param apiKey from the URL and treat it as Bearer token. Smithery passes auth as ?apiKey=xxx.
Create: src/routes/mcp-sse.ts
- Use SSEServerTransport from @modelcontextprotocol/sdk/server/sse.js
- Create an McpServer with all tools (search, extract, weather, finance, screenshot, validate-email, translate, geoip)
- Reference existing service implementations in src/services/
- Expose GET /sse for SSE connection and POST /messages for client messages
- Must work with Hono framework
Import and mount the new MCP SSE route.
- npm run build
- pm2 restart agent-toolbox
- Verify with curl