sysprog21/frama-c-mcp
MCP server that gives AI agents Frama-C: EVA, WP, and sandboxed ACSL iteration
4b935a01b2d2frama-c-mcp0.1.0 in Cargo.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 22 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- MEDIUM2 production dependencies have known vulnerabilities (worst: medium).
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Update its vulnerable packages
Use
rustix1.1.6 or later. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 17 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
check, create_sandbox, delete_sandbox, get_wp_goals, parse_surface, reload_project and 3 moreanalyze_concurrency, check, context, create_sandbox, delete_sandbox, get_wp_goals and 11 morecheck, context, create_sandbox, get_wp_goals, inject_all_annotations, list and 4 morecheck, context, create_sandbox, delete_sandbox, get_wp_goals, inject_all_annotations and 9 moreNo tool was seen to: read passwords, tokens or keys; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files17 tools · analyze_concurrency, check, context +14
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (17: 17 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
analyze_concurrencytool Build a source-grounded Concurrent Event IR and conservative race and lock-order candidates. Level-0 syntactic screening only: candidates are not proofs, and anFilesoutside text
Build a source-grounded Concurrent Event IR and conservative race and lock-order candidates. Level-0 syntactic screening only: candidates are not proofs, and an absent candidate is not a proof either.
checktool Check a C file or inline C source by reloading if needed, running RTE/EVA/WP, and returning alarms, goals, and the recommended next MCP call.ProcessesFilesNetworkEnv varsoutside text
Check a C file or inline C source by reloading if needed, running RTE/EVA/WP, and returning alarms, goals, and the recommended next MCP call.
contexttool Fetch function, property, and navigation context blocks. want can include function_ast, cil_context, contract_context, logic_deps, property_context, rte_obligatFilesNetworkEnv varsoutside text
Fetch function, property, and navigation context blocks. want can include function_ast, cil_context, contract_context, logic_deps, property_context, rte_obligations, current_annotations, write_effects, loop_effects, messages, source, symbol, marker_at, eva_value, callgraph, callers, and call_chain. Function blocks accept a bare main function name or a sandbox name like exp42:foo; messages needs no function and returns Frama-C's warnings since the last drain. source returns the annotated C text of a whole project, using function only to pick which one, and is the single want that writes: passing output writes the source to that path instead of returning it, and the path must stay inside the working directory. symbol looks an identifier up by name; marker_at looks up whatever is at {file, line, column?}; eva_value reads EVA's range at a marker, taking marker and an optional callstack; callgraph is whole-program; callers needs EVA to have run, so check {want: ["eva"]} first; call_chain walks the syntactic graph with direction, max_depth, and stop_at.create_sandboxtool Create a sandbox Frama-C instance for one function and its dependencies. \ProcessesFilesNetworkEnv varsoutside text
Create a sandbox Frama-C instance for one function and its dependencies. \
Pass experiment_id for a stable sandbox name; omitted IDs are generated and collisions are rejected. \
This is how an annotation is tried without touching the real source: the sandbox holds its own \
copy of the function and its dependencies, so a loop invariant that makes WP diverge costs a \
respawn rather than the session, and a strengthening that does not work leaves no edit to revert. \
Copying the source tree by hand does the same thing worse: the copy is not addressable by name, \
nothing reloads it, and the goals it produces cannot be diffed against the main project.delete_sandboxtool Delete a sandbox function. Idempotent: succeeds even if not found.ProcessesFilesEnv varsoutside text
Delete a sandbox function. Idempotent: succeeds even if not found.
get_wp_goalstool Read what the analyses concluded, from the one property table they all share. want can include goals (the default: WP proof goals, filtered by function and statProcessesFilesNetworkEnv varsoutside text
Read what the analyses concluded, from the one property table they all share. want can include goals (the default: WP proof goals, filtered by function and status, or diffed against an earlier run with since), alarms (EVA alarms, filtered by function, alarm_kind, or status), counts (property counts by category plus EVA and WP state), vc (the verification condition for one function, as a sequent, needs function), and investigation (one property joined to its value ranges, its callers, and the annotations on its function, needs marker and takes depth). A lone want answers bare; several answer under their own names.
inject_all_annotationstool Inject or dry-run ACSL annotations and ghost code, given as one tagged `annotations` array. \FilesNetworkEnv varsoutside text
Inject or dry-run ACSL annotations and ghost code, given as one tagged `annotations` array. \
Clause kinds are global, behavior, requires, ensures, assigns, assert, loop, complete_behaviors, disjoint_behaviors, terminates, exits, decreases. \
Ghost kinds carry their own fields on the entry: ghost_global {name, type?, expr?}, ghost_formal {name, type?, where?}, \
ghost_lemma_function {name, param, param_type?, requires, decreases, assigns, ensures}, \
ghost_loop {stmt, name, type?, init?, stop, step?, invariant, assigns, variant, assert?}, ghost_stmt {stmt, op, name, type?, expr}. \
Ghost entries are applied before clause entries, since a ghost formal changes the signature a requires refers to, and the clause plan is skipped if any ghost fails. \
Pass function as a bare name \
for main or exp42:foo for a sandbox; sandbox callers may pass sandbox_name instead. For ghost_global and ghost_lemma_function, which belong to a project rather than a function, function only selects main or which sandbox. \
For main injection, optional sandbox_name compares extracted annotations after merge. \
dry_run=true validates and reports per-clause diagnostics without mutating the AST; ghost entries are checked for their kind's fields and a resolvable target, not inserted, and clauses are then validated against an AST that does not carry them. \
Returns {status, successful, failures, ghosts?, summary} or {status, dry_run, clauses, failures, ghosts?, ghosts_not_applied?, summary}.listtool List loaded project entities, sandboxes, or conclusion summaries by kind.FilesNetworkEnv varsoutside text
List loaded project entities, sandboxes, or conclusion summaries by kind.
parse_surfacetool Report which C sources parse under Frama-C and what stops the rest, grouped by cause and ranked by how many files each blocks. \ProcessesFilesEnv varsoutside text
Report which C sources parse under Frama-C and what stops the rest, grouped by cause and ranked by how many files each blocks. \
This measures the parse surface; it cannot widen it. A header_not_found is either a header of this project missing from include_paths or a system header Frama-C's libc does not model, and a locally written declaration answers the first by not being needed and the second not at all, while an undeclared_name is what a stub header can honestly supply. The report says which cause each file hit.proof_coveragetool Report proof coverage from stored conclusions. Without verify_profile, defined functions in the loaded project are the denominator. With verify_profile, its decFilesoutside text
Report proof coverage from stored conclusions. Without verify_profile, defined functions in the loaded project are the denominator. With verify_profile, its declared functions are the denominator and only conclusions recorded for that same target count as covered. Goal counts are deduplicated by receipt; summary lists functions needing attention, full lists all functions.
propose_annotationstool Propose the annotations the code determines, and name the ones it does not. \FilesNetworkEnv varsoutside text
Propose the annotations the code determines, and name the ones it does not. \
Frame conditions are read off the AST: the locations a loop body writes are a fact, and \
WP rejects any assigns clause that disagrees with them. Predicates are not: a loop \
invariant relating an accumulator to what it accumulates is nowhere in the code, so it \
is reported under not_proposed rather than guessed at. Returns {function, proposals, \
not_proposed, how_to_apply}; feed proposals to inject_all_annotations with dry_run first.reload_projecttool Reload C source files, reparse the AST, and refresh cached project state. \ProcessesFilesNetworkEnv varsoutside text
Reload C source files, reparse the AST, and refresh cached project state. \
Existing EVA/WP results are invalidated. Set rte=true to restart Frama-C with generated runtime-error annotations.run_e_acsltool Compile the loaded project with E-ACSL instrumentation, run the produced executable with optional args, and return runtime counterexample output. \ProcessesFilesEnv varsoutside text
Compile the loaded project with E-ACSL instrumentation, run the produced executable with optional args, and return runtime counterexample output. \
This EXECUTES the code under analysis with your privileges; do not call it on source you do not trust.run_wptool Run WP deductive verification. Bare function names target the main \ProcessesFilesNetworkEnv varsoutside text
Run WP deductive verification. Bare function names target the main \
Frama-C instance; sandbox-prefixed names like exp42:foo target that sandbox. \
If functions is omitted, verifies all annotated functions on the main instance. \
RTE obligations are generated in place when the project was not loaded with rte.self_checktool Run environment, capability, and Frama-C request compatibility checks before verification. canary=true additionally proves the backend can still tell a known buProcessesFilesNetworkEnv varsoutside text
Run environment, capability, and Frama-C request compatibility checks before verification. canary=true additionally proves the backend can still tell a known bug from its fix, in a separate Frama-C process that does not touch the loaded project.
store_function_conclusiontool Store or update the verification conclusion for a function. \FilesEnv varsoutside text
Store or update the verification conclusion for a function. \
Supports incremental updates: fields set to null preserve previous values. \
Stores only status, notes, committed specs, WP summary, proof receipt, and direct callees. \
Evidence for a verified status is the proof_receipt of a check whose incomplete[] came \
back empty, or more usefully its proof_receipt_sha256. A direct receipt is checked only \
for internal consistency; its public hash does not authenticate that this server issued \
it. The digest form resolves bytes this server stored, so echoing one back by hand is \
both large and fragile. Pass one or the other. A \
run_wp receipt is refused, because the soundness gates run in check and run_wp records \
no verdict: an invented callee contract, a skipped function or annotation, an unsound \
encoding and a failed smoke test are all invisible to it.verify_program_steptool Run one whole-program verification step: load guidance when needed, suggest EVA/WP/status checks before scheduling, then ensure verification order, persist projFilesEnv varsoutside text
Run one whole-program verification step: load guidance when needed, suggest EVA/WP/status checks before scheduling, then ensure verification order, persist project state, lock the main project by default, list conclusions, compute ready functions, and return the next function action.
Text the model reads (17)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
run_e_acsl tool
Compile the loaded project with E-ACSL instrumentation, run the produced executable with optional args, and return runtime counterexample output. \\
This EXECUTES the code under analysis with your privileges; do not call it on source you do not trust.check tool
Check a C file or inline C source by reloading if needed, running RTE/EVA/WP, and returning alarms, goals, and the recommended next MCP call.
run_wp tool
Run WP deductive verification. Bare function names target the main \\
Frama-C instance; sandbox-prefixed names like exp42:foo target that sandbox. \\
If functions is omitted, verifies all annotated functions on the main instance. \\
RTE obligations are generated in place when the project was not loaded with rte.get_wp_goals tool
Read what the analyses concluded, from the one property table they all share. want can include goals (the default: WP proof goals, filtered by function and status, or diffed against an earlier run with since), alarms (EVA alarms, filtered by function, alarm_kind, or status), counts (property counts by category plus EVA and WP state), vc (the verification condition for one function, as a sequent, needs function), and investigation (one property joined to its value ranges, its callers, and the annotations on its function, needs marker and takes depth). A lone want answers bare; several answer under their own names.
verify_program_step tool
Run one whole-program verification step: load guidance when needed, suggest EVA/WP/status checks before scheduling, then ensure verification order, persist project state, lock the main project by default, list conclusions, compute ready functions, and return the next function action.
propose_annotations tool
Propose the annotations the code determines, and name the ones it does not. \\
Frame conditions are read off the AST: the locations a loop body writes are a fact, and \\
WP rejects any assigns clause that disagrees with them. Predicates are not: a loop \\
invariant relating an accumulator to what it accumulates is nowhere in the code, so it \\
is reported under not_proposed rather than guessed at. Returns {function, proposals, \\
not_proposed, how_to_apply}; feed proposals to inject_all_annotations with dry_run first.context tool
Fetch function, property, and navigation context blocks. want can include function_ast, cil_context, contract_context, logic_deps, property_context, rte_obligations, current_annotations, write_effects, loop_effects, messages, source, symbol, marker_at, eva_value, callgraph, callers, and call_chain. Function blocks accept a bare main function name or a sandbox name like exp42:foo; messages needs no function and returns Frama-C's warnings since the last drain. source returns the annotated C text of a whole project, using function only to pick which one, and is the single want that writes: passing output writes the source to that path instead of returning it, and the path must stay inside the working directory. symbol looks an identifier up by name; marker_at looks up whatever is at {file, line, column?}; eva_value reads EVA's range at a marker, taking marker and an optional callstack; callgraph is whole-program; callers needs EVA to have run, so check {want: ["eva"]} first; call_chain walks the syntactic graph with direction, max_depth, and stop_at.inject_all_annotations tool
Inject or dry-run ACSL annotations and ghost code, given as one tagged `annotations` array. \\
Clause kinds are global, behavior, requires, ensures, assigns, assert, loop, complete_behaviors, disjoint_behaviors, terminates, exits, decreases. \\
Ghost kinds carry their own fields on the entry: ghost_global {name, type?, expr?}, ghost_formal {name, type?, where?}, \\
ghost_lemma_function {name, param, param_type?, requires, decreases, assigns, ensures}, \\
ghost_loop {stmt, name, type?, init?, stop, step?, invariant, assigns, variant, assert?}, ghost_stmt {stmt, op, name, type?, expr}. \\
Ghost entries are applied before clause entries, since a ghost formal changes the signature a requires refers to, and the clause plan is skipped if any ghost fails. \\
Pass function as a bare name \\
for main or exp42:foo for a sandbox; sandbox callers may pass sandbox_name instead. For ghost_global and ghost_lemma_function, which belong to a project rather than a function, function only selects main or which sandbox. \\
For main injection, optional sandbox_name compares extracted annotations after merge. \\
dry_run=true validates and reports per-clause diagnostics without mutating the AST; ghost entries are checked for their kind's fields and a resolvable target, not inserted, and clauses are then validated against an AST that does not carry them. \\
Returns {status, successful, failures, ghosts?, summary} or {status, dry_run, clauses, failures, ghosts?, ghosts_not_applied?, summary}.store_function_conclusion tool
Store or update the verification conclusion for a function. \\
Supports incremental updates: fields set to null preserve previous values. \\
Stores only status, notes, committed specs, WP summary, proof receipt, and direct callees. \\
Evidence for a verified status is the proof_receipt of a check whose incomplete[] came \\
back empty, or more usefully its proof_receipt_sha256. A direct receipt is checked only \\
for internal consistency; its public hash does not authenticate that this server issued \\
it. The digest form resolves bytes this server stored, so echoing one back by hand is \\
both large and fragile. Pass one or the other. A \\
run_wp receipt is refused, because the soundness gates run in check and run_wp records \\
no verdict: an invented callee contract, a skipped function or annotation, an unsound \\
encoding and a failed smoke test are all invisible to it.analyze_concurrency tool
Build a source-grounded Concurrent Event IR and conservative race and lock-order candidates. Level-0 syntactic screening only: candidates are not proofs, and an absent candidate is not a proof either.
proof_coverage tool
Report proof coverage from stored conclusions. Without verify_profile, defined functions in the loaded project are the denominator. With verify_profile, its declared functions are the denominator and only conclusions recorded for that same target count as covered. Goal counts are deduplicated by receipt; summary lists functions needing attention, full lists all functions.
self_check tool
Run environment, capability, and Frama-C request compatibility checks before verification. canary=true additionally proves the backend can still tell a known bug from its fix, in a separate Frama-C process that does not touch the loaded project.
reload_project tool
Reload C source files, reparse the AST, and refresh cached project state. \\
Existing EVA/WP results are invalidated. Set rte=true to restart Frama-C with generated runtime-error annotations.parse_surface tool
Report which C sources parse under Frama-C and what stops the rest, grouped by cause and ranked by how many files each blocks. \\
This measures the parse surface; it cannot widen it. A header_not_found is either a header of this project missing from include_paths or a system header Frama-C's libc does not model, and a locally written declaration answers the first by not being needed and the second not at all, while an undeclared_name is what a stub header can honestly supply. The report says which cause each file hit.list tool
List loaded project entities, sandboxes, or conclusion summaries by kind.
create_sandbox tool
Create a sandbox Frama-C instance for one function and its dependencies. \\
Pass experiment_id for a stable sandbox name; omitted IDs are generated and collisions are rejected. \\
This is how an annotation is tried without touching the real source: the sandbox holds its own \\
copy of the function and its dependencies, so a loop invariant that makes WP diverge costs a \\
respawn rather than the session, and a strengthening that does not work leaves no edit to revert. \\
Copying the source tree by hand does the same thing worse: the copy is not addressable by name, \\
nothing reloads it, and the goals it produces cannot be diffed against the main project.delete_sandbox tool
Delete a sandbox function. Idempotent: succeeds even if not found.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 17 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processes9 of 17 capabilities start processes; 8 more call code the scanner could not follow, where it may happen
- Tools that touch files17 of 17 capabilities touch files
- Tools that call the network10 of 17 capabilities call the network; 7 more call code the scanner could not follow, where it may happen
Where the code is: 17 handlers in 7 files at commit 4b935a01b2d2
src/mcp/analysis.rsrun_e_acsl, check, run_wp, get_wp_goals, verify_program_stepsrc/mcp/annotations.rspropose_annotations, context, inject_all_annotationssrc/mcp/conclusions.rsstore_function_conclusionsrc/mcp/concurrency.rsanalyze_concurrencysrc/mcp/coverage.rsproof_coveragesrc/mcp/project.rsself_check, reload_project, parse_surface, listsrc/mcp/sandbox.rscreate_sandbox, delete_sandbox
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: Cargo.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database
- Known vulnerabilities in production dependencies MEDIUM2 production packages with known advisories
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionrmcp 3.4
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 17 capabilities; 17 more call code the scanner could not follow, where it may happen
- Environment variables15 capabilities read environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (2 in production)
chronocrates.io 0.4.45 MEDIUM 1 advisory no fix yet
- MEDIUMRUSTSEC-2026-0543chrono is unmaintained
rustixcrates.io 1.1.4 MEDIUM 1 advisory 1.1.6
- MEDIUMRUSTSEC-2026-0486 GHSA-jh2m-fhpj-3vr7xattr functions mark unwritten bytes as initialized when given a zero-length buffer
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | not stated in the code the scanner read; most local servers talk over stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | rmcp 3.4 |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-11 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 1 catalog (github_search) |
|---|---|
| License | MIT |
| Created | 2026-08-19 |
| Topics | acsl formal-verification frama-c mcp-server |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.