Repository navigation
Todo
Feature
Copy link
Labels
clienhancementNew feature or requestin-progressclaimed by a lane; see ops/state/claims.tsvsize: Lhamsterwheel
Description
Problem
squirrelscan has two MCP servers with their own tool sets: the local stdio squirrel mcp and the hosted server at mcp.squirrelscan.com/mcp. Every tool gets written, documented and tested twice, and they drift apart.
The newer agent features are cloud features:
- Scheduled-audit results: they exist only in the cloud.
- Push into the agent: through Claude Code channels or MCP Events.
- Entity and compare tools, website settings, notifications: cloud data.
A local-only server can't provide them. A channel especially needs both a stdio process (Claude Code only accepts local channels) and cloud events (the audits that finish while the developer is away).
Proposal
Turn squirrel mcp into a stdio front end for the hosted MCP, using the CLI's existing login.
Upstream:
- Connect to the hosted MCP over HTTP with the credential the CLI already holds:
squirrel auth loginsession, or the API key env var. No separate OAuth step. - Forward the hosted server's tools, resources and prompts as they are:
tools/list,tools/call,resources/*,prompts/*,skills/*. A new cloud tool reaches stdio users with no CLI release.
Downstream:
- Serve stdio to the agent and negotiate whatever protocol version the client asks for, the legacy handshake included.
- The upstream connection stays on the current revision. This also resolves the conflict where a channel must use the legacy handshake but the CLI wants the new one.
No local tools:
- Free and local audits (including
localhost, staging and private networks) stay where they already work best: thesquirrel auditcommand and its output formats (--format llm,json,markdown), which agents with a shell already drive through the squirrelscan skill. - The MCP is the cloud surface only, so every local tool implementation is deleted from the CLI.
Channel built in:
squirrel channelalready ships (feat(cli): add squirrel channel to push cloud audit events into Claude Code #571, refactor(cli): squirrel channel on the v2 MCP SDK, drop @modelcontextprotocol/sdk v1 (#570) #654). Today it is a separate stdio server that polls the REST notification feed (/v1/notifications?after=). Fold it into the front end assquirrel mcp --channel, keepingsquirrel channelas an alias. It declaresclaude/channeland turns cloud events into channel notifications.- It reads events from the hosted MCP's MCP Events support, through
events/poll, because a developer machine has no public URL for webhook delivery. Until that ships, it reads the notification feed cursor. - The rules from feat: squirrel channel, push cloud audit events into a running Claude Code session #569 still apply:
- ids, counts and fixed strings only, never text taken from crawled pages
- no permission relay
- catch up exactly once after a restart
Signed out:
- The catalog still lists.
- Cloud tool calls return one error that names
squirrel auth login, and says that free local audits are available throughsquirrel audit.
Notes
- Migration: existing
squirrel mcpconfigs keep working unchanged, because the command name and transport stay the same. Tool names that differ between the old local set and the hosted set need a mapping or a one-release alias. - Cost: the tools become thin forwarders, and the CLI binary still needs the MCP SDK for stdio and as a client.
- Clients without a shell (Claude Desktop, ChatGPT) keep connecting to the hosted URL directly. This change is for clients that launch local stdio servers.
- Related: feat: squirrel channel, push cloud audit events into a running Claude Code session #569 (channel), feat: move squirrel mcp to MCP protocol 2026-07-28 (SDK v2) #570 (protocol 2026-07-28).
Acceptance Criteria
- With the user logged in,
tools/listfromsquirrel mcpreturns exactly the hosted MCP's tool list - A tool added to the hosted MCP appears in
squirrel mcpwith no CLI release - A cloud tool call through
squirrel mcp(for examplelist_websites) returns the same result as calling the hosted MCP directly with the same credential - Signed out,
tools/liststill works, and cloud tool calls return a single error that namessquirrel auth loginandsquirrel auditfor free local audits - An audit published from
squirrel auditcan be read through the forwardedget_report - Claude Code connects to
squirrel mcpboth on the legacy handshake and on 2026-07-28 -
squirrel mcp --channeldelivers a channel event to an open Claude Code session within 60 seconds of a cloud audit completing, without text from crawled pages - The CLI's local MCP tool implementations are removed, and
squirrel channelstill works (as an alias ofsquirrel mcp --channel) -
docs/describes the new behaviour, including that the MCP needs a login and that free or local audits usesquirrel audit
Metadata
Metadata
Assignees
Labels
clienhancementNew feature or requestin-progressclaimed by a lane; see ops/state/claims.tsvsize: Lhamsterwheel
Activity
test(cli): mcp front-end tests use a scratch squirrel home (#737)
feat(cli): squirrel mcp is a stdio front end for the hosted MCP, chan…
test(cli): mcp front-end tests use a scratch squirrel home (#737)
chore(cli): remove leftover debug server script (#737)
feat(cli): squirrel mcp is a stdio front end for the hosted MCP, chan…
test(cli): mcp front-end tests use a scratch squirrel home (#737)
chore(cli): remove leftover debug server script (#737)
fix(cli): pass audit_website camelCase limits to run_audit as snake_c…
feat(cli): squirrel mcp is a stdio front end for the hosted MCP, chan…
test(cli): mcp front-end tests use a scratch squirrel home (#737)
chore(cli): remove leftover debug server script (#737)
fix(cli): pass audit_website camelCase limits to run_audit as snake_c…