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.
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.
Demonstration: Logic Puzzle Solving
Watch a demonstration of the Logic MCP server attempting to solve the "Passport Pandemonium" logic puzzle:
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).
- Manage LLM configurations (
- Environment Variable Management: Uses a
.envfile 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
- Clone the repository:
git clone https://github.com/Mnehmos/logic-mcp.git cd logic-mcp - Install dependencies:
npm install # or # yarn install - Set up environment variables:
- Copy
.env.exampleto.env(if an example file exists, otherwise create.env). - Fill in the required API keys, especially
OPENROUTER_API_KEYfor 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 - Copy
Running the Server
- Compile TypeScript:
npm run build # or # tsc - 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
- 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
}
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
