by vpursuit
Access SWI-Prolog for secure logic programming, ladder logic, and PLC coding. Ideal for education, puzzles, and AI logic
Provides secure access to SWI-Prolog logic programming environment through an MCP server with sandboxed execution and dynamic knowledge base management.
SWI-Prolog is a community-built MCP server published by vpursuit that provides AI assistants with tools and capabilities via the Model Context Protocol. Access SWI-Prolog for secure logic programming, ladder logic, and PLC coding. Ideal for education, puzzles, and AI logic It is categorized under ai ml, developer tools.
You can install SWI-Prolog in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
BSD-3-Clause
SWI-Prolog is released under the BSD-3-Clause license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
Strong directory entry: SWI-Prolog surfaces stars and publisher context so we could sanity-check maintenance before adopting.
Useful MCP listing: SWI-Prolog is the kind of server we cite when onboarding engineers to host + tool permissions.
SWI-Prolog has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
Strong directory entry: SWI-Prolog surfaces stars and publisher context so we could sanity-check maintenance before adopting.
SWI-Prolog is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
SWI-Prolog is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
SWI-Prolog is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
We wired SWI-Prolog into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
We evaluated SWI-Prolog against two servers with overlapping tools; this profile had the clearer scope statement.
We evaluated SWI-Prolog against two servers with overlapping tools; this profile had the clearer scope statement.
showing 1-10 of 34
This monorepo contains Model Context Protocol (MCP) packages and products that enable AI assistants to work with SWI-Prolog, filesystems, and extensible plugin systems.
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.
@vpursuit/swipl-mcp-servernpx @vpursuit/swipl-mcp-serverFeatures:
call_nth/2) and engine (true backtracking)This repository follows a products/plugins architecture:
products/): Published packages that end-users install (e.g., @vpursuit/swipl-mcp-server)plugins/): Internal, reusable components bundled within products (not published separately)The MCP server is built with a modular plugin architecture. These plugins are internal dependencies bundled into the main product:
| Plugin | Description | Location |
|---|---|---|
@vpursuit/mcp-server-core | Plugin system foundation | plugins/server/core |
@vpursuit/mcp-server-prolog | SWI-Prolog integration | plugins/server/prolog |
@vpursuit/mcp-server-roots | Filesystem roots discovery | plugins/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.
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]);
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:
package.json with independent versioningREADME.md with complete documentationLICENSE (BSD-3-Clause)# 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
# 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
Each package supports:
npm run build - TypeScript compilationnpm run clean - Remove build artifactsnpm test - Run Vitest testsnpm run test:watch - Watch mode for testsWe welcome contributions! Please see CONTRIBUTING.md for:
For security issues, see SECURITY.md.
Only products are published to npm under the @vpursuit scope:
@vpursuit/swipl-mcp-server) are published to npm for end usersv<version> (e.g., v3.0.0)All packages implement security best practices:
Supply Chain Security:
See SECURITY.md for complete security documentation and reporting.
All packages in this monorepo are licensed under BSD-3-Clause.
See LICENSE file for details.
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.
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.