[圖片]
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 19,000 sections from 9 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]
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
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
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
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
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.