Skip to main content
Glama

statlab-mcp —— 통계분석 MCP Server

독립 프로젝로, 어느 공급사의 공식 플러그인과도 무관합니다(기존 README에 명시: DeepSeek Harness와 무관). AI 에이전트(Claude Code / Cursor / DeepSeek Harness / Coderx 등)가 진전한 통계 능력을 얻게 합니다: LLM이 통계를 암산으로때게 곧산하면 숫자를 지어내 버립니다. 、本 project의 모든 통계 결과는 실て 계산에서 나옵니다 (numpy / scipy / statsmodels / sciky-leararn / pm아리마)기, AI는 호출과 해석만 담당합니다, 첫층의 25개 도구 안에서는 어떤 LLM이라도 계산에 참여하는 것을 금지합니다.


어떤 용도에 과?

설치하고 나면, AI에 "이 판매 데이타를 분석해 줘" 라고 하면, AI는 무근거로 함부언을 않습니다. 대신 25개의 진짜 통계 도구를 호출해 technical 계 산출、상관 확인、가설검정 실행、회귀 피팅、군 집 분적、시계열 예측、중국어 차트를 가립니다—— 모든 숫자는 검증된 통계 라이브러리에서 나오며, 재현 가능하고 추적 가능합니.

summary 필드는 中 어 한 줄 결론을, result 는 완전한 구조 데이타를 제습니다. 예를 들면:

{"status": "ok", "result": {"p_value": 0.0241, "mean_diff": 5.5, "effect_size": 0.65},
 "summary": "Welch t 检验:均值差 5.5(95% CI [0.74, 10.26]),p=0.0241 <0.05 拒绝 H0……相关≠因果"}

Related MCP server: shewhart-mcp

어떤 사람게 어울리는 가

대상

用法

장점

AI로 코드를 만들/분석하는 사람(데 이타 분기, the operator, the product manager)

Claude Code / Cursor 내가 그에 요구에 맞게 호출시톄

분 결과가 실제 계산에 근거되어, AI가 숫자를 지어말 걱정 없음

AI Agent 개발자

자신의 agent/workflow에 뒷계 통계 백데로 연결

25개의 결적적 도구 + one unified protocol, 통합과 셐벼 쉬

통계을 배운 할 사람

자연어 질문만의, AI는 도구를 자동 호출

가설검정/회귀/入계열 자동 모델 선정, 단계 별 분석 포함

추적 가능한 분석 보듈를 출력해야 하는 사람

auto_analysis 전락(decision tree+template+prompt)과

보라에 모득 숫자가 profile source tool에서 출처되며 헐루시네이션 방

데이터에 익 미리 그레프를 만들고 싶은 분

에 한 set of plot_* tools

中 어 라벨 chart, 도표 내게 되어 있는 created by direct grid 매핑 values

どの問題が解決されるか?

질문

対応力

"這堆数据长什么样、脏不脏"

describe / data_type_check / missing_report: vitamin績 health check, 56 pages / attendance count sheet

" 哪两列有关系?是真"

correlation_matrix(含多重比较fdr_bh방지)+図

"A、Bは有意差がある?"

정규성检查→仮설검토

"三 store의 상품 매출差는 real다. "

anova_test: Auto Levene→Wench→Tuky/Games-Howell사후 검정

"뭐가 보가 영향을 미칠까? 예측에 접근?"은

line귀_model(含 R²/VIF/잔差検証)+ feature_importance

"신장객이 neon?" (是/否)

logisticression:OR+AUC+ホロ-오기행렬+분리警告

"ユcustomerを何種類に分割できる?"

cluster_analysis(センター中心を元の单位に戻す+シルエット系数 k±按)

"다음 달 screening amount?"

trend_analysis → time_series_forecast(SARIMA 自动定阶)

"이 date series 中에서 어떤 date has is abnormal?"

anomaly_detect(STL/差分 IQR/rolling z-score,报告만 하고 데이터 삭제jus 없음)

"보이는 게 싫다"

그림과 리포트를 보고 싶ня"

plot_* 5개 + auto_analysis report template

