Skip to main content

Lightweight, on-demand MCP server for structured methods extraction and reproducibility heuristics on academic papers.

Project description

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.

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

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

Set your Anthropic API key (used by the LLM-driven extraction tools):

export ANTHROPIC_API_KEY=sk-ant-...
# Optional — raises GitHub REST API rate limit for repro assessment:
export GITHUB_TOKEN=ghp_...

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.

See examples/claude_code_demo.md for more session prompts.

Use it from the Claude Agent SDK

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)

A complete runnable example lives in examples/reflexive_demo.py.

Tools

Tool What it does
health Server 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.

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

git clone https://github.com/FlynnLachendro/methods-mcp
cd methods-mcp
uv sync --extra dev --extra agent

uv run pytest                      # 29 tests, offline
uv run ruff format .
uv run ruff check . --fix
uv run mypy src

uv run methods-mcp --help

Project notes

project-thoughts.md (in this repo) is a running log of what we tried, what stuck, and what we cut while building this. Honest write-up for the WWSF Loom narration.

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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

methods_mcp-0.1.0.tar.gz (131.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

methods_mcp-0.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file methods_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: methods_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 131.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for methods_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 013c6d1d7e82cb7834d914aa041bf7a683d6ac4f92319626fc5789a44c6079d8
MD5 b02cabead42dbf8f3bfe3bd196a1cabc
BLAKE2b-256 1b2649167294d2d68b257e633ea70135aee16540d0867dc1f1a08c0b90f9c719

See more details on using hashes here.

File details

Details for the file methods_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: methods_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for methods_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d638b32ff451c51404e06b1a8f7e396787be6fe2e7d0cfc114b0611f62af5637
MD5 95941c69c3cfbf195a026b55e7fa3661
BLAKE2b-256 84bf80a1cf03e253c1ed5a02d02171df983c0b08865209f51219dba0b3f93a34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page