MCP.Market

Prolog Reasoner MCP server

by rikarazome·io.github.rikarazome/prolog-reasoner·v0.2.1·11 stars

SWI-Prolog as a logic calculator for LLMs

B82/100grade B
What users say
No reviews yet
Be the first
Safety scan
B82/100

full report

Adoption
New

11 stars

Reviews

Write one

Nobody has reviewed Prolog Reasoner yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Prolog Reasoner tools (5, 2 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • delete_rule_basewrite action

    Delete a saved rule base by name.

  • execute_prologwrite action

    Execute Prolog code and return reasoning results.

  • get_rule_base

    Retrieve the Prolog source of a saved rule base.

  • list_rule_bases

    List all saved rule bases with description and tags.

  • save_rule_base

    Save a named rule base containing Prolog rules that can be reused across ``execute_prolog`` calls.

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • Code scan14 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 149 days ago8/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 82/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Prolog Reasoner compares

Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
82/100
higher than 63% of 48,255 servers
Tools
5
the typical server has 7
Tools that change things
40%
typical: 0%. Fewer write tools means less an agent can break
GitHub stars
11
more than 88% of 28,688 servers

What its tools let an agent do: 2 read · 1 create · 1 delete · 1 run or deploy

Install Prolog Reasoner in Claude Code, Cursor or VS Code

claude mcp add prolog-reasoner -- uvx prolog-reasoner
Add to Cursor

What the publisher says

From the Prolog Reasoner repository's README, as published. We do not edit it. Read it on GitHub

<!-- mcp-name: io.github.rikarazome/prolog-reasoner -->

prolog-reasoner

SWI-Prolog as a "logic calculator" for LLMs — available as an MCP server and a Python library. Eliminate the black box from LLM logical reasoning.

LLMs excel at natural language but struggle with formal logic. Prolog excels at logical reasoning but can't process natural language. prolog-reasoner bridges this gap by exposing SWI-Prolog execution to LLMs.

Does it help?

On the built-in 30-problem logic benchmark:

The gap concentrates in constraint satisfaction and multi-step reasoning — the combinatorial territory LLMs are weak on and Prolog is strong on. Full breakdown below.

Why it works

LLMs pattern-match; Prolog actually searches and solves. When the LLM writes its problem down as Prolog, two things happen at once:

  • Prolog handles the combinatorial work LLMs are weak on — constraint satisfaction, multi-step inference, exhaustive search.
  • The reasoning exists as code you can read, re-run, and debug. When it goes wrong, you see the exact Prolog that failed and why.

Two ways to use it

  • MCP server — Claude (or any MCP client) calls it as a logic solver during conversation. Rule bases let the LLM save stable domain rules once and reference them by name per call.
  • Python library — full NL→Prolog pipeline with self-correction. Requires OpenAI or Anthropic.

Features

  • MCP tools: executeprolog for arbitrary SWI-Prolog execution, plus listrulebases / getrulebase / saverulebase / deleterule_base for reusable named rule bases (v14)
  • Rule bases: save stable Prolog rules once (e.g. chess move rules, legal axioms) and reference them by name from execute_prolog so the LLM only writes the situation-specific facts per call
  • Transparent intermediate representation: the Prolog code is the audit trail — inspect, modify, or verify before execution
  • CLP(FD) support: constraint logic programming for scheduling and optimization
  • Negation-as-failure, recursion, all standard SWI-Prolog features
  • Library mode: NL→Prolog translation with self-correction loop (OpenAI / Anthropic)

Requirements

  • Python ≥ 3.10
  • SWI-Prolog installed and on PATH (≥ 9.0)
  • API key for OpenAI or Anthropic — only for library mode, not for the MCP server

Installation

# MCP server only (no LLM dependencies)
pip install prolog-reasoner

# Library with OpenAI
pip install prolog-reasoner[openai]

# Library with Anthropic
pip install prolog-reasoner[anthropic]

# Both providers
pip install prolog-reasoner[all]

MCP Server Setup

The MCP server exposes five tools — executeprolog runs Prolog code written by the connected LLM, and four rule-base tools manage named, reusable Prolog modules. It does not** call any external LLM API, so no API key is required.

Claude Desktop / Claude Code

{
  "mcpServers": {
    "prolog-reasoner": {
      "command": "uvx",
      "args": ["prolog-reasoner"]
    }
  }
}

Or, if prolog-reasoner is installed directly:

{
  "mcpServers": {
    "prolog-reasoner": {
      "command": "prolog-reasoner"
    }
  }
}

Docker (SWI-Prolog bundled)

Use Docker if you don't want to install SWI-Prolog locally:

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Prolog Reasoner: common questions

Is Prolog Reasoner MCP server safe?
Mostly: it is graded B (82/100). Read the Prolog Reasoner safety report
How do I install Prolog Reasoner?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Prolog Reasoner need an API key?
Not as far as the registry entry and our scan can tell: no credentials are declared or required.
Is Prolog Reasoner maintained?
The last commit was 187 days ago (2026-05-01). The latest release is v0.2.1.
How does Prolog Reasoner compare with other MCP servers?
safety score 82/100 (higher than 63% of 48,255 servers); tools 5 (the typical server has 7); tools that change things 40% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.