npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-logic-reasoner

v1.0.1

Published

A Model Context Protocol server for enhancing AI logical integrity and correctness using MECE analysis, Aristotelian causality, and multiple reasoning methods

Readme

MCP Logic Reasoner

一个专注于提升 AI 逻辑完整性和正确性的 Model Context Protocol (MCP) 服务器。

概述

MCP Logic Reasoner 是一个强大的逻辑分析工具,通过整合多种经典逻辑分析方法,帮助 AI 在处理复杂问题时保持思维的严谨性和完整性。

核心功能

  • MECE 分析:基于互相独立、完全穷尽原则的结构化分析
  • 四因分析:运用亚里士多德四因说深度探析事物本质
  • 三种推理:支持溯因、演绎、归纳三种推理方法
  • 综合分析:整合多种方法提供全面的逻辑洞察
  • 逻辑验证:自动检查分析过程的逻辑有效性

设计理念

  1. 逻辑完整性:确保思维过程覆盖所有相关维度
  2. 逻辑正确性:保证推理过程严谨可靠
  3. 结构化思维:提供系统性的分析框架

技术架构

项目结构

mcp-logic-reasoner/
├── src/
│   ├── index.ts              # MCP 服务器主入口
│   ├── logic-engine.ts       # 核心逻辑引擎
│   ├── mece-analyzer.ts      # MECE 分析器
│   ├── causality-analyzer.ts # 四因分析器
│   ├── reasoning-engine.ts   # 推理引擎
│   └── types.ts              # 类型定义
├── package.json
├── tsconfig.json
└── README.md

技术栈

  • Node.js 18+
  • TypeScript 5.5+
  • MCP SDK 0.6+
  • ESModules 支持

安装和配置

1. 安装依赖

cd mcp-logic-reasoner
npm install

2. 编译项目

npm run build

3. Claude Desktop 配置

在 Claude Desktop 的配置文件中添加:

{
  "mcpServers": {
    "logic-reasoner": {
      "command": "node",
      "args": ["/path/to/mcp-logic-reasoner/dist/index.js"],
      "env": {
        "LOGIC_DEPTH": "comprehensive",
        "CONFIDENCE_THRESHOLD": "0.7"
      }
    }
  }
}

核心功能详解

1. MECE 分析 (analyze_mece)

使用互相独立、完全穷尽原则分析问题结构。

参数

  • topic (必需): 分析主题
  • context (可选): 上下文信息
  • initialDimensions (可选): 初始分析维度

2. 四因分析 (analyze_causes)

基于亚里士多德四因说的深度原因分析。

四个原因维度

  • 质料因:构成事物的基础要素
  • 形式因:事物的结构和形式
  • 动力因:推动变化的力量
  • 目的因:存在的目的和意义

3. 推理分析

溯因推理 (reason_abductive)

从观察结果推测可能的原因。

演绎推理 (reason_deductive)

从一般原理推出特殊结论。

归纳推理 (reason_inductive)

从特殊案例总结一般规律。

4. 综合分析 (synthesize)

整合多种分析方法,提供全面的逻辑分析。

5. 逻辑验证 (validate_logic)

检查分析输入的逻辑有效性。

使用示例

业务决策分析示例

使用 MECE 分析新产品定价策略:

{
  "topic": "新产品定价策略",
  "context": "面向中高端市场的智能设备",
  "initialDimensions": ["成本导向", "竞争导向", "价值导向"]
}

使用四因分析客户满意度问题:

{
  "topic": "客户满意度下降",
  "context": "过去三个月持续下滑",
  "knownFactors": ["服务响应时间", "产品质量问题"]
}

与 Claude 集成使用

在 Claude Desktop 中,你可以直接使用这些工具:

请使用逻辑推理工具分析"是否应该投资新技术"这个问题。

要求:
1. 使用 MECE 原则分析决策维度
2. 运用四因分析探究投资动机
3. 进行综合推理分析
4. 提供结构化的决策建议

开发和扩展

本地开发

# 监视模式编译
npm run dev

# 构建项目
npm run build

# 启动服务器
npm start

# 清理构建文件
npm run clean

扩展功能

系统采用模块化设计,支持以下扩展:

  1. 新增分析器:实现新的逻辑分析方法
  2. 自定义评分:定制逻辑质量评估标准
  3. 输出格式:支持多种输出格式
  4. 集成接口:与其他系统集成

质量控制

内置质量保证

  1. 完整性检查:确保分析覆盖所有相关维度
  2. 一致性验证:检查不同分析结果间的逻辑一致性
  3. 置信度评估:为每个分析结果提供置信度评分
  4. 改进建议:自动识别逻辑薄弱点并提供建议

最佳实践

  1. 明确主题:提供清晰具体的分析主题
  2. 充分上下文:提供足够的背景信息
  3. 多方法结合:使用综合分析获得全面洞察
  4. 迭代改进:根据建议不断完善分析质量

故障排除

常见问题

Q: MCP 连接失败 A: 检查 Claude Desktop 配置和服务器启动状态

Q: 分析结果不准确 A: 提供更详细的上下文信息和具体的分析参数

Q: 处理速度慢 A: 检查输入数据量,考虑拆分复杂分析

许可证

MIT License

支持和反馈

  • 问题报告: 通过 GitHub Issues 提交
  • 功能建议: 通过 GitHub Discussions 讨论
  • 技术支持: 查看项目文档和示例

MCP Logic Reasoner - 让 AI 思维更严谨,让决策更可靠。