Spirolo

Agents (MCP)

The same analysis as MCP tools, over stdio.

spirolo mcp is an MCP server over stdio. Point your client at the installed binary:

{
  "mcpServers": {
    "spirolo": {
      "command": "spirolo",
      "args": ["mcp"]
    }
  }
}

Tools

Each tool returns one text block holding the JSON document the CLI prints for the same call.

ToolArgumentsSame as
checkoptional root, config, rule, allspirolo check <root> --format json
explainquery (a finding id or a rule name); optional root, configspirolo explain <query> <root> --format json
impactfiles (changed paths); optional rootspirolo impact <files...> --root <root> --format json
listoptional rootspirolo list <root> --format json
rule_statusnonespirolo rule-status --format json

root defaults to the server's working directory. Changed paths are relative to it. check applies the baseline and the default view, like the CLI, and each finding carries rule_status. Findings that would fail a CLI gate still return a successful result.

Behaviour

  • Each call builds a fresh graph, so later calls see your edits.
  • The server reads files and existing reports. It does not run tests or spawn commands.
  • Analysis errors, such as a missing project or an unknown finding id, come back as a result with isError: true, and the server stays up. Protocol errors use the standard JSON-RPC codes.
  • Supported protocol versions: 2024-11-05, 2025-03-26 and 2025-06-18.

Agents that prefer a shell can use --agent on any command: tab-separated rows with no decoration.

On this page