mcp-server

v4.17.3
@cognium-ai/mcp-server Checked 4 days ago Published 1 month ago

Deprecated 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.

ParameterTypeDescription
path *stringAbsolute path to a file or directory to scan.
categoriesarrayFilter findings to these ISO-25010 categories.
crossFileBudgetMsintegerWall-time cap for the cross-file phase in ms. 0 = unlimited.
disabledPassesarraycircle-ir rule_ids to disable, e.g. ["naming-convention", "todo-in-prod"].
forceRefreshbooleanSkip the cache and re-analyze from disk.
languagestringRestrict analysis to a single language.
severityarrayFilter 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.

ParameterTypeDescription
finding_id *stringThe `id` field of a SastFinding returned by `scan`.
project_root *stringAbsolute 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.

ParameterTypeDescription
project_root *stringAbsolute path to the project root.
max_pathsintegerCap on returned paths. Defaults to 50.
sink_filestringOnly paths whose sink is in this file.
sink_typestringOnly paths with this sink type (e.g. "sql_injection", "command_injection").
source_filestringOnly 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?"

ParameterTypeDescription
project_root *stringAbsolute path to the project root.
languagestringRestrict 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.

ParameterTypeDescription
function_qualified_name *stringFully-qualified function name to check, e.g. "org.owasp.esapi.Encoder.encodeForHTML" or "DOMPurify.sanitize".
sink_type *stringSink category to check against, e.g. "xss", "sql_injection", "command_injection".
languagestringLanguage 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.

ParameterTypeDescription
sink_type *stringSink category, e.g. "sql_injection", "command_injection", "xss", "path_traversal".
languagestringRestrict 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?"

ParameterTypeDescription
source_type *stringSource category, e.g. "http_param", "http_header", "http_body", "http_cookie", "db_result", "env", "file".
languagestringRestrict 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?"

ParameterTypeDescription
project_root *stringAbsolute 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.

ParameterTypeDescription
project_root *stringAbsolute path to the project root.
languagestringRestrict to one language.
min_confidencenumberMinimum flow confidence to include (0.0 - 1.0). Defaults to include all.
sink_typestringRestrict 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.

ParameterTypeDescription
finding_id *stringAnchor finding id (from `scan` output). Similar findings are relative to this one.
project_root *stringAbsolute path to the project root.
match_bystringSimilarity axis: `rule_and_sink` (default) matches rule_id + taint sink_type, `rule` matches rule_id only, `sink` matches sink_type only.
max_resultsintegerCap 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…

ParameterTypeDescription
project_root *stringAbsolute path to the project root.
languagestringRestrict the search to one language.
limitintegerCap on returned answers (default 200). Truncation is reported.
siteobjectA call site, when you have a line of code rather than a name.
symbolstringFully-qualified name, e.g. `com.acme.users.User.equals`. A constructor is `com.acme.users.User.<init>`. Give this or `site`, not both.
tiersarrayReturn 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…

ParameterTypeDescription
project_root *stringAbsolute path to the project root.
languagestringRestrict the search to one language.
limitintegerCap on returned answers (default 200). Truncation is reported.
siteobjectA call site, when you have a line of code rather than a name.
symbolstringFully-qualified name, e.g. `com.acme.users.User.equals`. A constructor is `com.acme.users.User.<init>`. Give this or `site`, not both.
tiersarrayReturn 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.

ParameterTypeDescription
project_rootstringAbsolute path to the project root to invalidate. If omitted, every cached project is cleared.