Token导航 LogoToken导航TokenDH.com
Analytical MCP Server logo
搜索检索stdio官方级别未说明来源级核验

Analytical MCP Server

MCP Server

Analytical MCP Server: Enhancing AI with Structured Problem-Solving Tools

工具数

0

提示词数

0

GitHub Stars

4

资源数

0
TypeScriptClaude搜索Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

quanticsoul4772

提供方

quanticsoul4772

最后核验

2026/5/18 02:51

运行时

Docker

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

docker run -d \

详细介绍

分析型MCP服务器

为Claude提供统计分析、决策支持、逻辑推理和研究验证工具的模型上下文协议服务器。

设置

先决条件

  • Node.js 版本 >= 20.0.0
  • EXA_API_KEY 环境变量(用于研究功能)

安装

选项1:直接安装

npm install
npm run build

选项2:Docker

# Build the Docker image
docker build -t analytical-mcp .

# Run with environment variables
docker run -d \
  --name analytical-mcp \
  -e EXA_API_KEY=your_api_key_here \
  -v $(pwd)/cache:/app/cache \
  analytical-mcp

# Or use docker-compose
cp .env.example .env
# Edit .env with your API key
docker-compose up -d

配置

直接安装配置

  1. 复制 .env.example to .env
  2. 将您的EXA_API_KEY添加到 .env
  3. 添加到Claude桌面配置中:
{
  "mcpServers": {
    "analytical": {
      "command": "node",
      "args": ["/path/to/analytical-mcp/build/index.js"],
      "env": {
        "EXA_API_KEY": "your-exa-api-key-here"
      }
    }
  }
}

Docker 配置

  1. 复制 .env.example to .env
  2. 添加您的EXA_API_KEY到 .env
  3. 添加到Claude桌面配置中:
{
  "mcpServers": {
    "analytical": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env-file", ".env",
        "-v", "$(pwd)/cache:/app/cache",
        "analytical-mcp"
      ]
    }
  }
}

可用工具

统计分析

  • analytical:analyze_dataset - 数据集的统计分析
  • analytical:advanced_regression_analysis - 线性回归、多项式回归和逻辑回归
  • analytical:hypothesis_testing - 统计假设检验(t检验、卡方检验、方差分析)
  • analytical:data_visualization_generator - 生成数据可视化规范

决策分析

  • analytical:decision_analysis - 基于加权评分的多标准决策分析

逻辑推理

  • analytical:logical_argument_analyzer - 分析论点结构及有效性
  • analytical:logical_fallacy_detector - 检测文本中的逻辑谬误
  • analytical:perspective_shifter - 为问题提出多种不同的看法

研究验证

  • analytical:verify_research - 从多个来源交叉验证研究声明

可观测性与指标

分析型MCP服务器内置了可观测性功能,用于监控断路器和缓存性能。

指标终端节点

启用后,服务器将通过HTTP在9090端口(可配置)暴露指标:

  • http://localhost:9090/metrics - Prometheus风格的指标
  • http://localhost:9090/metrics?format=json - JSON格式的指标
  • http://localhost:9090/health - 健康检查端点
  • http://localhost:9090/ - Metrics服务器状态页面

可用指标

断路器指标

  • analytical_mcp_circuit_breaker_state - 当前状态(0=关闭,1=半开,2=开放)
  • analytical_mcp_circuit_breaker_total_calls_total - 通过断路器的总呼叫次数
  • analytical_mcp_circuit_breaker_rejected_calls_total - 由断路器拒绝的呼叫
  • analytical_mcp_circuit_breaker_failure_count - 当前故障次数
  • analytical_mcp_circuit_breaker_success_count - 当前成功次数

缓存指标

  • analytical_mcp_cache_hits_total - 按命名空间划分的缓存命中
  • analytical_mcp_cache_misses_total - 按命名空间划分的缓存未命中
  • analytical_mcp_cache_puts_total - 按命名空间缓存存储
  • analytical_mcp_cache_evictions_total - 按命名空间进行缓存驱逐
  • analytical_mcp_cache_size - 按命名空间划分的当前缓存大小