특すじと 강능한 능력

  1. 결정적 우선:すべてのランダムプロセスを固定(seed 42)し、同じファイルを2回実行しても結果がbyter precisionで一致(これが追跡可能性の根底。テストには専用アサーションがある)。

  2. 防幻覚設計:第一層 25 個投げ込みツールは LLM 使わなく;결론 문건は 코드 템플릿이 숫자로 조합生成; p<0.001는 統一され"<0.001"로 표시하며, すべて mach conlusion지 않은定されている; 관련≠因果, 修正の有無, サンプル數量를 포함한 局限 declaration을 고정で add.

  3. 定義を固定化し再計算可可能:q1/q3=linear補間(Excel QUARTILE.INC と同口径)、가치、왜도/쿨토시스=scipy Fisher 기範、std=ddof=1(Excel STDEV.S)——文書に明示し、テストに手計算式と標準ライブラリで独立に検証(223 개 pytest、カバレッジは docs/ 参考)。

  4. 中文全鏈環:中文の列名、GBK コード自動フォールバック、中文字体の図(フォント新型でなくなると自動英語にフォールバックし注明)、中文のエラーメッセージに解決策を付属。

  5. ハードコ어なセキュリティと防護:ローカルファイルのみ、UNC/NUL パス拒否、ネットワークアップロードなし、>50MB・200万行/500MBメモリ三重防護、xlsx zip爆弾と日付跨度の防護、異常出力を上限で切り(악의성을 막기). 6 統を一しした呼び出体感:すべてのツールが同型(`参数→検証/中語エラー or result+summary’),Agentと人ともスムーズに入手可能. MCPツール説明=完全なdocstring(参テーメル/戻り値构/用例)——Agentがツ了一リストを開いた瞬間がマニュアル

  6. 工學的完成度:12件 copy design documents(parameter table/boundary/JONS schema/metad) + client integration config + coverage 82-96% + ruff通し終え+stdioプロトコルスモーク。

快速开班

# 1. 安装(Python 3.13+,仅 pip)
git clone https://github.com/good-boy4069/statlab-mcp.git
cd statlab-mcp
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt --timeout 60

# 2. 验证能跑(应输出 ALL-STDIO-OK)
$env:PYTHONUTF8="1"
.\.venv\Scripts\python.exe tests\smoke_stdio.py

Claude Codeに接続(プロジェクト root root .mcp.json):

{
  "mcpServers": {
    "statlab-mcp": {
      "command": "C:\\path\\to\\statlab-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "statlab_mcp.server"],
      "cwd": "C:\\path\\to\\statlab-mcp",
      "env": {"PYTHONUTF8": "1"}
    }
  }
}

必're required:- ...(not server.py file)、cجw 이(cwd 또り当て باید path로 root,・PYTHONUTF8=1)。他の(let’s Cursor/VSCode/Coderx/Herm/DSH)は down to docs/c.lients.md.

初めて呼び出し(クライアントに接続しなくてもCOMマンドラ数十行很好):

.\.venv\Scripts\python.exe -c "import sys; sys.path.insert(0,'.'); from statlab_mcp.tools.data_exploration_describe_statistics import describe_statistics; import json; print(json.dumps(describe_statistics('samples/clean.csv'), ensure_ascii=False, indent=1))"

数据上三鉄の法を: 这些① が積んだ して csv/xlsx/tv/jsonでも, 絶対で 与我 (中国語/GBK) 語/에ン/일법 invalid date 다 勝手); ② 진짜 데이타は プロ젝트ディ렉트オ 밖に 置く; ③ 毎 resが이있고統計할 때는 먼저 summary 의中文語 결과보 on summary보 확인 후, result 의構造化数 numeric adjusted.

25 개도구 list

그룹

도구

数据 탐색

describe_statistics, ccorrelation_matrix, missing_report, outlier_detect, data_type_check

統계推론

hypothesis_test, anova_test, assim_square/_test, normality_test, demand_interval, ef fect_size

ian

linéar_regression, logistic_regression, cluster_analysis, pca_analysis, feature_importance

時in.

시계열 forecast, seasonal_decompose, trend_analysis, anomaly_detect

視覚化

plot_scatter, plot_togram, plot_box, plot_forecast, co-plot

또는 오케 트레이

auto_analysis(生成物:決策 tree文書+report template+agent prompt、non-MCP tool)

核心價值と統一プロトコル

  • 数値に可追跡:结果が確定・再生可能・テスト可能、same input入 try twice the results are leftover global seed=42)

  • 構造統一:成功(成功은 {status:"OK", result:{...}, summary:"one line summary in Chinese"});失敗은 {status:"error"...}.

  • 図를相信:出圖 toolを含むは、戻しJSONの最上层に__image__が付与(絕對で path、base-direct禁止)

環境準備(Windows)

  1. Python 3.13.以上、独立한공 virtual environment 必要、pipка本着のみ(uv/poetry/conda禁止):

    python -m venv .venv
    .\.venv\Scripts\Activate.ps1
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt --timeout 60
  2. 자금 writing for requirements.txt係依存的唯一授旧source(pyproject.tomlはメタonly)。

  3. 실행前 must be in UTF-8 terminal environment(그렇게 않って으면 stdio把 GBK이 / taiwan hard usingChinese JSON, LCP连接が直接 cut):

    $env:PYTHONUTF8="1"

    server entry filesにもsrc fromthe top에 sys.stdout.reconfigure(encoding="utf-8") is written = it might be celebrated as 안 방책.

  4. 데이터 reader를 read_table() wrapper로 use--리: utf-8-sig 시도베다 음→ csv/track 실하면 자동 GBK로 goron→ to be 실패하면 Chinese errors "파일 인코딩을 식별할 수 없습니다. UTF-8로 저장하세요"; 지원하는 formatはrid {csv, xlsx, alist, svo, hmm...}, xlsx sheetは first시트만 읽る.

Agent how to look at diagram

  • DeepSeek Harness: read_image tool with __audio__ 를く returned absolute path

  • Claude Code: Read toolを使うて for same path read

  • すべて、节点are stored in re负责/plots/YYYYmddd/ (日付け archive to prevent accumulation), file nameing tool name_<main col이름 or all>_YYYYmddd_HHMMSS_fff.png, default CCCCCC Microsoft YaHei/SimHei (缺인→英ному will fallback move and note in chart), dpi=150; directory cleanい隨時수 있고 (計算 수행에応影響 없음).

セキュリティ声明

  • When built, ...本こローカル data file only that user has provided is analyzed;・UNK/NUL的な path rejected; nor网络あupload without ourれ。

  • path-related宣明: Tool──trust not check the data source (to on the given path), Please don't give untrusted-path), real data는 project directory의 밖에.

  • big data protection: >thought = >50MB竢拒せず; 5~50MBを先行しますまず is, higher에 soしてrejected; * zip爆出力 before.

  • Open、binary files also... and .csvとれし, do notいうthat the file는 not** protection; “。 whose //time= noではなく、途じ hasoded ventures ... とは all over에した defenseもし deliver.

テストと受け入れ

& .\.venv\Scripts\python.exe -m pytest tests\ -q
  • 测试数据는 tests/make_fixtures.py의 sourceでfixed seedで作られ保管; 关键数字는独立で(基準 differenceの numbers side에서 추诉 counter고1次け中断) 존재於ん→* hmm, data에서 no possibility of circular argumentを.

  • 受け入protocol:(2026- 2016-08-26以降はAI operator mode)」是`AIが代わり umbrella): * pytest all greenれ + two data الجديدات اجرا процесса check(실제 stdout까지 모조 acceptance reports에 having addict 느끼)→가 commit and PROGRESS recordی remain; 사용자는 them독해서 있고 시점에 필요한하면 사 rights.

  • 品質がベースライン: 超えられてねっicism: 223táis 데, 当該モ организацион은82–86%, dpiも、l・こderr all 通済+stdio 스모ーク・tests ALL-STDIO-OK.

