mcpField
S
shannon-thinking

shannon-thinking

本地服务
github.com/olaservoAI 与智能体715 周前更新

关于 shannon-thinking

shannon-thinking 是一个 MCP 服务,提供名为 shannonthinking 的工具,按照克劳德·香农的问题解决方法组织思考步骤。它面向需要结构化分析复杂问题的用户,将问题定义、约束、建模、验证和实现分阶段记录。

主要功能

  1. 01按问题定义、约束、建模、证明、实现分类思考
  2. 02记录每步的依赖关系与显式假设
  3. 03为每步标注不确定性(0-1)
  4. 04支持修订早期步骤与标记需复查的步骤
  5. 05结合形式化证明与实验验证

适用场景

  1. 01分析信息处理或系统优化类问题
  2. 02为工程设计问题制定分阶段的推理过程
  3. 03对需要迭代修正的复杂问题进行结构化记录

MCP 相关

该项目是 MCP 服务,向 MCP 客户端暴露单个 shannonthinking 工具,用于接收并结构化记录每一步思考。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"shannon-thinking": {
"command": "npx",
"args": [
"-y",
"server-shannon-thinking"
]
}
}
}
启动命令npx -y server-shannon-thinking

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npmserver-shannon-thinking

工具

1

收录的工具列表 · 更新于 3 周前

参数类型必填说明
thoughtstring是当前思考步骤
thoughtTypeenum是思考步骤的类型problem_definition | constraints | model | proof | implementation
thoughtNumberinteger是当前思考编号
totalThoughtsinteger是所需思考总数的估计值
uncertaintynumber是置信度(0-1)
dependenciesarray是此步骤所依据的思考编号
assumptionsarray是假设的明确列表
nextThoughtNeededboolean是是否需要继续思考
isRevisionboolean否此思考是否修订了先前的思考
revisesThoughtinteger否正在修订的思考编号
recheckStepobject否用于标记需要重新检查的步骤
recheckStep.stepToRecheckenum是需要重新检查的步骤类型problem_definition | constraints | model | proof | implementation
recheckStep.reasonstring是需要重新检查此步骤的原因
recheckStep.newInformationstring否促使重新检查的新信息
proofElementsobject否形式化证明步骤所需的要素
proofElements.hypothesisstring是正在检验的假设
proofElements.validationstring是假设的验证方法
experimentalElementsobject否实验验证所需的要素
experimentalElements.testDescriptionstring是实验测试的说明
experimentalElements.resultsstring是实验结果
experimentalElements.confidencenumber是对实验结果的置信度(0-1)
experimentalElements.limitationsarray是实验验证的局限性
implementationNotesobject否实际实施步骤的备注
implementationNotes.practicalConstraintsarray是实际局限和约束的列表
implementationNotes.proposedSolutionstring是详细的实施方案

详细介绍

shannon-thinking

一个 MCP 服务,用于演示 Claude Shannon 的系统化问题解决方法。该服务提供一款工具,帮助按照 Shannon 的方法,将复杂问题拆解为结构化思路,包括问题定义、数学建模和实际实施。

Shannon Thinking Server MCP server

概述

Claude Shannon 被誉为信息论之父,他通过系统化方法处理复杂问题:

  1. 问题定义:将问题剥离至其基本要素
  2. 约束条件:识别系统的限制和边界
  3. 模型:建立数学/理论框架
  4. 证明/验证:通过形式化证明或实验测试进行验证
  5. 实施/实验:设计并测试实际解决方案

该 MCP 服务将这一方法作为工具进行演示,帮助用户按照这些阶段开展系统化的问题解决。

安装

NPX
{
  "mcpServers": {
    "shannon-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "server-shannon-thinking@latest"
      ]
    }
  }
}

使用方法

该服务提供一个名为 shannonthinking 的工具,按照 Shannon 的方法组织问题解决思路。

每个思路都必须包含:

  • 实际思路内容
  • 类型(problem_definition/constraints/model/proof/implementation)
  • 思路编号和预计的思路总数
  • 置信度(不确定性:0-1)
  • 对先前思路的依赖关系
  • 明确的假设
  • 是否需要继续下一步思考

其他功能:

  • 修订:随着理解不断加深,可以修订较早的步骤
  • 重新检查:标记需要结合新信息重新审查的步骤
  • 实验验证:支持将实证测试与形式化证明结合
  • 实施说明:记录实际约束和拟议解决方案
使用示例
const thought = {
  thought: "The core problem can be defined as an information flow optimization",
  thoughtType: "problem_definition",
  thoughtNumber: 1,
  totalThoughts: 5,
  uncertainty: 0.2,
  dependencies: [],
  assumptions: ["System has finite capacity", "Information flow is continuous"],
  nextThoughtNeeded: true,
  // Optional: Mark as revision of earlier definition
  isRevision: false,
  // Optional: Indicate step needs recheck
  recheckStep: {
    stepToRecheck: "constraints",
    reason: "New capacity limitations discovered",
    newInformation: "System shows non-linear scaling"
  }
};

// Use with MCP client
const result = await client.callTool("shannonthinking", thought);

功能

  • 迭代式问题解决:随着理解不断加深,支持修订和重新检查
  • 灵活验证:将形式化证明与实验验证相结合
  • 依赖关系跟踪:明确跟踪思路如何基于先前思路逐步展开
  • 假设管理:要求清晰记录假设
  • 置信度:量化每个步骤中的不确定性
  • 丰富的反馈:提供带颜色编码、符号和验证结果的格式化控制台输出

开发

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Watch mode during development
npm run watch

工具架构

该工具接受具有以下结构的思路:

interface ShannonThought {
  thought: string;
  thoughtType: "problem_definition" | "constraints" | "model" | "proof" | "implementation";
  thoughtNumber: number;
  totalThoughts: number;
  uncertainty: number; // 0-1
  dependencies: number[];
  assumptions: string[];
  nextThoughtNeeded: boolean;
  
  // Optional revision fields
  isRevision?: boolean;
  revisesThought?: number;
  
  // Optional recheck field
  recheckStep?: {
    stepToRecheck: ThoughtType;
    reason: string;
    newInformation?: string;
  };
  
  // Optional validation fields
  proofElements?: {
    hypothesis: string;
    validation: string;
  };
  experimentalElements?: {
    testDescription: string;
    results: string;
    confidence: number; // 0-1
    limitations: string[];
  };
  
  // Optional implementation fields
  implementationNotes?: {
    practicalConstraints: string[];
    proposedSolution: string;
  };
}

适用场景

这种思考模式尤其适用于:

  • 复杂系统分析
  • 信息处理问题
  • 工程设计挑战
  • 需要理论框架的问题
  • 优化问题
  • 需要实际实施的系统
  • 需要迭代改进的问题
  • 实验验证可补充理论的情况

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。