data-analyst-mcp-martin - 基于代码解释器沙盒的本地数据分析引擎 - #214
Open
martin11-russ1 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
新增一个基于 Hy3 的本地 stdio 数据分析 MCP Server(data-analyst-mcp-martin),采用“真实代码解释器”架构,彻底解决大模型在复杂数据分析中的“算术幻觉”问题,支持在 CodeBuddy、Cursor 等 MCP 客户端中直接使用。
主要功能
提供数据嗅探 (inspect_dataset)、零幻觉分析引擎 (analyze_data_with_hy3) 和本地可视化引擎 (generate_chart) 3 个核心 MCP Tool
支持读取本地 CSV 和 JSON 数据文件
突破静态白名单限制,大模型动态生成 Pandas/Matplotlib 代码并在本地受限沙盒中执行,实现 100% 确定性计算
强制使用后台渲染引擎静默出图,并自动将高质量 PNG 保存至本地,防止 GUI 阻塞
通过 .env 环境变量配置 Hy3 API,不硬编码密钥
采用兼容性极高的原生 Python 单文件部署方案,提供详细的排障指南(Troubleshooting)与真实调用 Demo
验证
已在 macOS 及 Windows 本地环境中完成端到端双端测试
已在 CodeBuddy 中完成真实调用验证,成功执行“数据读取 ➔ 代码生成与计算 ➔ 生成洞察与出图”的完整闭环
依赖解析与本地沙盒文件读写权限均测试通过
查看 Demo 视频