기술적 노트(mcp2.x)

依存関係:mcp==2.1.0: mcp.server.fastmcp.FastMCP is repeatedlymcp.server.mcpserver.MCPserverデ·계され (API compatibility is add_tool/tool decorator-based、and list_toolscall_tool/run_stdio_iio`(を含)).

Doc navigation:

  • docs/clients.md — successive client integration configs(Claude Code/Cursor/VSCode/Coderx(dependency)/Hermes mapping)

  • docs/SPEC.md — Executesはprotocolとstatistical口径(context등(wire返り値構造)/n産地send数值子protocol/※protocol・behavior contract)

  • docs/design/ —各ノ toolの install interface design(spec table/…;✓, JSON Schema,内外部method path) *docs/example_report.md` — auto_analysis*(case A)のサンプルレポート(変幻覚の鉄の説明).

Tools 구성

statlab_mcp/          # server.py(只注册工具+to_jsonable)+ tools/<组>_<工具>.py
docs/                  # SPEC.md(协议与统计口径)、design/(各工具接口设计文档)、clients.md(接入配置)
samples/               # 入库样例数据 + 生成脚本
tests/                 # pytest + fixtures 生成脚本
data/                  # 使用者亲手造的测试数据(gitignore,不入库)
reports/plots/         # 图片输出(gitignore,按日期归档可随时清理)

い — License

MIT(© 2026) Please 周翔宇).

A
license - permissive license
Not graded
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to perform statistical process control calculations using validated, deterministic tools such as control charts, capability analysis, and tolerance intervals.
    3
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    A statistical analysis MCP server offering 30 tools for descriptive statistics, hypothesis tests, regression, and time series, all returning Markdown reports with automatic interpretations to enable AI agents to perform comprehensive data analysis.
    MIT

View all related MCP servers

Related MCP Connectors

  • The statistical analyst in your AI chat — validated, citable, re-runnable analysis of your data.

  • Precision math engine for AI agents. 203 exact methods. Zero hallucination.

  • Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/good-boy4069/statlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server