mcpField
R
Research Methods Library

Research Methods Library

Remote
github.comScience & Education0Updated 1d ago

About Research Methods Library

Research Methods Library is an MCP server for researchers and analysts seeking method guidance grounded in methodological texts. It recommends designs with assumptions, runnable code, and citations for sources consulted.

Key features

  1. 01Research-method recommendations
  2. 02Assumptions and scope conditions
  3. 03Runnable R and Python code
  4. 04Search and retrieve source sections
  5. 05Formatted citations in multiple styles
  6. 06Read-only tools and catalog resources

Use cases

  1. 01Choose a design for a causal question
  2. 02Generate code for a statistical analysis
  3. 03Find cited methods for a research paper
  4. 04Draft a methods section with references

MCP support

The server provides research-method tools, prompts, and library resources to MCP-compatible clients. Its tools search and fetch indexed material, recommend methods, return code, and format citations.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://research-methods-mcp.vercel.app/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

6
ParameterTypeRequiredDescription
limitintegerNoNumber of results (default 8).
querystringYesWhat to look for, in plain words, e.g. "staggered difference-in-differences with never-treated controls".
sourceenumNoLimit to one work: data_analysis (A Guide on Data Analysis); causalverse (causalverse: The All-in-One Causal Inference Toolkit); credit_score (Credit Scoring: Theory, Methods, and Practice); marketing_research (Marketing Research: A Technical and Academic Treatment); ai_in_action (AI in Action: A Reference for Artificial Intelligence); advanced_data_analysis (Advanced Data Analysis); tidy_finance_vn (Applying Tidy Finance with Python to Vietnam); tidy_finance_vn_vi (Tài Chính Ứng Dụng với Python); mlpy (Machine Learning in Python); publications (Research Articles and Publications).data_analysis | causalverse | credit_score | marketing_research | ai_in_action | advanced_data_analysis | tidy_finance_vn | tidy_finance_vn_vi | mlpy | publications
languageenumNoPrefer sections with code in this language.r | python | julia

Details

From the project README

README image

Research Methods Library

A Model Context Protocol server that grounds AI assistants in methodological texts: study design recommendations, identifying assumptions, runnable R and Python code, and a citation for every source.

MIT license MCP: streamable HTTP

The Research Methods Library is a Model Context Protocol (MCP) server. Given a research question, it recommends candidate designs, states their identifying assumptions, returns runnable R and Python code, and supplies a formatted citation for every source consulted. Its index contains approximately 17,000 sections from 8 books, an R package, and the author's research articles (listed under Sources) covering causal inference, econometrics, experimental design, marketing research, credit scoring, machine learning, and artificial intelligence.

The server works with Claude, ChatGPT, Amazon Bedrock AgentCore, Cursor, Visual Studio Code, and any other MCP-compatible client. Access is free and requires no account or API key.

Installation

Endpoint: https://research-methods-mcp.vercel.app/mcp. Access is free and requires no account or API key.

Add to Cursor Install in VS Code

ClientConfiguration
Claude (web, desktop, and mobile)Settings → Connectors → Add custom connector; enter the endpoint
Claude Codeclaude mcp add --transport http research-methods https://research-methods-mcp.vercel.app/mcp
ChatGPTSettings → enable developer mode → add a custom connector of type MCP server with the endpoint and no authentication
Amazon Bedrock AgentCoreAdd the endpoint as an MCP server target of an AgentCore Gateway, with no outbound authorization: agentcore add gateway-target --name research-methods --type mcp-server --endpoint https://research-methods-mcp.vercel.app/mcp --gateway <gateway>, then agentcore deploy
Cursor, Visual Studio CodeUse the buttons above
Windsurf, Cline, Zed, and other clientsAdd the following JSON to the client's MCP configuration
{
  "mcpServers": {
    "research-methods": {
      "url": "https://research-methods-mcp.vercel.app/mcp"
    }
  }
}

Example queries

States raised the minimum wage in different years. How do I estimate the effect on teen employment?

For this query the assistant calls choose_method, which returns staggered difference-in-differences together with its scope conditions, the reason a conventional two-way fixed-effects regression can be biased when treatment effects are heterogeneous, the assumptions to verify, implementations in R (did, fixest, didimputation, HonestDiD) and Python (csdid, pyfixest, differences), and the relevant readings.

