Skip to content

squirrel mcp becomes a stdio front end for the hosted MCP (one tool set, channel built in) #737

Description

@nc9

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 login session, 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: the squirrel audit command 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:

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 through squirrel audit.

Notes

Acceptance Criteria

  • With the user logged in, tools/list from squirrel mcp returns exactly the hosted MCP's tool list
  • A tool added to the hosted MCP appears in squirrel mcp with no CLI release
  • A cloud tool call through squirrel mcp (for example list_websites) returns the same result as calling the hosted MCP directly with the same credential
  • Signed out, tools/list still works, and cloud tool calls return a single error that names squirrel auth login and squirrel audit for free local audits
  • An audit published from squirrel audit can be read through the forwarded get_report
  • Claude Code connects to squirrel mcp both on the legacy handshake and on 2026-07-28
  • squirrel mcp --channel delivers 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 channel still works (as an alias of squirrel mcp --channel)
  • docs/ describes the new behaviour, including that the MCP needs a login and that free or local audits use squirrel audit

Metadata

Metadata

Assignees

Labels

clienhancementin-progresssize: L

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions