# SWI-Prolog

> Use this tool when you need to leverage Prolog logic programming for AI reasoning, knowledge representation, and logic puzzle solving, with a secure and controlled environment that prevents dangerous system calls and file operations. It provides a dual query mode interface, accepting Prolog queries and returning step-by-step solutions or enabling true backtracking control. Ideal for educational use cases, AI workflows, and tasks that benefit from declarative programming with safety controls.

Canonical page: https://skillsregistry.net/skills/vpursuit-swipl  
JSON: https://api.skillsregistry.net/v1/skills/vpursuit-swipl

## Description

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.

## Trust

- **Trust score (0–1):** 0.61
- **Verification tier:** scanned
- **Last scanned:** 2026-09-02

## Facts

- **Version:** 1.0.0
- **Skill type:** atomic
- **Execution layer:** mcp-remote
- **Runtime environment:** api
- **Category:** productivity
- **Updated:** 2026-09-02

## Source

- **Source listing:** [PulseMCP](https://www.pulsemcp.com/servers/vpursuit-swipl)
- **Repository:** <https://github.com/vpursuit/model-context-lab>

## Use it

Resolve this record through the SkillsRegistry MCP server (no auth, read-only):

```
claude mcp add --transport http --scope user skillsregistry https://api.skillsregistry.net/mcp
```

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_skill",
    "arguments": {
      "slug": "vpursuit-swipl"
    }
  }
}
```

REST: `GET https://api.skillsregistry.net/v1/skills/vpursuit-swipl` · pull for local use: `GET https://api.skillsregistry.net/v1/skills/vpursuit-swipl/pull`

---
SkillsRegistry indexes agent skills from public registries and GitHub. Skills we have analysed are scanned with Circle-IR and scored on six dimensions; each listing states its scan coverage. More: https://skillsregistry.net/llms.txt
