Repository navigation
Conversation
Agents can connect to the hosted service over MCP with an API key: claude mcp add --transport http stackprobe https://stackprobe.tech/mcp --header "Authorization: Bearer <key>". The same four tools as the local server, defined once in packages/mcp: createServer now takes a ScanStarter, localScanStarter for stdio, and a hosted one in apps/web that starts workflow runs under the key's limits and waits up to 25 s before returning a running scan for get_scan. Stateless Streamable HTTP (a server per request, JSON responses), using the MCP SDK's web-standard transport. Starting a scan with a key is shared with POST /api/scans (startKeyedScan). Closes #38 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Drippa Sign-Off: Remote MCP endpoint at /mcp serving the four stackprobe tools✅ Delivers ticket #38 — 4 of 5 outcomes What was promised
Proof Steps based on ticket #38, the pull request description and the code change. DetailsThe web app now serves an MCP endpoint at /mcp. Agents connect to it with an API key and get the same four tools as the local server, with no install. Scans started this way run as normal hosted scans under the key's daily limit, and a scan still running after about 25 seconds comes back as running so the agent can follow up with get_scan. The second done-when check, adding the endpoint in Claude Code against a preview, still has to be run by hand, and the description says how. Test coverage: ✅ Well covered — A new client test lists the tools and runs each one against the hosted handlers using recorded fixtures. It also covers a still-running scan, the daily limit and a missing key. 🔍 Checked: 🎫 Compared against drippa-ai/stackprobe#38 Updated by Drippa • 2026-10-12 19:42 UTC Comment |
Closes #38
Covers the first "Done when" line of #38: an MCP client test lists the tools and runs each against the hosted handlers (fixtures, no live sites). The second (
claude mcp addagainst a preview) needs you; see below.What changes
packages/mcp:createServer({ store, startScan }). The four tool definitions are unchanged and shared, and howscan_domainscans is now aScanStarter.localScanStarter({ store, net, decider?, browser? })is today's behaviour, used by the stdiobinand its tests (unchanged, passing).scan_domainturns aLimitErrorinto a tool error with its message, and its description now says to callget_scanif a scan is still running.apps/web/src/lib/mcp.ts+app/mcp/route.ts: the remote endpoint.Authorization: Bearer <key>is required:401 invalid_keyotherwise, before any MCP traffic. Each request is logged against the key.startKeyedScan, now shared withPOST /api/scans: workflow runs, the key's 10 new scans a day, and reused scans free. It waits up to 25 s for the scan, then returns it running (maxDuration = 60).WebStandardStreamableHTTPServerTransport, a fresh server per request, JSON responses (no SSE), so it fits serverless functions.GET/POST/DELETEgo to the transport.claude mcp addline.Checked
StreamableHTTPClientTransportwith itsfetchgoing straight intohandleMcp; workflow stood in for by replaying the recordedvercelfixture):scan_domainruns a hosted scan under the key (one spend), then reuses it (no spend).get_scan,explain_detectionanddiff_scanswork.get_scan.curlJSON-RPC):initialize,tools/list,get_scan,explain_detectionwith evidence, and no key → 401.pnpm lint,pnpm typecheck,pnpm test(400 passing),pnpm buildpass.To finish "Done when" on a preview
Previews are behind Vercel's login, so Claude Code needs a protection bypass header as well:
The bypass secret is under Project → Settings → Deployment Protection → Protection Bypass for Automation.
🤖 Generated with Claude Code