Logic MCP Server

Logic MCP Server

A backend server that executes advanced logic primitives and cognitive operations through the Model Context Protocol, allowing integration with various LLM providers for reasoning, data processing, and structured thought processing.

Category
Visit Server

README

Logic MCP Server

Overview

The logic-mcp server is a backend application designed to execute advanced logic primitives and cognitive operations. It leverages the Model Context Protocol (MCP) to provide tools for reasoning, data processing, and interaction with Large Language Models (LLMs). This server forms the core engine for complex task execution and structured thought processing.

It features dynamic LLM configuration, allowing users to switch between different language models and providers (like OpenRouter, Google Gemini, etc.) via API calls or a companion web application. All operations and their relationships are traced and stored in a SQLite database, enabling history reconstruction and logic chain visualization.

This server is intended to be used in conjunction with the Logic MCP Webapp for easier management and interaction. image image image image image

Demonstration: Logic Puzzle Solving

Watch a demonstration of the Logic MCP server attempting to solve the "Passport Pandemonium" logic puzzle:

Logic MCP Solves Passport Pandemonium

Features

  • Model Context Protocol (MCP) Server: Exposes logic operations as tools.
  • Dynamic LLM Configuration:
    • Add, activate, and delete LLM provider configurations (e.g., OpenRouter, Gemini).
    • Server uses the currently active LLM configuration.
    • Falls back to a default LLM if no user configuration is active.
  • Logic Primitives: Supports operations like define, infer, decide, synthesize, etc. (extensible).
  • Database Tracing: All operations and logic chains are stored in a SQLite database for traceability and history.
  • HTTP API:
    • Manage LLM configurations (/api/llm-config).
    • Explore logic chains and operations (/api/logic-explorer).
  • Environment Variable Management: Uses a .env file for API keys.

Companion Web Application

A web application is available to interact with this server, manage LLM configurations, and explore logic chains:

  • Repository: Mnehmos/logic-mcp-webapp
  • Functionality:
    • View and manage LLM provider configurations.
    • Activate specific LLM configurations for the server to use.
    • View executed logic chains and their operations.
    • Clear LLM configurations and logic chain history.

Getting Started

Prerequisites

  • Node.js (version recommended by your project, e.g., v18+)
  • npm or yarn

Installation

  1. Clone the repository:
    git clone https://github.com/Mnehmos/logic-mcp.git
    cd logic-mcp
    
  2. Install dependencies:
    npm install
    # or
    # yarn install
    
  3. Set up environment variables:
    • Copy .env.example to .env (if an example file exists, otherwise create .env).
    • Fill in the required API keys, especially OPENROUTER_API_KEY for the default LLM and any other providers you intend to use (e.g., GEMINI_API_KEY).
    OPENROUTER_API_KEY="your_openrouter_key"
    GEMINI_API_KEY="your_gemini_key"
    # ... other keys ...
    HTTP_PORT=3001 # Port for the HTTP API
    

Running the Server

  1. Compile TypeScript:
    npm run build
    # or
    # tsc
    
  2. Start the server:
    npm start
    # or
    # node build/index.js
    

The MCP server will start on stdio, and the HTTP API will be available (default: http://localhost:3001).

API Endpoints

  • LLM Configurations: GET, POST, PUT, DELETE /api/llm-config
    • Activate: PATCH /api/llm-config/:id/activate
  • Logic Explorer: GET /api/logic-explorer/chains, GET /api/logic-explorer/chains/:chainId, etc.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.


This README provides a basic overview. Further details on specific primitives, API usage, and advanced configurations will be added as the project evolves.

Example Configuration

Below is an example runtime configuration for the logic-mcp server as it would appear in an MCP settings file:

"logic-mcp": {
  "name": "logic-mcp",
  "command": "node",
  "args": [
    "build/index.js"
  ],
  "cwd": "/path/to/logic-mcp",
  "enabled": true,
  "alwaysAllow": [
    "execute_logic_operation",
    "mcp.discovery"
  ],
  "disabled": false
}

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured