methods-mcp

io.github.FlynnLachendro由 GitHub 账号 FlynnLachendro 发布v0.1.7更新于 Oct 27, 2026

MCP server for structured methods extraction + reproducibility heuristics on academic papers.

概览

AI 生成的概览

本地 MCP 服务器,可将论文链接、arXiv ID 或 DOI 转为结构化方法步骤、代码仓库发现与启发式可复现性评估。

可以做什么
  • 解析论文并获取全文:根据链接、arXiv ID 或 DOI 获取规范元数据,并抓取全文与章节切分(优先 ar5iv HTML,回退 PDF)
  • 提取与总结:由大模型驱动、经模式校验的方法提取(步骤、试剂、设备、分析、置信度),以及三种深度的摘要
  • 查找代码并评估可复现性:发现论文关联的代码仓库,并仅凭 GitHub 元数据打分,不克隆、不执行
  • 一键综合评审:单次调用返回元数据、方法、仓库与可复现性评估,并附通俗叙述与状态
  • 检查服务器健康与配置
适用场景
适合需要快速筛查论文的场景:让助手抽取方法步骤、定位作者代码,并快速判断仓库看起来是否可复现,全程无需克隆或运行代码。
运行要求
以 stdio 方式在本地运行,可通过 uvx、uv 或 pip 从 PyPI 安装。LLM 工具(extract_methods、summarize_paper、methods_repro_review)需要 ANTHROPIC_API_KEY;GITHUB_TOKEN 可选但建议设置以提高 GitHub 速率上限;METHODS_MCP_MODEL 可覆盖默认 Claude 模型。需能访问 arXiv、GitHub、Papers With Code 与 Anthropic API。
安装前请注意
论文正文会发送至 Anthropic API,仓库查询会发往 GitHub API,两个密钥均从环境变量读取。含提示注入内容的论文可能产生错误但符合模式的方法输出;可复现性分数是未校准的启发式信号,并非证明。项目处于 alpha 阶段,建议锁定具体版本。设计用于本地 stdio,HTTP/SSE 传输仅应在可信网络中使用。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

methods-mcp

[PyPI] [Python] [License: MIT]

Lightweight, on-demand MCP server for structured methods extraction + reproducibility heuristics on academic papers. Built for the Worldwide AI Science Fellowship build challenge.

⚠️ Status: alpha (0.1.x). The tool surface and output shapes may shift between minor versions. Pin to an exact version in production. Bug reports very welcome via GitHub Issues.

Quick demo

text
$ uvx --from methods-mcp methods-mcp --versionmethods-mcp 0.1.6
# In a Claude Code session:> /mcp add methods-mcp methods-mcp> Run methods_repro_review on https://arxiv.org/abs/2509.06917
  → tool: methods_repro_review({"input_str":"https://arxiv.org/abs/2509.06917"})
