mcp-server

v1.1.1
@cognium/mcp-server Checked 11 hours ago Published 4 hours ago

MCP server for the cognium-dev checking engine: deterministic static-analysis tools for coding agents (Claude Code, Cursor, Claude Desktop)

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.

dependency_calls List the calls into one dependency, and the tests that reach them

THE QUESTION THIS ANSWERS: "if I bump this Maven dependency, which of our calls into it are tested?" Every call site in the project that lands on the artifact, each with the tests that reach the method making it; a call is covered when a test reaches it strongly (`tests[0].class` is `strong`). `covered` is true only when every call is covered and no file failed to parse. Read `unattributedSites` too: calls into code outside the project whose receiver type is unknown or unqualified. They could be calls into this library, so "every call is covered" holds only for the calls listed, and a merge r…

ParameterTypeDescription
artifact *stringThe Maven artifact, `groupId:artifactId[:version]`, e.g. `com.fasterxml.jackson.core:jackson-databind:2.15.2`. With a version, its jar is looked up in the local Maven repository.
project_root *stringAbsolute path to the tree under test: the version after the dependency bump.
jar_pathstringAbsolute path to the resolved jar. Wins over the Maven repository.
languagestring`java` (the only language today; the default).
limitintegerCap on `calls` and on `unattributedSites`, each (default 500). Counts and `covered` are over the whole answer; truncation is reported.
maven_repo_dirstringThe local Maven repository. Default `$MAVEN_REPO_LOCAL`, else `~/.m2/repository`.

find_dead_code Find dead code

Per declaration of a Java, Python, Go or TypeScript / JavaScript project, whether an entry point reaches it (the engine's `dead-code@0.1`): `live` (a strong path), `may-be-live` (only a weak path, an unresolved site that could reach it, or a file that did not parse), or `dead`. Each fact carries the shortest strong and weak path, the unresolved sites, and `reachedByTest` with the first test that reaches it (remove or update that test with the code). Test files and type-only declarations are left out. Each fact also carries `decision` under the rule `no-inferred-edge-decides@0.1`: `unreachable…

ParameterTypeDescription
project_root *stringAbsolute path to the project root (Java, Python, Go, or TypeScript / JavaScript).
languagestringWhich graph to build: `java`, `python`, `go`, or `typescript` / `javascript` (one graph for both). Default: the only family present; a tree with more than one must say.
limitintegerMost items returned in the fact list and in `entrySet.entries`, each (default 500, max 5000). Counts are over everything; a cut list says so.
root_kindsarrayEntry kinds used as roots. Default: every kind except `test` (code only tests reach is dead product code). An empty list is refused: with no roots, nothing could be shown reachable.
verdictsarrayReturn only facts with these verdicts. Default: all three. `summary` and `decisions` always count every fact.

removal_reach Removal reach

For a change between two checked-out trees of a Java, Python, Go or TypeScript / JavaScript project, every declaration that disappeared (moves and renames are listed apart in `moved[]`), with what reached it at the base (the engine's `removal-reach@0.1`): the shortest strong path from an entry, the shortest weak path, the unresolved sites that could reach it, and move candidates that might explain it. `partial[]` lists files that did not parse at either pin. Each removed declaration carries `decision` under the rule `no-inferred-edge-decides@0.1`, read at the base: `reachable` (a strong path:…

ParameterTypeDescription
baseline_root *stringAbsolute path to the base tree (the pin before the change). Must not overlap the head.
project_root *stringAbsolute path to the head tree (the pin under test).
languagestringWhich graph to build: `java`, `python`, `go`, or `typescript` / `javascript` (one graph for both). Default: the only family present; a tree with more than one must say.
limitintegerMost items returned in the fact list and in `entrySet.entries`, each (default 500, max 5000). Counts are over everything; a cut list says so.
root_kindsarrayEntry kinds used as roots. Default: every kind except `test` (code only tests reach is dead product code). An empty list is refused: with no roots, nothing could be shown reachable.

analyze_dependencies Analyze dependencies

Known advisories in a Java project (Maven or Gradle) or an npm project: resolves each manifest to its dependency set — from a Gradle lockfile or Maven `dependency:tree` output, or a pnpm (per importer), npm or Yarn lockfile, when present, else the build file or package.json, and says which — and matches every coordinate against the OSV advisory snapshot you supply for its ecosystem (defaults: <project_root>/.cognium/advisory/osv-maven and …/osv-npm). Returns the advisory id, aliases (CVE), affected ranges and later fixed versions per match, the declared version and where it comes from, d…

ParameterTypeDescription
project_root *stringAbsolute path to the source tree at the pin under test.
advisory_dbstringAbsolute path to an OSV advisory snapshot: a directory of OSV JSON records, as `unzip Maven/all.zip` leaves it. Default: <project_root>/.cognium/advisory/osv-maven. The tool never downloads one.
advisory_dbsobjectOne snapshot directory per ecosystem.
baseline_rootstringAbsolute path to the same project at the earlier pin. Adds `delta` (advisories removed, added, persisting; dependency drift) and the baseline side's `resolution`, both under the one snapshot.
ecosystemsarrayEcosystems to match: `maven` (Maven and Gradle projects) and `npm`. Default: Maven, plus npm when the tree has npm manifests and an npm snapshot is present. An ecosystem with no manifest in the tree i…
include_devbooleanInclude test-only dependencies: Maven `test` and `provided` scopes, and Gradle coordinates found only on test configurations. Default false.
max_dependenciesintegerCap on `dependencies[]` (default 2000). Matches and the delta are never capped.
resolvedarrayResolved dependency files under non-standard names. Without them each manifest directory uses, in order: gradle.lockfile (or gradle/dependency-locks/*.lockfile), dependency-tree.txt, dependency-list.t…

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.