MCP-Logic
MCP-Logic
Prover9とMace4を使用した自動一階述語論理推論のためのMCPサーバーです。
機能
定理証明 - Prover9を使用して論理的命題を証明
モデル探索 - Mace4を使用して有限モデルを探索
反例探索 - 命題が成立しない理由を提示
構文検証 - 有用なエラーメッセージで数式を事前検証
圏論的推論 - 圏論の証明を組み込みでサポート
命題の偶然性 - 高速な命題チェックのための純粋な分析的HCCプルーバー
アブダクション推論 - 変分自由エネルギー(VFE)を使用して仮説をランク付け
自己完結型 - すべての依存関係が自動的にインストールされます
Related MCP server: warrant-mcp
クイックスタート
インストール
Linux/macOS:
git clone https://github.com/angrysky56/mcp-logic
cd mcp-logic
./linux-setup-script.shWindows:
git clone https://github.com/angrysky56/mcp-logic
cd mcp-logic
windows-setup-mcp-logic.batセットアップスクリプトは自動的に以下を行います:
LADR (Prover9 + Mace4) のダウンロードとビルド
Python仮想環境の作成
すべての依存関係のインストール
Claude Desktop設定の生成
Claude Desktopとの統合
Claude DesktopのMCP設定(claude-app-config.jsonに自動生成されます)に追加してください:
{
"mcpServers": {
"mcp-logic": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/mcp-logic/src/mcp_logic",
"run",
"mcp_logic",
"--prover-path",
"/absolute/path/to/mcp-logic/ladr/bin"
]
}
}
}重要: /absolute/path/to/mcp-logic を実際のリポジトリパスに置き換えてください。
利用可能なツール
ツール | 目的 |
prove | Prover9を使用して命題を証明する |
check-well-formed | 詳細なエラーとともに数式の構文を検証する |
find_model | 前提を満たす有限モデルを探索する |
find_counterexample | 命題が成立しないことを示す反例を探索する |
verify_commutativity | 圏論的図式の可換性を示すFOLを生成する |
get_category_axioms | 圏/関手/群/モノイドの公理を取得する |
check_contingency | HCCプルーバーを介して真理関数的な偶然性をチェックする |
abductive_explain | 観測に対するVFE最小化説明を探索する |
使用例
定理の証明
Use the mcp-logic prove tool with:
premises: ["all x (man(x) -> mortal(x))", "man(socrates)"]
conclusion: "mortal(socrates)"結果: ✓ 定理証明完了
命題の偶然性の分析
Use the mcp-logic check_contingency tool with:
formula: "(p -> q) | (q -> p)"結果: 数式が偶然ではないトートロジーであることを特定し、証明トレースを返します。
反例の探索
Use the mcp-logic find-counterexample tool with:
premises: ["P(a)"]
conclusion: "P(b)"結果: P(a) は真だが P(b) は偽であるモデルが見つかり、結論が導かれないことが証明されました。
圏論的図式の検証
Use the mcp-logic verify-commutativity tool with:
path_a: ["f", "g"]
path_b: ["h"]
object_start: "A"
object_end: "C"結果: f∘g = h であることを証明するためのFOL前提と結論。
ローカルでの実行
Claude Desktopを使わずに、サーバーを直接実行する場合:
Linux/macOS:
./run_mcp_logic.shWindows:
run_mcp_logic.batプロジェクト構造
mcp-logic/
├── src/mcp_logic/
│ ├── server.py # Main MCP server (8 tools)
│ ├── mace4_wrapper.py # Mace4 model finder
│ ├── syntax_validator.py # Formula syntax validation
│ ├── categorical_helpers.py # Category theory utilities
│ ├── hcc_prover.py # Hypersequent Contingency Calculus prover
│ ├── vfe_engine.py # Variational Free Energy abductive engine
│ └── formula_ast.py # Propositional logic AST and parser
├── ladr/ # Auto-installed Prover9/Mace4 binaries
│ └── bin/
│ ├── prover9
│ └── mace4
├── tests/ # Test suite
├── linux-setup-script.sh # Linux/macOS setup
├── windows-setup-mcp-logic.bat # Windows setup
├── run_mcp_logic.sh # Linux/macOS run script
└── run_mcp_logic.bat # Windows run scriptv0.3.0の新機能
認知アーキテクチャの強化:
✅ ハイパーシーケント偶然性計算 (HCC): 総当たりモデル探索を行わずに、命題論理式の偶然性を即座に評価するための厳密な演繹チェッカーを追加しました。
✅ 変分自由エネルギー (VFE) エンジン: オッカムの剃刀をエレガントに満たすために、Cournot-Gaifman事前分布を使用して仮説をランク付けするアブダクション推論を実装しました。
✅ スマートプルーバールーティング:
proveツールは、純粋な命題クエリをHCCエンジンに、一階述語論理クエリをProver9に自動的にルーティングします。✅ 設定可能なモデル探索:
find_modelおよびfind_counterexampleが、カスタムタイムアウトと構造化された述語/関数抽出をサポートするようになりました。
v0.2.0の新機能
強化された機能:
✅ Mace4によるモデル探索と反例検出
✅ 位置指定エラーによる詳細な構文検証
✅ 圏論的推論のサポート(圏論の公理、可換性の検証)
✅ すべてのツールからの構造化されたJSON出力
✅ 自己完結型のインストール(手動パス設定不要)
開発
テストの実行:
source .venv/bin/activate
pytest tests/ -vコンポーネントの直接テスト:
python tests/test_enhancements.pyドキュメント
ENHANCEMENTS.md- v0.2.0機能のクイックリファレンスDocuments/- 詳細な分析と例walkthrough.md- 実装の詳細(アーティファクト内)
トラブルシューティング
「Prover9 not found」エラー:
セットアップスクリプトを実行してください:
./linux-setup-script.shまたはwindows-setup-mcp-logic.batladr/bin/prover9とladr/bin/mace4が存在することを確認してください
サーバーが更新されない:
コード変更後にサーバーを再起動してください
ログで構文エラーを確認してください
構文検証の警告:
述語/関数には小文字を使用してください(例:
Man(x)ではなくman(x))明確にするために演算子の周りにスペースを追加してください
すべての括弧の対応を確認してください
ライセンス
MIT
クレジット
Prover9/Mace4: William McCune氏のLADRライブラリ
LADRリポジトリ: laitep/ladr
ハイパーシーケント偶然性計算 (HCC): Eugenio Orlandelli, Giannandrea Pulcini, Achille C. Varzi (2024) による「A Hypersequent Calculus for Classical Contingencies」の論理フレームワークに基づく。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server for the Pyke logic programming engine that enables LLMs to perform logical reasoning using knowledge bases with facts, rules, and queries. It supports session management, forward chaining inference, and bulk loading of programs in Logic-LLM format.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides formal reasoning and argument validation tools for AI agents based on established computational argumentation theories. It enables structured argument analysis, defeasible reasoning, and dialogue management using frameworks like Dung, Toulmin, and Walton's schemes.
- AlicenseAqualityDmaintenanceMCP server that gives small LLMs verified symbolic-math & logic tools.62Apache 2.0
- AlicenseAqualityCmaintenanceAn MCP server for first-order logic theorem proving supporting multiple provers like Vampire, E, and Prover9, with built-in simple prover, session management, and TPTP export.131MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that integrates with Discord to provide AI-powered features.
Appeared in Searches
- A server for finding information about Chinese metaphysics and mysticism
- Comparison of Python-based tools for converting TeX to Lean
- Tools for Converting LaTeX Mathematics to Lean Formalizations
- Recommended helper server for automating TeX to Lean conversions in GRAD-5 repository
- Tools and Systems for Math, AI, and Proof Verification with Bug Detection and Auto Fixing
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/angrysky56/mcp-logic'
If you have feedback or need assistance with the MCP directory API, please join our Discord server