mcp-server
v4.17.3Deprecated shim: forwards to @cognium/mcp-server, which now serves these tools via circle-ir-ai/mcp
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scan Scan project
Run circle-ir static analysis (polyglot SAST pipeline) on a file or directory. Returns SastFindings covering security, reliability, performance, maintainability, and architecture, plus per-file taint flows and (for directory scans) cross-file taint paths. Results are cached per project + option-set and invalidated by file mtime, so subsequent tool calls are effectively free.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to a file or directory to scan. |
categories | array | Filter findings to these ISO-25010 categories. |
crossFileBudgetMs | integer | Wall-time cap for the cross-file phase in ms. 0 = unlimited. |
disabledPasses | array | circle-ir rule_ids to disable, e.g. ["naming-convention", "todo-in-prod"]. |
forceRefresh | boolean | Skip the cache and re-analyze from disk. |
language | string | Restrict analysis to a single language. |
severity | array | Filter findings to these severity levels. |
explain_finding Explain finding
Return full context for a single SastFinding: CWE metadata (name, short/full description, remediation, CVSS-like score), source-code snippet, and — if the finding is a taint sink — the list of sanitizers that would neutralize it. Use before proposing a fix so the LLM cites authoritative rule content.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | The `id` field of a SastFinding returned by `scan`. |
project_root * | string | Absolute path to the project root that was previously scanned. |
taint_paths List cross-file taint paths
List cross-file taint flows in a previously-scanned project, filtered by source file, sink file, or sink type. Use to enumerate every attacker-reachable data flow between files. Requires that `scan` has been called on the project root.
| Parameter | Type | Description |
|---|---|---|
project_root * | string | Absolute path to the project root. |
max_paths | integer | Cap on returned paths. Defaults to 50. |
sink_file | string | Only paths whose sink is in this file. |
sink_type | string | Only paths with this sink type (e.g. "sql_injection", "command_injection"). |
source_file | string | Only paths whose source is in this file. |
list_entry_points List attacker-reachable entry points
Enumerate all entry-point methods (HTTP route handlers, middlewares, event listeners, cron/queue consumers) grouped by framework and language. Sourced from circle-ir `runtime_registrations` — the call-graph edges that framework registration establishes but the raw AST does not surface. Answers "what is the attack surface of this codebase?"
| Parameter | Type | Description |
|---|---|---|
project_root * | string | Absolute path to the project root. |
language | string | Restrict to a single language. |
check_sanitizer Check sanitizer validity
Verify that a function is a recognized sanitizer for a specific sink type in circle-ir's YAML catalog. Returns { isValidSanitizer, matchedRule, notes, alternatives } so an LLM can ground its "this input is safe because it was escaped" reasoning.
| Parameter | Type | Description |
|---|---|---|
function_qualified_name * | string | Fully-qualified function name to check, e.g. "org.owasp.esapi.Encoder.encodeForHTML" or "DOMPurify.sanitize". |
sink_type * | string | Sink category to check against, e.g. "xss", "sql_injection", "command_injection". |
language | string | Language of the function under check. When omitted, all languages are searched. |
describe_sink Describe sink category
Return canonical metadata for a taint sink category: CWE identifier, short + full description, recommended remediation, CVSS-like severity score, and the list of sanitizer functions that would neutralize the sink. Use when the LLM needs authoritative information about a vulnerability class.
| Parameter | Type | Description |
|---|---|---|
sink_type * | string | Sink category, e.g. "sql_injection", "command_injection", "xss", "path_traversal". |
language | string | Restrict sanitizer suggestions to this language. |
describe_source Describe taint source category
Return every taint-source pattern (method / class / property / annotation) that circle-ir treats as a source of the given category. Use when the LLM needs to know "which framework APIs count as an HTTP body source?" or "what constitutes an env-var source?"
| Parameter | Type | Description |
|---|---|---|
source_type * | string | Source category, e.g. "http_param", "http_header", "http_body", "http_cookie", "db_result", "env", "file". |
language | string | Restrict patterns to this language. |
attack_surface_summary Attack surface summary
Compute a security-posture roll-up for a previously-scanned project: total entry points by framework, total sinks by category, cross-file taint-path totals per sink type, and the top 10 files by finding count. Use as the entry-level tool for "what does this codebase look like from a security angle?"
| Parameter | Type | Description |
|---|---|---|
project_root * | string | Absolute path to the project root. |
list_reachable_sinks List reachable sinks (with taint flow)
List every sink of the requested category that has an actual taint flow reaching it (per-file OR cross-file). Sinks with no reaching flow are excluded — this is the crucial difference vs. plain "list all method calls named `Runtime.exec`". Use before proposing fixes so the LLM only inspects sinks that are truly reachable from attacker-controlled input.
| Parameter | Type | Description |
|---|---|---|
project_root * | string | Absolute path to the project root. |
language | string | Restrict to one language. |
min_confidence | number | Minimum flow confidence to include (0.0 - 1.0). Defaults to include all. |
sink_type | string | Restrict to this sink category (e.g. "sql_injection", "command_injection", "xss"). |
find_similar Find structurally similar findings
Given one SastFinding id, return other findings in the same project that share the same rule_id and/or taint sink type. Use after triaging a finding to catch the same vulnerability pattern elsewhere without re-scanning or re-prompting.
| Parameter | Type | Description |
|---|---|---|
finding_id * | string | Anchor finding id (from `scan` output). Similar findings are relative to this one. |
project_root * | string | Absolute path to the project root. |
match_by | string | Similarity axis: `rule_and_sink` (default) matches rule_id + taint sink_type, `rule` matches rule_id only, `sink` matches sink_type only. |
max_results | integer | Cap on returned findings. Defaults to 50. |
find_callers Find the callers of a symbol
THE QUESTION THIS ANSWERS: "who calls this method?" — call this FIRST for that question, before grepping. A text search for a method name finds the name; this finds the calls, and says which ones it is sure of. Who calls this method, with a resolution tier on every answer and a reason on every site it could not resolve. Use it before changing or deleting a method, to see what depends on it, and to judge the blast radius of a rename. Read the tiers before acting: `exact` means the receiver's static type was known and the target was unique in it — act on these. `polymorphic` means dispatch…
| Parameter | Type | Description |
|---|---|---|
project_root * | string | Absolute path to the project root. |
language | string | Restrict the search to one language. |
limit | integer | Cap on returned answers (default 200). Truncation is reported. |
site | object | A call site, when you have a line of code rather than a name. |
symbol | string | Fully-qualified name, e.g. `com.acme.users.User.equals`. A constructor is `com.acme.users.User.<init>`. Give this or `site`, not both. |
tiers | array | Return only these tiers. Omit for all three. `["exact"]` for answers you can act on. |
find_callees Find what a symbol calls
THE QUESTION THIS ANSWERS: "what does this method call?" — call this FIRST for that question, before reading the body and following names by hand. What this method calls, with a resolution tier on every answer and a reason on every call it could not resolve. Use it to understand a method before editing it, to trace what a change will touch, and to find the project-internal calls inside a body full of framework noise. Tiers and `unresolved` mean exactly what they do for `find_callers` — `exact` is actionable, `polymorphic` lists every candidate body, `inferred` is a lead and not a fact. I…
| Parameter | Type | Description |
|---|---|---|
project_root * | string | Absolute path to the project root. |
language | string | Restrict the search to one language. |
limit | integer | Cap on returned answers (default 200). Truncation is reported. |
site | object | A call site, when you have a line of code rather than a name. |
symbol | string | Fully-qualified name, e.g. `com.acme.users.User.equals`. A constructor is `com.acme.users.User.<init>`. Give this or `site`, not both. |
tiers | array | Return only these tiers. Omit for all three. `["exact"]` for answers you can act on. |
refresh Refresh analysis cache
Invalidate cached analysis for one project (when `project_root` is provided) or every cached project (when omitted). The next tool call that needs analysis will re-run `analyzeProject`. Use after a git checkout, dependency change, or when authoring / testing analyzer rules.
| Parameter | Type | Description |
|---|---|---|
project_root | string | Absolute path to the project root to invalidate. If omitted, every cached project is cleared. |