Research Methods Library
Summary: A free, read-only MCP server that grounds AI assistants in ~19,000 sections from research methods textbooks, an R package, and articles—covering causal inference, econometrics, experimental design, marketing, credit scoring, ML, and AI.
Search the library (
search) — full-text search across all works, with filters for source and code language; returns section ids, links, snippets, and citations.Read a section (
fetch) — pull the full Markdown text of any section, including its code, URL, and citation (long sections come in parts).Recommend methods (
choose_method) — match a research question to 62 curated methods, with when each applies, key identifying assumptions, R/Python packages, and readings.Get runnable code (
get_code) — return R, Python, or Julia code for a named estimator, test, or modeling step, with the packages used.Format references (
cite) — produce deduplicated citations in APA, Chicago, MLA, Harvard, BibTeX, or RIS for sections or whole works.List sources (
list_sources) — show the works in the library with topics, languages, section counts, licenses, links, and how to cite them.Workflow support — built-in prompts (
plan_analysis,write_methods_section,explain_method) and resources (catalog, per-work tables of contents); no account, API key, or language model calls required.
Adds the Research Methods Library as an MCP server target through Amazon Bedrock AgentCore Gateway, allowing agents to access method recommendations, code snippets, section search/fetch, and citation formatting from the library.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Research Methods Library States raised the minimum wage in different years. How do I estimate the effect on teen employment?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 19,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.
Client | Configuration |
Claude (web, desktop, and mobile) | Settings → Connectors → Add custom connector; enter the endpoint |
Claude Code |
|
ChatGPT | Settings → enable developer mode → add a custom connector of type MCP server with the endpoint and no authentication |
Amazon Bedrock AgentCore | Add the endpoint as an MCP server target of an AgentCore Gateway, with no outbound authorization: |
Cursor, Visual Studio Code | Use the buttons above |
Windsurf, Cline, Zed, and other clients | Add the following JSON to the client's MCP configuration |
{
"mcpServers": {
"research-methods": {
"url": "https://research-methods-mcp.vercel.app/mcp"
}
}
}Related MCP server: Cognitive Canvas
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.

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
Tool | What it does |
| Matches a research question to methods, with when to use each, key assumptions, R and Python packages, and readings. 62 curated methods. |
| Finds sections across all works, with links, snippets, code languages, and a citation. Compatible with ChatGPT deep research. |
| Reads a section in full, with its code, link, and citation. Compatible with ChatGPT deep research. |
| Runnable R, Python, or Julia code for a task, with the packages it uses. |
| References in APA, Chicago, MLA, Harvard, BibTeX, or RIS for the sections consulted, deduplicated by work. |
| The 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, only anonymous daily totals of tool calls and client applications; see the privacy policy.
Sources
Work | Code | Sections | Served | License |
Python, R | 1,634 | Full text | CC BY-NC-SA 4.0 | |
R | 1,163 | Full text and function reference | GPL-3.0 | |
Python | 2,625 | Full text | CC BY 4.0 text, MIT code | |
Python, R | 1,997 | Excerpts and code; full text on the website | All rights reserved text, MIT code | |
Julia, Python | 6,266 | Excerpts and code; full text on the website | All rights reserved | |
Python, R | 1,834 | Full text | CC BY 4.0 | |
Python | 1,331 | Excerpts and code; full text on the website | All rights reserved | |
Python | 1,310 | Excerpts and code; full text on the website | All rights reserved | |
R | 1,118 | Full text | CC BY 4.0 text, MIT code | |
— | 7 | Abstracts, DOIs, and citations | Publishers' 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/mcpOr 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.
Usage analytics
Usage analytics are off by default. They are controlled by these environment variables:
Variable | Effect |
| Counts, per UTC day, connections by client application (the name the client reports, such as |
| Serves a private usage report at |
| Adds Vercel Web Analytics (cookieless page views) to the HTML pages. Enable Web Analytics in the Vercel project first. |
| Adds Google Analytics 4 ( |
The web analytics measure visits to the landing, privacy, and terms pages only; MCP traffic comes from AI providers' servers rather than browsers, so only the Redis counts measure it. The privacy page describes whichever of these are enabled. The maintainer's dashboard, which combines these counts with the book sites' analytics, is described in docs/DASHBOARD.md.
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 sitesTo 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.
Available Tools
6 toolschoose_methodRecommend analysis methodsARead-onlyIdempotentInspect
Recommend statistical, econometric, causal inference, or machine learning methods for a research question or data analysis task: which statistical test or model fits the data, how to estimate a causal or treatment effect, how to analyze an A/B test or experiment, how many observations are needed (power and sample size), how to handle panel, time-series, survey, text, or survival data, and how to build predictive or credit-scoring models. Describe the question, the data (cross-section, panel, time series, experiment), how the treatment or exposure was assigned, and the outcome. Returns candidate methods with when each applies, key assumptions, R and Python packages, and the library sections that teach them.
Inputs: question (required), limit, language.
citeFormat referencesARead-onlyIdempotentInspect
Format references for works in the library in APA, Chicago, MLA, Harvard, BibTeX, or RIS. Pass the ids of the sections you used to get a deduplicated reference list plus the section links, or pass source ids to cite whole works. With no ids, returns a reference for every work in the library.
Inputs: ids, style.
fetchRead a library sectionARead-onlyIdempotentInspect
Read one section of the library by its section id. Returns the section in Markdown with its code, the section URL, and the citation of the work it comes from. Long sections come in parts; the text names the id of the next part.
Inputs: id (required).
get_codeGet runnable R, Python, or Julia codeARead-onlyIdempotentInspect
Get runnable code from the library for a specific statistical, econometric, causal inference, or machine learning task, in R, Python, or Julia. Suited to requests for code that carries out a named estimator, test, or modeling step; it returns code with brief context, not an explanation of the method. Results can be restricted to one language or one work. Returns code blocks with the section they come from, the packages they use, a link, and a citation.
Inputs: topic (required), limit, source, language.
list_sourcesList the works in the libraryARead-onlyIdempotentInspect
List the works in the library (textbooks, an R package, and research articles) with their topics, code languages, section counts, licenses, links, and how to cite each one. Suited to questions about what the library covers or which work to consult. Takes no parameters and returns one entry per work.
Inputs: no named parameters.
searchSearch the research methods libraryARead-onlyIdempotentInspect
Search sections of textbooks and an R package on research methods and data analysis: statistics and hypothesis testing, regression and generalized linear models, causal inference (difference-in-differences, synthetic control, regression discontinuity, instrumental variables, matching, double machine learning), econometrics, experimental design, survey methods, marketing research, credit scoring, machine learning, and AI. Returns matching sections with their ids, a link, a snippet, the code languages they contain, and a citation.
Inputs: query (required), limit, source, language.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct role: list_sources enumerates works, search finds sections, fetch reads a section, choose_method recommends methods, get_code returns runnable code, and cite formats references. The potential overlap between search, choose_method, and get_code is well separated by description (finding vs. recommending vs. code retrieval). No two tools appear to do the same thing.
All names are snake_case and verb-led, which is predictable and readable. However, some follow a strict verb_noun pattern (list_sources, choose_method, get_code) while others are bare verbs (search, fetch, cite), a minor deviation from the stated convention.
Six tools cleanly cover the library's consultation workflow—discovery, retrieval, method recommendation, code access, and citation. Each tool earns its place with no redundancy or padding.
As a read-only reference library, the surface covers discovery (list_sources, search), retrieval (fetch), guidance (choose_method), code (get_code), and citation (cite) with no dead ends. The lifecycle for consulting a research methods library is fully covered.
Maintenance
Related MCP Connectors
A statistical analyst in your AI chat: bring data and a question, get a citable, re-runnable report.
Search peer-reviewed papers and research methodology guidance from your AI agent.
Query your data in plain English or SQL, build datasets, and fit Bayesian models.
Academic papers, reference verification and research data for AI agents.
Related MCP Servers
- AlicenseCqualityNot gradedmaintenanceAI-powered quantitative research assistant with 45 tools for causal inference methods (DID, RDD, IV, PSM), regression analysis, power calculations, and statistical code generation in R, Stata, and Python.50-
- AlicenseNot gradedqualityDmaintenanceTransforms AI assistants into research-grade cognitive workspaces with systematic reasoning, evidence-based analysis, persistent memory management, and intelligent knowledge discovery.MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to call statistician's decision logic for recommending statistical tests, checking assumptions, interpreting results, and planning sample sizes.6MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI-native statistical analysis and reproducible research workflows through MCP, including natural language planning, protocol-based analysis, Python/R cross-validation, and publication-ready figure generation.MIT