
AtpMcp
io.github.jcschuster由 GitHub 帳號 jcschuster 發布v0.8.1更新於 Oct 29, 2026
Theorem provers for agents: SystemOnTPTP, StarExec, Isabelle and local ATPs, with SZS verdicts.
概覽
把 SystemOnTPTP、StarExec、Isabelle 與本機證明器四個後端包成工具,讓助理提交 TPTP 問題並讀取 SZS 判定結果。
- 可以做什麼
- 列出並探測各後端,向任一後端提交 TPTP 問題並取得 SZS 判定
- 列出 SystemOnTPTP 上的證明器、執行單一證明器,或在同一問題上並行比較多個
- 把手寫的 Isabelle/HOL 理論提交到已設定的 Isabelle 伺服器
- 對 TPTP 問題做語法與型別檢查,可本機執行或經 TPTP4X
- 查詢 SZS 本體詞彙表,解釋判定結果的意義
- 適用情境
- 適合需要機器驗證推理的情況:證明或反駁 TPTP 問題、比較不同證明器、檢查 Isabelle 理論,或用遠端服務複核本機證明器的結果。
- 執行需求
- 以 stdio 在本機執行,且只支援 MCP 修訂版 2026-07-28,需要 initialize 交握的舊用戶端會被拒絕。最簡便的是 Docker 映像(內含 Erlang 與 E 證明器);也可安裝 Elixir escript,需要 Elixir 1.20/OTP 29,並在 PATH 中提供 eprover 或 isabelle。可選設定檔 atp_mcp.exs;StarExec 需要 base_url、使用者名稱與密碼;Isabelle 需要數 GB 記憶體。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 AtpMcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AtpMcp
An MCP server that exposes AtpClient's four theorem-prover backends — SystemOnTPTP, StarExec, Isabelle, and LocalExec — as tools for Claude Code and other MCP hosts.
Speaks MCP revision 2026-07-28 over stdio (JSON-RPC 2.0), and only that
revision: clients that need the initialize handshake (2025-11-25 and
earlier) are rejected.
Quick start with Docker
The image bundles the server, Erlang, and the E prover, so the only
prerequisite is Docker. Add the server to your project's .mcp.json:
That gives you SystemOnTPTP (every prover on tptp.org) and a local E
(query_backend with backend: "local_exec") with no configuration.
For Isabelle as well, use the latest-isabelle tag (amd64, a few GB; the
container needs a few GB of RAM for the HOL session). The server starts
Isabelle itself on the first Isabelle call, which takes up to a minute;
later calls in the same session reuse it.
To configure the server, mount your project at /work, where it looks for
atp_mcp.exs, and forward the environment variables
the file reads:
For Claude Code, also approve the server in .claude/settings.json:
To build the images yourself:
Installing the escript
Without Docker, install the escript (Elixir 1.20 / OTP 29):
and use "command": "atp_mcp" in .mcp.json. Local backends then use
whatever is on your PATH: eprover for local_exec, isabelle for the
Isabelle backend.
Configuration
The escript does not read your project's config/*.exs. It reads one
config file at startup, the first of:
atp_mcp --config PATH;- the
ATP_MCP_CONFIGenvironment variable; atp_mcp.exsin the working directory — for an MCP host, the project root (/workin the container).
The file is ordinary Elixir Config, evaluated at startup, so read
secrets from the environment rather than writing them into it:
Without any configuration:
-
SystemOnTPTP uses tptp.org and the latest
E. -
LocalExec runs
eprover --auto --tstp-format --cpu-limit=30ifeproveris onPATH. -
Isabelle starts a resident server named
atp_mcpon a free port ifisabelleis onPATH, or reuses one that is already running. Outside a container that server outlives the MCP process, so later sessions skip the startup cost. Stop it withisabelle server -n atp_mcp -x. To use a server you run yourself, configure it instead:and set
config :atp_mcp, isabelle_autostart: falseto rule out a local one. -
StarExec has no defaults; it needs
base_url,username, andpassword.
See the AtpClient docs for every setting.
Checking the setup
atp_mcp doctor prints, for each backend, the settings it resolved to and
whether it is reachable. Run it the way your MCP host runs the server:
Name backends to check only those (atp_mcp doctor sotptp local_exec). It
exits with status 1 if any check fails, and passwords are shown only as set
or unset.
Tools
Cross-backend (unified AtpClient.Backend)
list_backends
Lists every backend the server exposes (sotptp, isabelle, local_exec,
starexec) with its human-readable label.
describe_szs
Returns a text reference for the
SZS Ontology — the vocabulary every prover verdict
is reported in. Lists every Success status (Theorem, Unsatisfiable,
Satisfiable, CounterSatisfiable, ContradictoryAxioms, …) and NoSuccess
status (GaveUp, Timeout, ResourceOut, MemoryOut, Forced,
InputError, …) with its mnemonic and definition, so an agent can decide
what a verdict means without leaving the MCP session. Generated from
Tptp.Szs.Ontology, the table verdicts are read against. Takes no
arguments.
verify_backend
Probes a backend's configuration and reachability. Returns OK or a
descriptive error.
Backend-specific override keys (base_url, password, binary, …) are
forwarded through to the backend's verify/1.
query_backend
Submits a TPTP-format problem to any backend through the unified
c:AtpClient.Backend.query/2 entry point and returns an SZS Ontology
verdict (Theorem, Unsatisfiable, Satisfiable, CounterSatisfiable,
GaveUp, Timeout, ResourceOut, …). Call describe_szs for the full
vocabulary.
Per-backend overrides are passed through (e.g. binary for local_exec,
timeout_ms for isabelle, base_url for starexec, and system — the
SystemOnTPTP name of the prover behind a local_exec binary or a starexec
solver, for reading its output).
SystemOnTPTP
list_provers
Lists every theorem prover system available on SystemOnTPTP.
run_prover
Submits a TPTP problem to a specific prover and returns its SZS status.
compare_provers
Runs the same problem against multiple provers simultaneously and returns all results side by side, one row per requested system in the order given. A bare name shows the version it ran:
Isabelle
prove_isabelle
Submits a hand-written Isabelle/HOL theory to a configured Isabelle
server. The theory text is written into the configured shared directory and
processed via use_theories. For TPTP/THF problems, use query_backend
with backend: "isabelle" instead — that routes through prove_tptp.
Session, host, port, and password come from configuration only.
Diagnostics
lint_problem
Runs syntax and type diagnostics on a TPTP problem. By default combines the
in-process tptp linter (Tptp.analyze/2)
with TPTP4X on SystemOnTPTP; pass backends: ["local"] for the cheap pass
only. TPTP4X is skipped when the local pass already found an error. Each
finding is reported as line:column [severity] (source) message [code],
with the linter's hint where it gives one, followed by the declared symbols
and their types:
Example
Once the MCP server is active, you can ask Claude Code things like:
"Which provers on SystemOnTPTP can prove this TPTP problem? Compare Vampire, E, and Satallax."
Claude will call compare_provers directly and report the SZS results.
"Run this problem against my local E build, then sanity-check it on SystemOnTPTP."
Claude will call query_backend twice — once with backend: "local_exec",
once with backend: "sotptp" — and compare the verdicts.
Agent skill
skills/atp-mcp/SKILL.md is an
Agent Skill that teaches an agent to use these
tools: the TPTP dialects and which provers accept them, a lint-then-prove
workflow, and what each SZS verdict lets it conclude. It also lists tasks
where a prover helps, such as autoformalisation, checking proofs, and
finding counterexamples, so agents reach for the tools unprompted. To use
it with Claude Code, copy the directory into .claude/skills/ in your
project or ~/.claude/skills/.
Cancellation and progress
Long-running tool calls run inside their own Task. The MCP host can:
-
Send
notifications/cancelledwith the in-flight request id to abort a call. EachAtpClientbackend tears down its upstream work on caller death:- LocalExec SIGKILLs the prover binary via
Portclosure. - StarExec issues
DELETEagainst the remote job. - Isabelle drops the session, which aborts the in-flight
use_theoriestask on the server. - SystemOnTPTP closes the local connection, but the remote prover
runs to its
:time_limit_sec— SOTPTP has no remote-cancel endpoint.
- LocalExec SIGKILLs the prover binary via
-
Set
_meta.progressTokenontools/callto receive periodicnotifications/progressframes while the call is in flight. The heartbeat fires every five seconds by default; override via:
Forward note: MCP Tasks extension
MCP Tasks (call now, fetch later through a task handle) fit ATP
workflows almost exactly. Revision 2026-07-28 moved them out of the core
protocol into the official extension io.modelcontextprotocol/tasks. Once
MCP hosts support the extension, the long-running tools here should return
tasks, which would also make a StarExec-style submit_job / await_job
pair natural.
License
MIT.
來源:README.md,提交 11f2c34
工具
0版本歷史
1- v0.8.1最新Oct 29, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分