
sysprog21/frama-c-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
AIエージェントFrama-Cを与えるMCPサーバー:EVA、WP、サンドボックス付きACSLの反復
概要
AIエージェントのFrama-Cを与えるMCPサーバー:EVA抽象解釈、WP誘導証拠、ACSLアノテーション注射、およびアノテーションを試みるための隔離されたサンドボックス。 サーバは、人ではなく、エージェントによって運転されるように設計されています。 MCP クライアントはそれをスプーンし、それを stdio 上で話します。そのため、人間がタイプするコマンドはありません。 それは反復的なループの周りに構築されています:注釈を提案し、それを証明し、目標が閉じていない理由を読んで、その後、修正します。 セッション状態は、シェル使用ではなく、そのループから続くものです。1つのプロジェクトは呼び出しにロードされるため、サンドボックスは名前によってアドレスが付けられ、プルーフレシートは実行中のみ比較されます。 Claudeコード、Claudeデスクトップ、または任意のMCPクライアントにそれをワイヤーで縛り、その後、英語でプロンプトします。 エージェントとプロンプトのパターンを接続するを参照してください。 CI のチェックサブコマンドが存在し、手作業で実行する唯一の部分です.
概要(AI 翻訳)
AIエージェントを付与するMCPサーバー Frama-C: EVA抽象解釈、WP導電 証拠、ACSLのアノテーションの注入および試すアノテーションのための隔離されたサンドボックス お問い合わせ
サーバは、人ではなく、エージェントによって運転されるように設計されています。 MCPとは クライアントはそれをスプーンし、stdio上でそれを話すので、人間のためのコマンドはありません タイプに。 反復ループの周りに構築されています。アノテーションを提案し、それを証明します。 目標が閉じていない理由を読んで、その後、修正します。 セッションの状態は、 1つのプロジェクトが渡るとどまるので貝の使用からではなくループ 呼び出し、サンドボックスは名前によってアドレスをとり、証拠のレシートは内部だけを比較します 実行します。
クロード コード、クロード デスクトップ、または任意の MCP クライアントにそれをワイヤーで縛って下さい、それからプロンプトで
日本語 English エージェントを接続する
プロンプトパターン。 A check CI のサブコマンドが存在し、
手で実行する唯一の部分。
アーキテクチャ
サーバには2つの必須コンポーネントがあります。
- Rust MCPサーバー:MCP stdio上のツールを公開し、リクエストを変換する Frama-C のサーバプロトコル、および lazily は、Frama-C のメインプロセスを開始します。 最初のプロジェクト操作。
- [
ast-utilsFrama-C プラグイン: AST アクセスのカスタムリクエストを提供します,
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
frama-c-mcp
An MCP server that gives an AI agent Frama-C: EVA abstract interpretation, WP deductive proof, ACSL annotation injection, and isolated sandboxes for trying annotations out.
The server is designed to be driven by an agent rather than by a person. An MCP client spawns it and speaks to it over stdio, so there is no command for a human to type. It is built around an iterative loop: propose an annotation, prove it, read why the goal did not close, then revise. The session state follows from that loop rather than from shell use, since one project stays loaded across calls, sandboxes are addressed by name, and proof receipts compare only within a run.
Wire it into Claude Code, Claude Desktop, or any MCP client, then prompt in
English. See Connect an agent and
Prompt patterns. A check subcommand exists for CI and is
the only part intended to be run by hand.
Architecture
┌──────────┐ MCP over stdio ┌────────────────┐ Unix socket ┌─────────────────┐
│ AI agent │◄─────────────────►│ frama-c-mcp │◄─────────────►│ Frama-C main │
└──────────┘ │ Rust server │ │ + ast-utils │
└───────┬────────┘ └─────────────────┘
│ Unix socket per sandbox
▼
┌──────────────────┐
│ Frama-C sandbox │
│ + ast-utils │
│ per experiment │
└──────────────────┘
The server has two required components:
- Rust MCP server: exposes the tools over MCP stdio, translates requests into Frama-C’s server protocol, and lazily starts the main Frama-C process on the first project operation.
ast-utilsFrama-C plugin: provides the custom requests for AST access, dependency extraction, ACSL injection, sandboxing, and WP configuration. Build and install it in the same opam switch as Frama-C.
create_sandbox extracts a function together with its type, callee, and global
dependencies into a temporary C file, then starts a separate Frama-C process.
An agent can iterate on annotations there without mutating the main project;
verified sandbox annotations are merged back explicitly.
Session model
The server holds one project: reload_project or the first check loads it,
and later calls operate on that AST. Sandboxes are separate processes,
addressed as experiment_id:function.
The preprocessor surface is nostdinc, include_paths, isystem_paths,
defines, force_includes, and machdep, applied in that order. Each value is
written without its compiler flag. nostdinc drops the preprocessor’s default
system directories and isystem_paths are searched after include_paths; pair
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"frama-c": {
"command": "/path/to/frama-c-mcp",
"args": ["--frama-c", "/path/to/frama-c"]
}
}
}