SWI-Prolog MCP server with Prolog knowledge base integration

SWI-Prolog MCP server with Prolog knowledge base integration

swi-prolog•byvpursuit

A Model Context Protocol server that lets tools-enabled LLMs load Prolog files, manage facts and rules, and run queries against SWI-Prolog.

License: BSD-3-Clause•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Manages a Prolog knowledge base by loading files and asserting, retracting, and dumping facts and rules.
  • •Runs queries in two modes: standard deterministic pagination via call_nth/2 and engine mode with true backtracking.
  • •Provides expert Prolog assistance prompts such as solving logic puzzles.
  • •Applies security sandboxing, dynamic filesystem roots, and a plugin-based architecture.

BEST FOR

  • •LLMs that need to reason over or update a Prolog knowledge base.
  • •Users who want expert Prolog assistance such as solving logic puzzles.

ABOUT SWI-PROLOG

SWI-Prolog MCP server with Prolog knowledge base integration is cataloged as an MCP server attributed to vpursuit. A Model Context Protocol server that lets tools-enabled LLMs load Prolog files, manage facts and rules, and run queries against SWI-Prolog. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: BSD-3-Clause. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for SWI-Prolog MCP server with Prolog knowledge base integration are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What query modes does the SWI-Prolog MCP server support?

It supports a standard mode using call_nth/2 and an engine mode providing true backtracking.

How can the SWI-Prolog MCP server be run for end users?

End users install and start the complete MCP server package via npm.

上游原版 README

在 GitHub 查看同一版本原文

README.md · d2f516c86bc2 · 采集于 2026-11-13 08:23:41 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCP Ecosystem by vpursuit

Build Status

This monorepo contains Model Context Protocol (MCP) packages and products that enable AI assistants to work with SWI-Prolog, filesystems, and extensible plugin systems.

Products

SWI-Prolog MCP Server

Full-featured MCP server with Prolog knowledge base integration

A MCP server that lets tools-enabled LLMs work directly with SWI‑Prolog. It supports loading Prolog files, adding/removing facts and rules, listing symbols, and running queries with two modes: deterministic pagination and true engine backtracking.

Features:

  • Knowledge base management (load, assert, retract, dump)
  • Two query modes: standard (call_nth/2) and engine (true backtracking)
  • Expert Prolog assistance prompts (e.g. solving logic puzzles)
  • Comprehensive security sandboxing
  • Dynamic filesystem roots
  • Plugin-based architecture

Architecture

This repository follows a products/plugins architecture:

  • Products (products/): Published packages that end-users install (e.g., @vpursuit/swipl-mcp-server)
  • Plugins (plugins/): Internal, reusable components bundled within products (not published separately)

Internal Plugin System

The MCP server is built with a modular plugin architecture. These plugins are internal dependencies bundled into the main product:

PluginDescriptionLocation
@vpursuit/mcp-server-corePlugin system foundationplugins/server/core
@vpursuit/mcp-server-prologSWI-Prolog integrationplugins/server/prolog
@vpursuit/mcp-server-rootsFilesystem roots discoveryplugins/server/roots

Note: These plugins are marked as private in their package.json and are bundled into @vpursuit/swipl-mcp-server. They are not published separately to npm.

Plugin System for Developers

If you're developing within this monorepo, you can use the plugin system directly:

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { loadPlugins } from '@vpursuit/mcp-server-core';
import { plugin as prologPlugin } from '@vpursuit/mcp-server-prolog';
import { plugin as rootsPlugin } from '@vpursuit/mcp-server-roots';

const server = new McpServer({
  name: 'my-mcp-server',
  version: '1.0.0',
});

// Load plugins
await loadPlugins(server, [prologPlugin, rootsPlugin]);

📂 Repository Structure

This is a monorepo managed with npm workspaces. Each package can be developed, tested, and published independently.

model-context-lab/
├── products/
│   └── swipl-mcp-server/    # Main MCP server (published to npm)
├── plugins/
│   └── server/
│       ├── core/            # Plugin system foundation (internal)
│       ├── prolog/          # SWI-Prolog integration (internal)
│       └── roots/           # Filesystem roots discovery (internal)
├── docs/                    # Monorepo-level documentation
├── .archive/                # Historical strategy documents
└── package.json             # Workspace configuration

Each package has:

  • Own package.json with independent versioning
  • Own README.md with complete documentation
  • Own LICENSE (BSD-3-Clause)
  • Own test suite

🔧 Development

Prerequisites

  • Node.js ≥ 20.0.0
  • SWI-Prolog (for testing Prolog integration)
  • npm ≥ 9.0.0

Setup

# Clone repository
git clone https://github.com/vpursuit/model-context-lab.git
cd model-context-lab

# Install all dependencies
npm install

# Build all packages
npm run build

# Run all tests
npm test

Working with Packages

# Build specific package
npm run build -w plugins/server/core

# Test specific package
npm test -w plugins/server/prolog

# Clean all build artifacts
npm run clean

Package Development

Each package supports:

  • npm run build - TypeScript compilation
  • npm run clean - Remove build artifacts
  • npm test - Run Vitest tests
  • npm run test:watch - Watch mode for tests

Documentation

Product Documentation (swipl-mcp-server)

Monorepo Documentation

Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • Code of conduct
  • Development workflow
  • Testing requirements
  • Pull request process
  • Coding standards

For security issues, see SECURITY.md.

Publishing

Only products are published to npm under the @vpursuit scope:

  • Products (e.g., @vpursuit/swipl-mcp-server) are published to npm for end users
  • Plugins are internal dependencies bundled within products (not published separately)
  • Releases use semantic versioning: v<version> (e.g., v3.0.0)
  • Automated publishing via GitHub Actions
  • Supply chain security: All packages published with npm provenance attestation
  • See PUBLISHING.md for complete details

Security

All packages implement security best practices:

  • File path restrictions
  • Dangerous predicate blocking
  • Pre-execution validation
  • Timeout protection
  • Module isolation

Supply Chain Security:

  • Published with npm provenance attestation for build transparency
  • OIDC-based publishing (no long-lived tokens)
  • Cryptographically signed packages via Sigstore

See SECURITY.md for complete security documentation and reporting.

📄 License

All packages in this monorepo are licensed under BSD-3-Clause.

See LICENSE file for details.

Getting Started

For end users: Install the complete MCP server

npx @vpursuit/swipl-mcp-server

For monorepo developers: Work with the plugin system

git clone https://github.com/vpursuit/model-context-lab.git
cd model-context-lab
npm install
npm run build

For contributors: Set up the development environment

git clone https://github.com/vpursuit/model-context-lab.git
cd model-context-lab
npm install
npm run build
npm test

Questions? Open an issue or see our documentation.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for SWI-Prolog MCP server with Prolog knowledge base integration from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/swi-prolog)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools