Skip to main content
Glama
krusch-sequential-mcp

krusch-sequential-mcp

by kruschdev

⚡ 为什么选择 Krusch Sequential MCP?

标准的 sequential-thinking MCP 为思维链推理提供了一个很好的工具,但在多智能体环境中,它会遇到“传话游戏”问题,即智能体可能会自信地产生无根据的幻觉思维,从而污染上下文窗口。

krusch-sequential-mcp 通过引入语义合理性门控 (Semantic Plausibility Gating) 以及高度可靠的 DBOS PostgreSQL 持久化层解决了这个问题。

核心特性

  • 🧠 语义合理性门控: 通过边缘模型评估器自动拒绝偏离或产生幻觉的思维。

  • 💾 DBOS PostgreSQL 持久化: 将每一个思维、分支和修订同步持久化到 dbos_thoughts 表中,创建一个可审计的推理有向无环图 (DAG)。

  • 🛑 确定性状态可靠性: 停止被污染的思维执行,强制智能体重新评估其推理路径。

  • 🔌 直接替换: 完全兼容标准的 sequential-thinking 接口,同时支持新的 groundingContext 参数。

  • 📦 零外部依赖: 合理性评估器完全自包含——无需外部工具包。


Related MCP server: Tyra Advanced Memory MCP Server

🧠 架构:语义合理性门控

当智能体提出一个思维时,内部评估器会根据提供的 groundingContext 对其进行筛选。

graph TD;
    A[Agent Thought Proposed] --> B{Grounding Context Provided?};
    B -- No --> C[Accept & Persist to DBOS];
    B -- Yes --> D[Edge Model Evaluator];
    D -- Plausible --> C;
    D -- Hallucinated/Drifted --> E[Reject Thought];
    E --> F[Return Soft Error to Agent];
    F --> G[Agent Re-evaluates];

📦 安装

npm install -g krusch-sequential-mcp

或者在您的 MCP 配置文件(例如 claude_desktop_config.json 或 .cursor/mcp.json)中进行配置:

{
  "mcpServers": {
    "krusch-sequential-mcp": {
      "command": "npx",
      "args": ["-y", "krusch-sequential-mcp"]
    }
  }
}

🚀 快速入门指南

智能体可以使用标准参数(thought、thoughtNumber、totalThoughts、nextThoughtNeeded 等)调用 sequentialthinking 工具。

要启用合理性门控,请在工具调用中包含 groundingContext 参数:

{
  "thought": "Since the user is asking about the database schema, I will assume it uses MongoDB and write a query for it.",
  "thoughtNumber": 1,
  "totalThoughts": 3,
  "nextThoughtNeeded": true,
  "groundingContext": "The current codebase exclusively uses DBOS PostgreSQL for persistence. No NoSQL databases are present."
}

由于该思维与 groundingContext 冲突,评估器将自动拒绝它,并向智能体返回错误,要求其重新思考其方法。


⚙️ 环境变量

变量

必需

默认值

描述

DATABASE_URL

否

(无 — 禁用持久化)

PostgreSQL 连接字符串(例如 postgres://user:pass@localhost:5432/mydb)。如果未设置,服务器将在纯内存模式下运行。

OLLAMA_URL

否

http://localhost:11434

用于合理性检查的 Ollama 服务基础 URL。

PLAUSIBILITY_MODEL

否

qwen2.5-coder:1.5b

用于合理性筛选的 Ollama 模型。应为一个小型、快速的模型。

复制 .env.example 以快速开始:

cp .env.example .env

🤝 贡献

我们欢迎贡献!请确保您的测试通过并遵守项目格式标准。 通过 npm run build 和 npm start(或 node build/index.js)运行测试。

📄 许可证

MIT License © 2026 kruschdev

Available Tools

1 tool
sequentialthinkingC

A detailed tool for dynamic and reflective problem-solving through thoughts. Augmented with Semantic Plausibility Gating.

Inputs: thought (required), thoughtNumber (required), totalThoughts (required), nextThoughtNeeded (required), +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 1 tool

    Disambiguation5/5

    Only one tool exists, so there is no possibility of confusion or overlap. The tool's purpose is singular and clear.

    Naming Consistency5/5

    With a single tool, naming consistency is trivially satisfied. The name 'sequentialthinking' is descriptive and matches the server's focus.

    Tool Count3/5

    The server has exactly one tool, which feels minimal. While it is appropriate for a focused sequential thinking utility, the count is on the borderline of being too thin.

    Completeness4/5

    The tool appears to provide a comprehensive capability for sequential thinking and problem-solving. However, being the only tool, there may be missing auxiliary operations like reset or history, though no obvious gaps are evident.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server implementing the Chain-of-Recursive-Thoughts (CoRT) methodology that makes AI think harder by making it argue with itself repeatedly through multiple rounds of alternative generation and evaluation.
      5
      MIT
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      A sophisticated MCP server providing advanced memory capabilities with RAG, hallucination detection, and enterprise-grade AI infrastructure for intelligent agent ecosystems.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides persistent semantic memory backed by PostgreSQL and pgvector for storing and searching thoughts via vector embeddings. It enables dimensional organization, conflict detection, and historical tracking of facts, decisions, and observations.
      ISC