The MCP-Logic server provides automated reasoning capabilities through Prover9/Mace4 for AI systems. It enables logical theorem proving and model verification through a clean Model Context Protocol interface, allowing AI systems to perform formal validation of knowledge representations and logical implications.
Clone the repository:
git clone https://github.com/angrysky56/mcp-logic
cd mcp-logic
Run the appropriate setup script for your operating system:
For Windows:
windows-setup-mcp-logic.bat
For Linux/macOS:
chmod +x linux-setup-script.sh
./linux-setup-script.sh
These setup scripts will:
To run MCP-Logic with Docker:
# Linux/macOS
./run-mcp-logic.sh
# Windows
run-mcp-logic.bat
To use MCP-Logic with Claude Desktop, add this configuration:
{
"mcpServers": {
"mcp-logic": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-logic/src/mcp_logic",
"run",
"mcp_logic",
"--prover-path",
"/path/to/mcp-logic/ladr/bin"
]
}
}
}
Be sure to replace /path/to/mcp-logic
with your actual repository path.
The prove
tool allows you to run logical proofs using Prover9:
{
"tool": "prove",
"arguments": {
"premises": [
"all x (man(x) -> mortal(x))",
"man(socrates)"
],
"conclusion": "mortal(socrates)"
}
}
The check-well-formed
tool validates logical statement syntax:
{
"tool": "check-well-formed",
"arguments": {
"statements": [
"all x (man(x) -> mortal(x))",
"man(socrates)"
]
}
}
Here's an example of using the proving capabilities:
# Prove that understanding + context leads to application
result = await prove(
premises=[
"all x all y (understands(x,y) -> can_explain(x,y))",
"all x all y (can_explain(x,y) -> knows(x,y))",
"all x all y (knows(x,y) -> believes(x,y))",
"all x all y (believes(x,y) -> can_reason_about(x,y))",
"all x all y (can_reason_about(x,y) & knows_context(x,y) -> can_apply(x,y))",
"understands(system,domain)",
"knows_context(system,domain)"
],
conclusion="can_apply(system,domain)"
)
# Returns successful proof!
To run MCP-Logic locally without Docker:
./run-mcp-logic-local.sh
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.