Golden Dataset Mcp

io.github.nipunkhanderia由 GitHub 账号 nipunkhanderia 发布v0.1.2更新于 Oct 24, 2026

Version-controlled golden datasets and RAG evaluation, no API key needed.

概览

AI 生成的概览

在对话中管理带版本控制的金标准问答数据集,并用 TF-IDF 相似度为 RAG/LLM 回答打分。

可以做什么
  • 数据集管理:在指定路径初始化数据集,新增、修改、删除问答条目,列出工作区或已提交版本的条目
  • 版本控制:把工作区快照为不可变版本,比较两个版本的差异,查看当前版本、规模与历史
  • 评估打分:用 TF-IDF 余弦相似度将实际回答与某个版本比对,返回平均相似度与逐条通过情况
  • 所有工具都要求显式传入数据集路径,单个实例可同时处理多个数据集且不保留会话状态
适用场景
适合为 RAG 或 LLM 流水线维护金标准问答集,并希望由助手来添加用例、提交版本、比较各次发布差异的场景。也适合无需调用 LLM 的自动化评估流程。
运行要求
以 Python 包通过 pip 安装,本地以 stdio 方式运行,会一并安装 golden-dataset-studio 与 scikit-learn。无需 API 密钥、环境变量或额外配置。数据集以 JSON/JSONL 文件形式存放在所给的数据集路径下。
安装前请注意
相关工具会在本地文件系统写入、修改、删除条目并创建版本,请确认数据集路径指向预期目录。评估基于 TF-IDF 词面重合度而非深层语义,过短或仅含停用词的回答可能导致打分失败。不做远程存储或同步。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Golden Dataset Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-name: io.github.nipunkhanderia/golden-dataset-mcp

golden-dataset-mcp

An MCP server wrapping golden-dataset-studio — version-controlled golden dataset management and semantic evaluation for RAG/LLM pipelines.

This is a thin protocol layer over the existing golden_dataset library (DatasetStore, Evaluator). It does not reimplement any logic — it exposes the library's existing Python API as MCP tools so an agent (Claude Desktop, Claude Code, or any MCP client) can manage golden datasets conversationally.

No LLM API key required. Evaluation uses TF-IDF cosine similarity (scikit-learn), not an LLM call.

Why a separate package from golden-dataset-studio?

golden-dataset-studio is a CLI tool — designed for a human typing golden add, golden commit, etc. in a terminal. golden-dataset-mcp exposes the same underlying operations as MCP tools so an LLM agent can drive them programmatically, e.g. as part of an automated RAG evaluation pipeline. Keeping them as separate PyPI packages means CLI users aren't forced to pull in fastmcp as a dependency, and MCP users get a clean, protocol-focused package.

Tools

ToolWhat it does
init_datasetInitialise a new dataset at a given path
add_entryAdd a question/answer pair to the working tree
update_entryEdit fields of an existing working-tree entry
delete_entryRemove an entry from the working tree
list_entriesList working-tree or committed-version entries
commit_versionSnapshot the working tree as a new immutable version
diff_versionsShow entries added/removed/changed between two versions
evaluate_answersScore actual answers against a version via TF-IDF cosine similarity
dataset_statusShow current version, working tree size, and version history

Design: every tool takes an explicit dataset_path

Unlike the CLI (which operates on the current working directory), every tool here requires an explicit dataset_path parameter. This keeps the server fully stateless between calls — no hidden "current dataset" session state to lose track of, and safe for one server instance to manage multiple datasets or serve multiple concurrent clients.

Installation

bash
pip install golden-dataset-mcp

This pulls in golden-dataset-studio and scikit-learn automatically as dependencies.

Usage with Claude Desktop / Claude Code

json
{  "mcpServers": {    "golden-dataset": {      "command": "golden-dataset-mcp"    }  }}

No environment variables needed — no API key, no config.

Example flow

1. init_dataset(dataset_path="./my-rag-eval", name="support-bot-eval")2. add_entry(dataset_path="./my-rag-eval", question="...", answer="...")   [repeat for each golden Q&A pair]3. commit_version(dataset_path="./my-rag-eval", description="initial 50 questions")4. [run your RAG pipeline, collect actual answers]5. evaluate_answers(dataset_path="./my-rag-eval", actual_answers=[...])   -> avg_semantic_similarity, per-entry scores, pass/fail

As your RAG pipeline changes over time, commit_version again after edits and use diff_versions to see exactly what changed in your golden set between releases.

Relationship to the underlying library

golden-dataset-studiogolden-dataset-mcp
InterfaceCLI (golden ...)MCP tools
Driven byA human typing commandsAn LLM agent / MCP client
Path handlingCurrent working directoryExplicit dataset_path per call
Dependency direction—Depends on golden-dataset-studio

If you want the human-driven CLI, use golden-dataset-studio directly. If you want an agent to drive it, use this package.

Development

bash
git clone https://github.com/nipunkhanderia/golden-dataset-mcpcd golden-dataset-mcppip install -e ".[dev]"pytest -v

Validate the MCP-facing contract:

bash
npx @modelcontextprotocol/inspector golden-dataset-mcp

Limitations

  • evaluate_answers uses TF-IDF cosine similarity, which captures lexical overlap better than deep semantic meaning. For embedding-based or RAGAS-style metrics, call the underlying library's Evaluator.ragas_evaluate() directly (requires pip install "golden-dataset-studio[ragas]" — not exposed as an MCP tool in this version).
  • Very short or stop-word-only answers will raise an error. scikit-learn's TF-IDF vectorizer raises ValueError: empty vocabulary on inputs like a bare "4" or "the a an". Avoid single-token golden answers, or expect evaluate_answers to fail on them.
  • All state is filesystem-backed JSON/JSONL under <dataset_path>/.golden_dataset/; this server does no remote storage or syncing.

License

MIT

来源:README.md,提交 8c58469

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分