|
| 1 | +<!-- SPDX-License-Identifier: PMPL-1.0-or-later --> |
| 2 | +<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> --> |
| 3 | + |
1 | 4 | # echidna-mcp |
2 | 5 |
|
3 | 6 | Model Context Protocol server that exposes [ECHIDNA](https://github.com/hyperpolymath/echidna)'s |
@@ -80,6 +83,38 @@ Prove a theorem from a file using one of ECHIDNA's 105 backends. |
80 | 83 | | `.dfg` | SPASS | |
81 | 84 | | `.mm` | Metamath | |
82 | 85 |
|
| 86 | +### `check_prover` |
| 87 | + |
| 88 | +Check whether a named prover backend is installed and reachable on the current system. |
| 89 | + |
| 90 | +| Parameter | Type | Required | Description | |
| 91 | +|-----------|------|----------|-------------| |
| 92 | +| `prover` | string | yes | Prover backend name (case-sensitive). Examples: `Z3`, `Lean`, `Coq`, `Vampire`. | |
| 93 | + |
| 94 | +**Returns** a JSON object: |
| 95 | +```json |
| 96 | +{ |
| 97 | + "available": true, |
| 98 | + "message": "Z3 is available" |
| 99 | +} |
| 100 | +``` |
| 101 | + |
| 102 | +### `list_provers` |
| 103 | + |
| 104 | +List all 105 prover backends supported by ECHIDNA. Takes no parameters. |
| 105 | + |
| 106 | +**Returns** a JSON object: |
| 107 | +```json |
| 108 | +{ |
| 109 | + "total": 105, |
| 110 | + "provers": { |
| 111 | + "Z3": "SMT solver (Microsoft Research)", |
| 112 | + "Lean": "Lean 4 interactive proof assistant", |
| 113 | + "...": "..." |
| 114 | + } |
| 115 | +} |
| 116 | +``` |
| 117 | + |
83 | 118 | ## Example JSON-RPC exchanges |
84 | 119 |
|
85 | 120 | ### Prove a trivial SMT goal with Z3 |
@@ -122,31 +157,44 @@ Response: |
122 | 157 | } |
123 | 158 | ``` |
124 | 159 |
|
125 | | -### Auto-detect prover from extension |
| 160 | +### Check that Z3 is installed |
126 | 161 |
|
| 162 | +Request: |
127 | 163 | ```json |
128 | 164 | { |
129 | 165 | "jsonrpc": "2.0", |
130 | 166 | "id": 2, |
131 | 167 | "method": "tools/call", |
132 | 168 | "params": { |
133 | | - "name": "prove", |
| 169 | + "name": "check_prover", |
134 | 170 | "arguments": { |
135 | | - "file": "/workspace/lemmas/associativity.v" |
| 171 | + "prover": "Z3" |
136 | 172 | } |
137 | 173 | } |
138 | 174 | } |
139 | 175 | ``` |
140 | 176 |
|
141 | | -ECHIDNA detects `.v` → Coq and routes accordingly. |
| 177 | +Response: |
| 178 | +```json |
| 179 | +{ |
| 180 | + "jsonrpc": "2.0", |
| 181 | + "id": 2, |
| 182 | + "result": { |
| 183 | + "content": [{ |
| 184 | + "type": "text", |
| 185 | + "text": "{\n \"available\": true,\n \"message\": \"Z3 is available\"\n}" |
| 186 | + }] |
| 187 | + } |
| 188 | +} |
| 189 | +``` |
142 | 190 |
|
143 | 191 | ## Troubleshooting |
144 | 192 |
|
145 | 193 | **`Failed to invoke echidna: No such file or directory`** |
146 | 194 | : The `echidna` binary is not on PATH. Either install it or set `ECHIDNA_BIN=/full/path/echidna` in the MCP server env config. |
147 | 195 |
|
148 | 196 | **`verified: false` with empty `message`** |
149 | | -: The prover binary itself is missing. Confirm the target prover is installed: `which z3`, `which coqc`, etc. The `echidna check-prover <Name>` command also reports availability. |
| 197 | +: The prover binary itself is missing. Confirm the target prover is installed: `which z3`, `which coqc`, etc. The `check_prover` tool also reports availability. |
150 | 198 |
|
151 | 199 | **Timeout / `verified: false` with partial output** |
152 | 200 | : Increase `timeout_secs`. Complex goals in interactive provers (Isabelle, Coq) may need 60–600 s. Default is 300 s. |
|
0 commit comments