认知协议服务器

为AI代理提供结构化认知工具,帮助其进行更严谨的推理。

  • by Dr-AneeshJoseph
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 Dr-AneeshJoseph/metacognitive-mcp

使用说明

元认知MCP

人工智能代理的认知基础设施

一个模型上下文协议(MCP)服务器,为人工智能推理提供结构化的认知工具。与获取外部数据的典型MCP不同,此MCP提供 结构化认知--帮助AI代理更严格地思考的协议。

概述

元认知MCP的功能是 认知免疫系统 对于AI代理。当一个代理对其推理不确定时,它可以调用这些协议来构建其思维,而不是产生幻觉。

可用工具

工具 说明
grounded_reasoning 应用结构化认知分析,包括证据、置信度校准和反驳
adversarial_stress_test 从敌对角度攻击索赔以发现弱点
detect_cognitive_biases 扫描推理是否存在确认偏差、锚定、错误二分法等。
decompose_question 将复杂的查询分解为具有依赖关系的原子子问题
validate_inference 检查逻辑有效性并检测正式/非正式谬误

核心不变

每个工具的响应都是 知识性封闭--它包含了评估其有效性所需的一切:

{
  "claim": "The central assertion",
  "confidence": 0.75,
  "evidence": [...],
  "uncertainties": [...],
  "inference_chain": [...],
  "counter_claims": [...],
  "epistemic_status": "probable",
  "methodology": "How this analysis was conducted"
}

安装

# Clone the repository
git clone https://github.com/YOUR_USERNAME/metacognitive-mcp.git
cd metacognitive-mcp

# Install dependencies
pip install -e .

用法

使用克劳德桌面

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "metacognitive": {
      "command": "python",
      "args": ["-m", "metacognitive_mcp.server"],
      "cwd": "/path/to/metacognitive-mcp"
    }
  }
}

独立

python -m metacognitive_mcp.server

项目结构

metacognitive-mcp/
├── src/metacognitive_mcp/
│   ├── server.py           # MCP transport layer
│   ├── types.py            # Core data structures
│   ├── registry.py         # Protocol lookup
│   └── protocols/
│       ├── base.py         # Abstract base class
│       ├── grounded.py     # Grounded reasoning
│       ├── adversarial.py  # Adversarial testing
│       ├── bias.py         # Bias detection
│       ├── decomposition.py # Question decomposition
│       └── validation.py   # Inference validation
└── tests/

许可证

阿帕奇-2

作者

Aneesh Joseph博士(概念设计)
Claude(建筑设计与实施指南)


“结构就是证明。证明就是结构。”