Research Methods Library

io.github.mikenguyen13由 GitHub 帳號 mikenguyen13 發布v0.1.1更新於 Oct 24, 2026

Research methods for AI assistants: study design guidance, R and Python code, and citations

已驗證Streamable HTTP可網頁執行知識與記憶開發者工具資料與分析

概覽

AI 產生的概覽

遠端 MCP 伺服器,為助理提供研究方法文獻依據:方法建議、可執行的 R/Python/Julia 程式碼與格式化引用。

可以做什麼
  • 檢索並閱讀統計學、計量經濟學與因果推論教材、R 套件及文章的章節
  • 針對研究問題建議統計、計量、因果推論或機器學習方法,並說明假設與可用套件
  • 取得指定估計量、檢定或建模步驟的可執行 R、Python 或 Julia 程式碼
  • 為所用章節產生 APA、Chicago、MLA、Harvard、BibTeX 或 RIS 格式的參考文獻
  • 列出資料庫中的著作及其主題、程式語言、授權與連結
適用情境
適合助理協助研究設計、選擇統計或因果推論方法、撰寫方法章節,或為經濟學、行銷、信用評分與機器學習等實證研究產生程式碼與引用時使用。
執行需求
在支援 MCP 的用戶端中將遠端端點新增為自訂連接器;不需帳號或 API 金鑰。也可用 Docker 或 Node.js 自行架設。
安裝前請注意
所有工具皆為唯讀,伺服器不儲存使用者資訊;但部分著作僅提供摘錄且為保留所有權利授權,重複使用文字或程式碼前請確認授權與出版方條款。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Research Methods Library,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.mikenguyen13%2Fresearch-methods-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "research-methods-library": {
      "type": "http",
      "url": "https://research-methods-mcp.vercel.app/mcp"
    }
  }
}

README

[圖片]

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]

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
json
{  "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,635Full 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,639Full textCC BY 4.0 text, MIT code
Marketing Research: A Technical and Academic TreatmentPython, R1,842Excerpts and code; full text on the websiteAll rights reserved text, MIT code
AI in Action: A Reference for Artificial IntelligenceJulia, Python5,978Excerpts 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,345Excerpts 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
Social Science Theory: A Field Guide to the Theories, Effects, and Frameworks Behind Research and BusinessR1,118Full textCC BY 4.0 text, MIT code
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

bash
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

bash
npm cinpm run build:index   # parse the book repositories (sibling folders) into data/index.json.gznpm run build         # bundle dist/stdio.js and dist/http.jsnpm test              # end-to-end tests through real MCP clientsnpm 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.

來源:README.md,提交 8e91b5b

工具

6

fetch

Read a library section

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.

輸入參數id必填

choose_method

Recommend analysis methods

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.

輸入參數limitlanguagequestion必填

get_code

Get runnable R, Python, or Julia code

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.

輸入參數limittopic必填sourcelanguage

cite

Format references

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.

輸入參數idsstyle

list_sources

List the works in the library

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.

無需輸入參數。

版本歷史

2
  1. v0.1.1最新Oct 16, 2026
  2. v0.1.0Oct 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分