SWI-Prolog

Provides secure access to SWI-Prolog logic programming through dual query modes with sandboxed execution, dynamic knowledge base m

vpursuit 9 ↓ 3.2k
Claude CodeClaude DesktopGeneric
View source ↗

SWI-Prolog MCP server by Peter Trebing that provides AI assistants with secure access to Prolog logic programming through dual query modes: standard call_nth/2 for step-by-step solution retrieval and engine mode for true backtracking control. The implementation features a sandboxed execution environment with whitelisted predicates, dynamic knowledge base management (assert/retract facts and rules), file consultation with directive blocking, and unified session management that prevents mode conflicts while supporting mathematical operations, list processing, and recursive rule evaluation. Built with TypeScript and designed for educational use cases, logic puzzle solving, knowledge representation tasks, and AI reasoning workflows that benefit from Prolog's declarative programming paradigm with safety controls that block dangerous system calls and file operations.

Source

Repository: https://github.com/vpursuit/model-context-lab

Maintain SWI-Prolog?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[SWI-Prolog on getagentictools](https://getagentictools.com/mcp/vpursuit-model-context-lab?ref=badge)