系统指标

  • analytical_mcp_uptime_seconds - 服务器运行时间(以秒为单位)
  • analytical_mcp_memory_usage_bytes - 内存使用情况(驻留集大小(RSS)、堆内存、外部内存)
  • analytical_mcp_cpu_usage_microseconds - CPU时间使用情况(用户态,系统态)

配置

通过设置环境变量来启用指标:

METRICS_ENABLED=true        # Enable metrics server (default: true)
METRICS_PORT=9090          # Metrics server port (default: 9090)
METRICS_HOST=127.0.0.1     # Metrics server host (default: 127.0.0.1, use 0.0.0.0 to bind to all interfaces)

使用示例

# Get Prometheus metrics
curl http://localhost:9090/metrics

# Get JSON metrics
curl http://localhost:9090/metrics?format=json

# Health check
curl http://localhost:9090/health

使用示例

数据集分析

{
  "data": [23, 45, 67, 12, 89, 34, 56, 78],
  "analysisType": "stats"
}

决策分析

{
  "options": ["Option A", "Option B", "Option C"],
  "criteria": ["Cost", "Quality", "Speed"],
  "weights": [0.4, 0.4, 0.2]
}

逻辑分析

{
  "argument": "All birds can fly. Penguins are birds. Therefore, penguins can fly.",
  "analysisDepth": "comprehensive"
}

发展

测试

# Run all tests
./tools/test-runner.sh

# Run specific test suite
./tools/test-runner.sh integration

# Available test suites: api-keys, server, integration, research, data-pipeline

脚本

  • npm run build - 将TypeScript编译为JavaScript
  • npm run watch - 监视变化并重新构建
  • npm run test - 运行 Jest 测试
  • npm run inspector - 启动MCP检查器进行调试

项目结构

analytical-mcp/
├── src/
│   ├── tools/           # MCP tool implementations
│   ├── utils/           # Utility functions
│   └── index.ts         # Main server entry point
├── docs/                # Documentation
├── tools/               # Development and testing scripts
└── examples/            # Usage examples

工具类别

统计分析

  • 描述性统计:均值、中位数、标准差、四分位数
  • 相关性分析
  • 回归分析:线性、多项式、逻辑(或逻辑斯蒂)
  • 假设检验:t检验、卡方检验、方差分析(ANOVA)

决策支持

  • 多准则决策分析
  • 加权评分
  • 权衡分析
  • 风险评估

逻辑推理

  • 论元结构分析
  • 谬误检测
  • 视角生成
  • 批判性分析

研究整合

  • 多源验证
  • 事实提取
  • 一致性检查
  • 置信度评分

安全与隐私

  • 所有处理均在本地进行
  • 研究功能使用Exa API(可选,需要API密钥)
  • 无永久数据存储
  • 可选的基于文件的缓存,仅本地存储
  • 通过环境变量管理的API密钥

许可证

MIT 许可证。详见 LICENSE 文件。

做出贡献

  1. 为仓库创建分支(或“克隆仓库”)
  2. 创建特性分支: git checkout -b feature/your-feature
  3. 进行更改并提交: git commit -m 'Add feature description'
  4. 推送到分支: git push origin feature/your-feature
  5. 打开拉取请求

docs/DEVELOPMENT.md(文件名,可翻译为“开发文档/开发指南.md”,但通常文件名保持原样不翻译,仅作说明) 关于详细开发指南、代码标准和测试要求。

故障排除

常见问题

JSON解析错误所有日志记录都必须发送到标准错误流(stderr),而不是标准输出流(stdout)。MCP协议使用标准输出流进行通信。请使用Logger类,而不是console.log。

工具未显示在Claude桌面设置中验证服务器配置,并重启Claude桌面应用程序。

研究功能已禁用在你的环境或.env文件中设置EXA_API_KEY。

服务器无法启动检查 Node.js 版本是否为 20 或更高版本,并确保所有依赖项都已安装 npm install

docs/TROUBLESHOOTING.md 翻译为中文是:文档/故障排除指南.md 以获取详细的故障排除指南。

调试模式

使用MCP检查器启动服务器:

npm run inspector

链接

目录标签

目录标签

TypeScriptClaude搜索research-and-datamathgptmath-solvermath-assistant统计分析本地部署决策支持逻辑推理研究验证数据可视化

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Docker

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononeremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP