香农系统分解
一种实现了克劳德·香农问题解决方法论的工具,可以帮助将复杂问题分解为结构化的步骤,包括问题定义、约束条件、建模、验证和实施。
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"shannon-thinking": {
"args": [
"-y",
"server-shannon-thinking@latest"
],
"command": "npx"
}
}
}
服务介绍
shannon-thinking
一个实现了克劳德·香农系统性问题解决方法的MCP服务器。该服务器提供了一个工具,帮助将复杂问题按照香农的方法分解为结构化的思考过程,包括问题定义、数学建模和实际实施。
概述
克劳德·香农,被誉为信息论之父,通过一种系统的方法来处理复杂问题:
- 问题定义:将问题简化为其基本元素
- 约束条件:确定系统的限制和边界
- 模型:开发数学/理论框架
- 证明/验证:通过形式化证明或实验测试进行验证
- 实现/实验:设计并测试实际解决方案
这个MCP服务器将这种方法实现为一个工具,通过这些阶段引导系统性的问题解决。
安装
npm install @modelcontextprotocol/server-shannon-thinking
使用
服务器提供了一个名为shannonthinking的工具,根据香农的方法对解决问题的想法进行结构化。
每个想法必须包含:
- 实际的思想内容
- 类型(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;
};
}
何时使用
此工具特别适用于:
- 复杂系统分析
- 信息处理问题
- 工程设计挑战
- 需要理论框架的问题
- 优化问题
- 需要实际实施的系统
- 需要迭代改进的问题
- 实验验证补充理论的情况
许可证
MIT