{"id":25077537,"url":"https://github.com/angrysky56/mcp-logic","last_synced_at":"2025-10-19T06:06:30.974Z","repository":{"id":272365275,"uuid":"916351339","full_name":"angrysky56/mcp-logic","owner":"angrysky56","description":"Fully functional AI Logic Calculator utilizing Prover9/Mace4 via Python based Model Context Protocol (MCP-Server)- tool for Windows Claude App etc","archived":false,"fork":false,"pushed_at":"2025-04-19T08:18:48.000Z","size":73,"stargazers_count":21,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T17:24:05.251Z","etag":null,"topics":["ai","claude-3-5-sonnet","llm","logic","mcp-server","server","tool"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/angrysky56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-13T23:34:09.000Z","updated_at":"2025-04-30T18:41:56.000Z","dependencies_parsed_at":"2025-04-19T08:33:13.163Z","dependency_job_id":"e98bb0a3-8e88-4190-81bf-1fd07eeae80d","html_url":"https://github.com/angrysky56/mcp-logic","commit_stats":null,"previous_names":["angrysky56/mcp-logic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/angrysky56/mcp-logic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fmcp-logic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fmcp-logic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fmcp-logic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fmcp-logic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/angrysky56","download_url":"https://codeload.github.com/angrysky56/mcp-logic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/angrysky56%2Fmcp-logic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260927232,"owners_count":23083982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","claude-3-5-sonnet","llm","logic","mcp-server","server","tool"],"created_at":"2025-02-07T02:34:52.811Z","updated_at":"2025-10-19T06:06:25.941Z","avatar_url":"https://github.com/angrysky56.png","language":"Shell","funding_links":[],"categories":["📚 Projects (1974 total)","Scientific Research Tools","🤖 AI/ML"],"sub_categories":["MCP Servers"],"readme":"# MCP-Logic\n\nAn MCP server providing automated reasoning capabilities using Prover9/Mace4 for AI systems. This server enables logical theorem proving and logical model verification through a clean MCP interface.\n\n## Design Philosophy\n\nMCP-Logic bridges the gap between AI systems and formal logic by providing a robust interface to Prover9/Mace4. What makes it special:\n\n- **AI-First Design**: Built specifically for AI systems to perform automated reasoning\n- **Knowledge Validation**: Enables formal verification of knowledge representations and logical implications\n- **Clean Integration**: Seamless integration with the Model Context Protocol (MCP) ecosystem\n- **Deep Reasoning**: Support for complex logical proofs with nested quantifiers and multiple premises\n- **Real-World Applications**: Particularly useful for validating AI knowledge models and reasoning chains\n\n## Features\n\n- Seamless integration with Prover9 for automated theorem proving\n- Support for complex logical formulas and proofs\n- Built-in syntax validation\n- Clean MCP server interface\n- Extensive error handling and logging\n- Support for knowledge representation and reasoning about AI systems\n\n## Quick Example\n\n![image](https://github.com/user-attachments/assets/42756e3d-c2fa-475f-8e8a-25f7e444b2a4)\n\n```python\n# Prove that understanding + context leads to application\nresult = await prove(\n    premises=[\n        \"all x all y (understands(x,y) -\u003e can_explain(x,y))\",\n        \"all x all y (can_explain(x,y) -\u003e knows(x,y))\",\n        \"all x all y (knows(x,y) -\u003e believes(x,y))\",\n        \"all x all y (believes(x,y) -\u003e can_reason_about(x,y))\",\n        \"all x all y (can_reason_about(x,y) \u0026 knows_context(x,y) -\u003e can_apply(x,y))\",\n        \"understands(system,domain)\",\n        \"knows_context(system,domain)\"\n    ],\n    conclusion=\"can_apply(system,domain)\"\n)\n# Returns successful proof!\n```\n\n![image](https://github.com/user-attachments/assets/61cecc1f-9ba1-4586-a6a2-83823088f763)\n\n## Installation\n\n### Prerequisites\n\n- Python 3.10+\n- UV package manager\n- Git for cloning the repository\n- CMake and build tools (for building LADR/Prover9)\n\n### Setup\n\nClone this repository\n\n```bash\ngit clone https://github.com/angrysky56/mcp-logic\ncd mcp-logic\n```\n\nRun the setup script:\nWindows run:\n\n```bash\nwindows-setup-mcp-logic.bat\n```\n\nLinux/macOS:\n\n```bash\nchmod +x linux-setup-script.sh\n./linux-setup-script.sh\n```\n\nThe setup script:\n\n- Checks for dependencies (git, cmake, build tools)\n- Downloads LADR (Prover9/Mace4) from the external repository: [laitep/LADR](https://github.com/laitep/ladr.git)\n- Builds the LADR library to create Prover9 binaries in the ladr/bin directory\n- Creates a Python virtual environment\n- Sets up configuration files for running with or without Docker\n\nIMPORTANT: The LADR directory is not included in the repository itself and will be installed through the setup script or manually.\n\n### Using Docker- no idea if this is working right, mainly designed for direct use with Claude Desktop\n\nIf you prefer to run with Docker this script:\n\n- Finds an available port\n- Activates the virtual environment\n- Runs the server with the correct paths to the installed Prover9\n\n```bash\n# Linux/macOS\n./run-mcp-logic.sh\n```\n\n```bash\n# Windows\nrun-mcp-logic.bat\n```\n\nThese scripts will build and run a Docker container with the necessary environment.\n\n### Claude Desktop Integration\n\nTo use MCP-Logic with Claude Desktop, use this configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-logic\": {\n      \"command\": \"uv\",\n      \"args\": [\n        \"--directory\", \n        \"/path/to/mcp-logic/src/mcp_logic\",\n        \"run\", \n        \"mcp_logic\", \n        \"--prover-path\", \n        \"/path/to/mcp-logic/ladr/bin\"\n      ]\n    }\n  }\n}\n```\n\nReplace \"/path/to/mcp-logic\" with your actual repository path.\n\n## Available Tools\n\n![image](https://github.com/user-attachments/assets/a78ba32a-c0a8-4e44-9429-b2c9af57129d)\n\n### prove\n\nRun logical proofs using Prover9:\n\n```json\n{\n  \"tool\": \"prove\",\n  \"arguments\": {\n    \"premises\": [\n      \"all x (man(x) -\u003e mortal(x))\",\n      \"man(socrates)\"\n    ],\n    \"conclusion\": \"mortal(socrates)\"\n  }\n}\n```\n\n### check-well-formed\n\nValidate logical statement syntax:\n\n```json\n{\n  \"tool\": \"check-well-formed\",\n  \"arguments\": {\n    \"statements\": [\n      \"all x (man(x) -\u003e mortal(x))\",\n      \"man(socrates)\"\n    ]\n  }\n}\n```\n\n## Documentation\n\nSee the [Documents](./Documents) folder for detailed analysis and examples:\n\n- [Knowledge to Application](./Documents/KnowledgeToApplication.md): A formal logical analysis of understanding and practical application in AI systems\n\n## Project Structure\n\n```markdown\nmcp-logic/\n├── src/\n│   └── mcp_logic/\n│       └── server.py   # Main MCP server implementation\n├── tests/\n│   ├── test_proofs.py  # Core functionality tests\n│   └── test_debug.py   # Debug utilities\n├── Documents/          # Analysis and documentation\n├── pyproject.toml      # Python package config\n├── setup-script.sh     # Setup script (installs LADR \u0026 dependencies)\n├── run-mcp-logic.sh    # Docker-based run script (Linux/macOS)\n├── run-mcp-logic.bat   # Docker-based run script (Windows)\n├── run-mcp-logic-local.sh # Local run script (no Docker)\n└── README.md           # This file\n```\n\nNote: After running setup-script.sh, a \"ladr\" directory will be created containing the Prover9 binaries, but this directory is not included in the repository itself.\n\n## Development\n\nRun tests:\n\n```bash\nuv pip install pytest\nuv run pytest\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangrysky56%2Fmcp-logic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangrysky56%2Fmcp-logic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangrysky56%2Fmcp-logic/lists"}