The query above answered in Claude through the connector, followed by a request for BibTeX references

Give me Python code for a probability-of-default model with gradient boosting.

Only California passed the law and I have 30 years of state data. What can I do?

Write the methods section for my regression discontinuity and give me BibTeX for the sources.

Each response links to the specific section consulted and carries the citation of the work from which it is drawn.

Tools

ToolWhat it does
choose_methodMatches a research question to methods, with when to use each, key assumptions, R and Python packages, and readings. 62 curated methods.
searchFinds sections across all works, with links, snippets, code languages, and a citation. Compatible with ChatGPT deep research.
fetchReads a section in full, with its code, link, and citation. Compatible with ChatGPT deep research.
get_codeRunnable R, Python, or Julia code for a task, with the packages it uses.
citeReferences in APA, Chicago, MLA, Harvard, BibTeX, or RIS for the sections consulted, deduplicated by work.
list_sourcesThe works in the library (textbooks, an R package, and research articles), with topics, languages, licenses, and links.

Prompts (slash commands in clients that support them): plan_analysis, write_methods_section, explain_method. Resources: the library catalog and a table of contents for each work.

All tools are read-only. The server makes no calls to language models and stores no information about its users; see the privacy policy.

Sources

WorkCodeSectionsServedLicense
A Guide on Data AnalysisPython, R1,611Full textCC BY-NC-SA 4.0
causalverse: The All-in-One Causal Inference ToolkitR1,163Full text and function referenceGPL-3.0
Credit Scoring: Theory, Methods, and PracticePython2,578Full textCC BY 4.0 text, MIT code
Marketing Research: A Technical and Academic TreatmentPython, R1,820Excerpts and code; full text on the websiteAll rights reserved text, MIT code
AI in Action: A Reference for Artificial IntelligenceJulia, Python5,750Excerpts and code; full text on the websiteAll rights reserved
Advanced Data AnalysisPython, R1,844Full textCC BY 4.0
Applying Tidy Finance with Python to VietnamPython1,334Excerpts and code; full text on the websiteAll rights reserved
Tài Chính Ứng Dụng với PythonPython1,309Excerpts and code; full text on the websiteAll rights reserved
Machine Learning in PythonPython361Full textCC BY-SA 4.0
Research Articles and Publications—7Abstracts, DOIs, and citationsPublishers' terms

Sections of A Guide on Data Analysis that appear in the Springer print volumes are cited as their published chapter, then the volume. For example, a section on causal inference is cited as Nguyen, M. (2025). Causal inference. In Experimental design (Vol. 4, pp. 7–48). Springer Cham. https://doi.org/10.1007/978-3-032-01839-7_2, in Nguyen, M. (2025). Experimental design (Vol. 4). Springer Cham. https://doi.org/10.1007/978-3-032-01839-7

Method

The source files of each work (.Rmd, .qmd, .Rd) are parsed into a single index of sections, code blocks, and citations. During index construction every link is verified against the published website: a section whose anchor is absent links to its chapter page, and unpublished pages are excluded. Queries are answered from the in-memory index; no database or language model is involved.

Self-hosting

docker build -t research-methods-mcp .
docker run -p 8080:8080 research-methods-mcp     # http://localhost:8080/mcp

Or with Node.js: npm ci && npm run build && npm start (listens on 127.0.0.1:8787; set HOST and PORT to change). The same handler runs on Vercel through api/index.mjs and vercel.json (the hosted endpoint) and on Deno Deploy through src/deno.ts.

Development

npm ci
npm run build:index   # parse the book repositories (sibling folders) into data/index.json.gz
npm run build         # bundle dist/stdio.js and dist/http.js
npm test              # end-to-end tests through real MCP clients
npm run check-links   # audit every link in the index against the live sites

To add a book, add an entry to sources.yml and rebuild the index. To add or tune a method, edit methods.yml; the build fails if a method points at a section that does not exist.

Citation

Users are asked to cite the works they draw on; the cite tool formats the references. To cite the server itself, see CITATION.cff.

License

The server code is MIT licensed. The content it returns keeps each work's own license, listed above and by the list_sources tool.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.