Skip to main content
MCP server CX Codex

Euclid-MCP — Claude Code MCP server: logic and setup

The Euclid-MCP MCP server turns facts and rules into traceable conclusions with proof trees. Use it for access policies, cloud audits, and other formal rule systems.

Apache-2.0 ★ 9 updated 2026-10-15

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add euclid-mcp -- uvx euclid-mcp
Open on GitHub

What Euclid-MCP does

Euclid-MCP receives facts, rules, and queries written in Euclid-IR, then returns solutions with proof trees as structured JSON. The language covers variables, conjunctions, alternatives, negation, arithmetic comparisons, and compound queries. You can describe the rules without writing Prolog syntax.

The server translates Euclid-IR into Prolog and runs inference through a persistent SWI-Prolog process. When SWI-Prolog cannot be used, a native Python engine interprets the intermediate language. The explain, diagnose, what_if, and check_kb tools add explanations, issue analysis, scenario checks, and knowledge-base validation. A knowledge base may be loaded at startup and reused across calls.

The setup commands rely on uvx. The server can be connected to Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, or Gemini CLI.

What it helps with

  • check access rules against supplied facts
  • return a proof tree for each conclusion
  • audit decisions against their source rules
  • test alternate cases with what_if
  • validate a knowledge base before querying

Example prompts for the agent

  • Check whether alice can access this resource under the supplied facts and rules.
  • Explain the deployment decision and show the proof tree behind it.
  • Test the same query after changing the user role and compare the result.

How to install Euclid-MCP

Platform CLI

claude mcp add euclid-mcp -- uvx euclid-mcp

uvx runs the command named after the package; if the README names another one, use uvx --from euclid-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Euclid-MCP

How do I install Euclid-MCP in Claude Code?

Run claude mcp add euclid-mcp -- uvx euclid-mcp. This adds the MCP server and starts it through uvx.

What does Euclid-MCP do?

It accepts facts, rules, and queries in Euclid-IR, performs deterministic logical inference, and returns solutions with proof trees. Inference runs through SWI-Prolog or the native Python engine.

What does Euclid-MCP need to run?

The connection command uses uvx. When SWI-Prolog is available, the server uses it for inference; otherwise it can use the native Python engine.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open