Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
제작자가 쓴 설명(영어 원문)
SWI-Prolog as a logic calculator for LLMs
이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.
이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.
쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.
필요한 것
어떤 앱을 쓰세요?
위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.
Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요
{
"mcpServers": {
"prolog-reasoner": {
"command": "uvx",
"args": [
"prolog-reasoner"
]
}
}
}터미널에서 이 명령어를 실행하세요
claude mcp add prolog-reasoner -- uvx prolog-reasoner프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요
{
"mcpServers": {
"prolog-reasoner": {
"command": "uvx",
"args": [
"prolog-reasoner"
]
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
프로젝트의 .vscode/mcp.json에 붙여 넣으세요
{
"servers": {
"prolog-reasoner": {
"type": "stdio",
"command": "uvx",
"args": [
"prolog-reasoner"
]
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.
선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.
이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.
내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.
누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 7일 점검
레지스트리 이름이 GitHub 계정 rikarazome 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요
내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요
내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요
레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.
해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.
레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.
내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).
GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(0.2.1)은 7개월 전 레지스트리에 올라왔어요.
Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Python (uv)도 있어야 해요.
같은 카테고리에는: Spec Driven Development, Remote Desktop Commander, OpenTakeoff
같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.
카드 보는 법:★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Construction takeoff for AI agents: load plans, set scale, measure, count, export with provenance.
제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.
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.
On the built-in 30-problem logic benchmark:
| Pipeline | Accuracy |
|---|---|
LLM-only (claude-sonnet-4-6) | 22/30 (73.3%) |
| LLM + prolog-reasoner | 27/30 (90.0%) |
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.
LLMs pattern-match; Prolog actually searches and solves. When the LLM writes its problem down as Prolog, two things happen at once:
execute_prolog for arbitrary SWI-Prolog execution, plus list_rule_bases / get_rule_base / save_rule_base / delete_rule_base for reusable named rule bases (v14)execute_prolog so the LLM only writes the situation-specific facts per call# MCP server only (no LLM dependencies)
pip install prolog-reasoner
pip install prolog-reasoner[openai]
pip install prolog-reasoner[anthropic]
pip install prolog-reasoner[all]
The MCP server exposes five tools — execute_prolog 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.
{
"mcpServers": { "prolog-reasoner": { "command": "uvx", "args": ["prolog-reasoner"] } } }
Or, if prolog-reasoner is installed directly:
{
"mcpServers": { "prolog-reasoner": { "command": "prolog-reasoner" } } }
Use Docker if you don't want to install SWI-Prolog locally:
docker build -f docker/Dockerfile -t prolog-reasoner .
{
"mcpServers": { "prolog-reasoner": { "command": "docker", "args": ["run", "-i", "--rm", "prolog-reasoner"] } } }
`execute_prolog(prolog_code, query, rule_bases=None, max_results=100, trace=False)`
prolog_code — Prolog facts and rules (string)query — Prolog query to run, e.g. "mortal(X)" (string)rule_bases — optional list of saved rule base names to prepend to prolog_code (in order). Use this to reuse stable domain rules across calls without re-sending themmax_results — cap the number of solutions returned (default 100)trace — when True, attach a structured proof tree per solution to metadata.proof_trace. Opt-in sub-feature; has performance overhead and does not support CLP(FD), higher-order predicates, or assert/retract.Returns a JSON object with success, output, query, error, and metadata.
On success, metadata includes execution_time_ms, result_count, truncated, and rule_bases_used. When rule bases were requested, rule_base_load_ms is also attached (disk I/O timing). On failure, metadata also includes error_category (one of syntax_error, undefined_predicate, unbound_variable, type_error, domain_error, evaluation_error, permission_error, timeout, trace_mechanism_error, unknown) and error_explanation — a natural-language hint for the connected LLM (or human) to decide how to fix the Prolog code.
Rule base tools — manage named, reusable Prolog modules under PROLOG_REASONER_RULES_DIR (defaults to ~/.prolog-reasoner/rules/). Names are restricted to [a-z0-9_-], length 1–64.
RULEBASE_003. Returns {"success": true, "name": ..., "created": bool} where created is true on first write, false on overwrite. Files over max_rule_size are rejected with RULEBASE_005.name, description, and tags. Metadata is extracted from leading % description: / % tags: comments in each file.For name/size/existence errors, the tools return {"success": false, "error": "...", "error_code": "RULEBASE_001"|"RULEBASE_002"|"RULEBASE_003"|"RULEBASE_005"} rather than raising. I/O failures (RULEBASE_004) are propagated as infrastructure errors.
Rule base conventions — start each rule base file with leading comments that double as list_rule_bases metadata:
% description: Chess piece movement rules
% tags: chess, games
piece_move(knight, (X1,Y1), (X2,Y2)) :- ...
Then reference from execute_prolog:
{
"rule_bases": ["chess_moves"], "prolog_code": "position(knight, (4,4)).", "query": "piece_move(knight, (4,4), Target)" }
Rule bases also serve as the foundation for domain-specialized forks: ship a curated set (legal axioms, game rules, tax scenarios, etc.) bundled via BUNDLED_RULES_DIR as a ready-to-use reasoning package.
The library exposes PrologExecutor (Prolog-only, no LLM) and PrologReasoner (NL→Prolog pipeline, needs an LLM API key).
import asyncio
from prolog_reasoner.config import Settings from prolog_reasoner.executor import PrologExecutor
async def main(): settings = Settings() # no API key needed executor = PrologExecutor(settings) result = await executor.execute( prolog_code="human(socrates). mortal(X) :- human(X).", query="mortal(X)", ) print(result.output) # mortal(socrates)
asyncio.run(main())
import asyncio
from prolog_reasoner import PrologReasoner, TranslationRequest, ExecutionRequest from prolog_reasoner.config import Settings from prolog_reasoner.executor import PrologExecutor from prolog_reasoner.translator import PrologTranslator from prolog_reasoner.llm_client import LLMClient
async def main(): settings = Settings(llm_api_key="sk-...") # from env or explicit llm = LLMClient( provider=settings.llm_provider, api_key=settings.llm_api_key, model=settings.llm_model, timeout_seconds=settings.llm_timeout_seconds, ) reasoner = PrologReasoner( translator=PrologTranslator(llm, settings), executor=PrologExecutor(settings), ) translation = await reasoner.translate( TranslationRequest(query="Socrates is human. All humans are mortal. Is Socrates mortal?") ) print(translation.prolog_code) result = await reasoner.execute( ExecutionRequest(prolog_code=translation.prolog_code, query=translation.suggested_query) ) print(result.output)
asyncio.run(main())
All settings via environment variables (prefix PROLOG_REASONER_):
| Variable | Default | Required for |
|---|---|---|
LLM_PROVIDER | openai | library (openai or anthropic) |
LLM_API_KEY | "" | library only — leave unset for MCP |
LLM_MODEL | gpt-5.4-mini | library |
LLM_TEMPERATURE | 0.0 | library |
LLM_TIMEOUT_SECONDS | 30.0 | library |
SWIPL_PATH | swipl | both |
EXECUTION_TIMEOUT_SECONDS | 10.0 | both |
RULES_DIR | ~/.prolog-reasoner/rules | both (where user-saved rule bases live) |
BUNDLED_RULES_DIR | unset | both (optional — synced into RULES_DIR on first startup for shipping default rules with a fork) |
MAX_RULE_SIZE | 1048576 (1 MiB) | both (per-file save cap; save_rule_base rejects larger content with RULEBASE_005) |
MAX_RULE_PROMPT_BYTES | 65536 (64 KiB) | library only (total budget for the "Available rule bases" prompt section; truncated with a marker when exceeded) |
LOG_LEVEL | INFO | both |
benchmarks/ contains 30 logic problems across 5 categories (deduction, transitive, constraint, contradiction, multi-step) to compare LLM-only reasoning vs LLM+Prolog reasoning. The benchmark exercises the library path (translator + executor), since it requires the NL→Prolog step.
Measured on anthropic/claude-sonnet-4-6, single run over 30 problems:
| Pipeline | Accuracy | Avg latency |
|---|---|---|
| LLM-only | 22/30 (73.3%) | 1.7s |
| LLM + Prolog | 27/30 (90.0%) | 3.8s |
Per-category breakdown:
| Category | LLM-only | LLM + Prolog |
|---|---|---|
| deduction | 6/6 | 6/6 |
| transitive | 6/6 | 5/6 |
| constraint | 3/7 | 6/7 |
| contradiction | 4/4 | 3/4 |
| multi-step | 3/7 | 7/7 |
The gap is concentrated in constraint (SEND+MORE, 6-queens, knapsack, K4 coloring, Einstein-lite) and multi-step (Nim game theory, 3-person knights-and-knaves, TSP-4, zebra puzzle) — exactly the combinatorial/search-heavy territory where symbolic solvers outperform pattern completion. On purely deductive or transitive questions the LLM is already strong and Prolog adds latency without accuracy gains.
All 3 LLM+Prolog failures were Prolog execution errors from malformed LLM-generated code (missing predicate definitions, unbound CLP(FD) variables) rather than reasoning errors — addressable via prompt tuning. Notably, every failure is inspectable: you can see the exact Prolog that failed and why, rather than a wrong natural-language answer with no explanation.
docker run --rm -e PROLOG_REASONER_LLM_API_KEY=sk-... \
prolog-reasoner-dev python benchmarks/run_benchmark.py
Results are saved to benchmarks/results.json.
Several Prolog MCP servers exist, each with different design choices. prolog-reasoner is intentionally stateless and spot
앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요