# Returns a MethodsReproReview object. Read `narrative` first — it explains# everything else in plain English, so no tool-learning is required:
{  "status": "ok",  "narrative":    "Resolved the paper: 'Paper2Agent' by Miao et al. (arxiv 2509.06917, "    "2025-09-08). Extracted 11 methods steps at moderate self-reported "    "confidence (0.72) — the procedure is clearly described but hyperparameters "    "and software versions are absent. Detected the associated code repository "    "https://github.com/jmiao24/Paper2Agent from an inline link in the paper "    "text (detection confidence 0.94). The repo scored 0.90/1.00 on the "    "reproducibility heuristic — verdict: likely reproducible. Present signals: "    "substantive README, dependencies file, notebooks, figure-plotting script, "    "recent activity, permissive license. Missing: data/fixtures directory. "    "Suggested entrypoint: `python make_figures.py`.",  "metadata":          { ... },   # PaperMetadata  "methods":           { ... },   # MethodsStructured (null if extraction failed)  "code_repo":         { ... },   # CodeRepo           (null only if input unresolvable)  "repro_assessment":  { ... },   # ReproAssessment   (null if no repo detected)  "errors":            []         # [{step, error_type, message, hint}] on partial}

methods-mcp is a small, sharply-scoped Model Context Protocol server. It gives any AI agent (Claude Code, Claude Desktop, your Agent SDK script, etc.) eight tools that turn an academic paper URL into:

  • canonical metadata,
  • best-effort full text + section split,
  • a Pydantic-validated structured methods object (steps / reagents / equipment / analyses),
  • the paper's associated code repository (best-effort discovery),
  • a no-execution-required reproducibility verdict for that repo, and
  • a multi-mode summary.

The wedge: heavyweight pipelines like Paper2Agent (Stanford) take 30 minutes to hours to digest a paper into agent-ready tools. methods-mcp is the agent-callable, on-demand complement — every tool returns in seconds, no clone, no execution.


Install

bash
uv add methods-mcp# or, install globally:uv tool install methods-mcp# or, classic pip:pip install methods-mcp

API keys

For best performance, set both:

VariableRequired?What you get without it
ANTHROPIC_API_KEYRequired for extract_methods, summarize_paper, methods_repro_reviewThose tools raise RuntimeError: ANTHROPIC_API_KEY not set. Non-LLM tools (fetch_paper_text, find_code_repo, assess_repo_reproducibility) still work fine.
GITHUB_TOKENOptional but recommended for assess_repo_reproducibility / methods_repro_reviewYou're capped at the GitHub unauthenticated rate limit (60 req/hr per IP). Each repo assessment is ~3 calls, so you'll hit the ceiling after ~15–20 repos/hr. With a token: 5,000 req/hr (effectively unlimited).
bash
export ANTHROPIC_API_KEY=sk-ant-...export GITHUB_TOKEN=ghp_...          # optional but recommended

Neither key is logged or persisted — they're sent only to api.anthropic.com and api.github.com respectively. See SECURITY.md.

Use it from Claude Code

/mcp add methods-mcp methods-mcp

Then in any Claude Code chat:

Take https://arxiv.org/abs/2509.06917 and run methods_repro_review. Summarise what the paper does, the methods steps, and how reproducible the repo looks.

Use it from the Claude Agent SDK

python
from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient
options = ClaudeAgentOptions(    mcp_servers={        "methods-mcp": {            "type": "stdio",            "command": "methods-mcp",            "args": [],        }    },    allowed_tools=["mcp__methods-mcp__methods_repro_review"],)
async with ClaudeSDKClient(options=options) as client:    await client.query(        "Run methods_repro_review on https://arxiv.org/abs/2509.06917 "        "and tell me whether the repo looks reproducible."    )    async for msg in client.receive_response():        print(msg)

Tools

ToolWhat it does
healthServer liveness + config check.
get_paper_metadata(input_str)Resolve URL / arXiv ID / DOI to canonical metadata. arXiv inputs hit the arXiv export API for title/authors/abstract.
fetch_paper_text(input_str, prefer="auto"|"html"|"pdf")Full text + section split. Defaults to ar5iv HTML for arXiv papers (cheap, structured), PDF fallback otherwise.
extract_methods(input_str, model=None)LLM-driven, Pydantic-validated structured methods extraction. Returns {steps, reagents, equipment, analyses, confidence}.
find_code_repo(input_str)Discover the paper's code repo via paper text → abstract → Papers With Code.
assess_repo_reproducibility(repo_url, paper_id=None)Heuristic, no-clone reproducibility assessment via the GitHub REST API. Weighted signals (README, deps, fixtures, notebooks, figure scripts, recent maintenance, license) → {verdict, score, recommended_entrypoint}.
summarize_paper(input_str, mode="tldr"|"abstract"|"exec")LLM summary in three depths.
methods_repro_review(input_str)Composite — metadata + methods + repo + repro in one call.

All tools return Pydantic v2 models (validated, JSON-serialisable). See src/methods_mcp/schemas.py for the full type surface.

Design notes

  • extract_methods uses Anthropic tool-use to coerce the model into emitting an instance of the MethodsStructured Pydantic schema. On validation failure we send one repair message with the validation error and try again before raising.
  • assess_repo_reproducibility does not clone or execute anything. It scores the repo from publicly-readable GitHub metadata + the recursive tree listing. This is the deliberate wedge against batch tools that try to actually rerun the paper.
  • fetch_paper_text prefers ar5iv HTML over PDF parsing for arXiv papers. Falls back to pypdf for non-arXiv inputs.
  • The default model is claude-sonnet-4-6. Override via METHODS_MCP_MODEL env var or per-call model= arg.
  • methods_repro_review returns a self-describing response. Every call sets a top-level status ("ok" / "partial" / "empty") and a narrative string that summarises everything retrieved in plain English — including every numeric score in context. A reader who reads only narrative + status gets the full picture without needing to learn the sub-object shapes. Sub-objects can be null when unavailable (e.g. repro_assessment: null on a paper with no detected repo — status stays "ok" because "no repo" isn't a failure). Failed sub-steps contribute a structured entry to errors with {step, error_type, message, hint}, where hint is an actionable plain-English suggestion for recognised patterns (missing API keys, rate-limits, 404s, timeouts, etc.) and null otherwise.

Scores & verdicts explained

Tool outputs contain three numeric fields that look similar but mean very different things. They are triage signals for an agent deciding whether a paper is worth digging into, not calibrated claims about correctness.

FieldRangeHow it's computedHow to read it
methods.confidence0–1LLM self-report. The extractor model sets it per instructions in the system prompt: ≥0.8 only if the paper gives explicit reagents/volumes/equipment, ~0.3 if the methods section is sparse. Uncalibrated.Soft signal for "is this a wet-lab paper with concrete procedure, or a sparse systems paper?" Useful as a flag; don't treat as a trust percentage.
code_repo.confidence0–1Varies by detection_method. papers-with-code: fixed 0.95 (authoritative paper→repo API). paper-text: computed as 0.6 + 0.2·(strong-phrase-present) + 0.015·score_margin, capped at 0.95. abstract-link: fixed 0.85. none: 0.0.Tells you how the repo was found and how decisively. High score + paper-text means a strong phrase like "code is available at …" sat next to the URL.
repro_assessment.overall_score0–1Weighted sum of 8 binary signals, all computed from the GitHub REST API (no clone, no execution): has_readme (0.10), readme_substantial (0.15), has_dependencies_file (0.20), has_data_or_fixtures (0.10), has_notebook (0.10), has_figure_script (0.20), actively_maintained (0.10), permissive_license (0.05). Each present signal contributes its weight.The only fully-deterministic score of the three. Still a heuristic, not a proof — a high score means the repo looks well-structured for reproduction. For actual validation see Paper2Agent.

Verdict buckets (repro_assessment.verdict) are thresholds on overall_score:

VerdictScoreMeaning
likely-reproducible≥ 0.70Most repro-friendly signals present. Worth trying to run.
partial≥ 0.45Some infrastructure, likely gaps. Expect to fill in missing pieces.
unlikely≥ 0.20Minimal signal. Possible code dump without the scaffolding to rerun it.
insufficient-info< 0.20 or repo unreachableNot enough to tell. Don't draw conclusions either way.

Enum values you'll see in outputs:

  • code_repo.detection_method: paper-text | abstract-link | papers-with-code | metadata | none
  • metadata.source: arxiv | biorxiv | doi | url | unknown

Security & limitations

What this server actually does when you install and run it:

  • Network calls only to: export.arxiv.org, ar5iv.labs.arxiv.org, arxiv.org (PDFs), api.github.com, paperswithcode.com, api.anthropic.com. No telemetry, no analytics, no phone-home.
  • Reads ANTHROPIC_API_KEY (required for LLM tools) and optionally GITHUB_TOKEN from environment variables. These are sent only to Anthropic / GitHub respectively. Never logged, never persisted to disk.
  • Writes nothing to your filesystem. No cache directories, no downloaded PDFs, no temp files.
  • Executes no user-supplied code. No eval, exec, subprocess, pickle.loads, or shell-outs. The reproducibility tool deliberately does not clone or run repositories — it scores from the GitHub REST API only.

Limitations to be aware of:

  • Adversarial papers may produce misleading structured output. The extract_methods tool sends paper text to Claude. A paper containing prompt-injection content could yield wrong (but schema-valid) structured methods. Treat the output as a research aid, not ground truth.
  • The reproducibility verdict is a heuristic, not a proof. A high score means the repo looks well-structured for reproduction; it does not guarantee that running the code reproduces the paper. For full validation see Paper2Agent.
  • Intended for local stdio use. The HTTP/SSE transports are provided for development convenience but should only be exposed on trusted networks (no SSRF protection beyond what httpx provides).

Reporting issues:

Security issues: please email [email protected] (also see SECURITY.md). Functional bugs: open a GitHub issue.

Pair with paper-mcp

For broader paper search / citation graph tooling, run paper-mcp (Bhvaik) alongside in the same Claude Code session. paper-mcp does title-keyed search, full-text fetch, citations, and references; methods-mcp adds the structured-methods + reproducibility layer on top. The two were intentionally designed to compose.

Develop locally

bash
git clone https://github.com/FlynnLachendro/methods-mcpcd methods-mcpuv sync --extra dev --extra agent
uv run pytest                      # 49 tests, offline (respx-mocked httpx + unittest.mock for Anthropic)uv run ruff format .uv run ruff check . --fixuv run mypy src
uv run methods-mcp --help

License

MIT — see LICENSE.

Acknowledgements

Built for the Worldwide AI Science Fellowship inaugural cohort. Thanks to Michael Raspuzzi for the open-ended brief.

Built on:

来源:README.md,提交 c3e4794

工具

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

版本历史

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

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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