
ClaudeR
by IMNMV·★ 227·综合分 51
ClaudeR 连接 RStudio 与基于 MCP 的 LLM 代理,实现交互式编程、多智能体编排和自动文稿审核。
概述
ClaudeR 是一个 R 包,在 RStudio 与配置了 MCP 的 LLM 代理(如 Claude Code、Codex 或 Qwen Code)之间建立直接连接。它支持交互式编程会话,让 AI 代理能在 RStudio 环境中实时执行 R 代码、查看输出和分析图表。该包支持多智能体协调,允许多个 AI 代理在一个脚本上协作,或在不同的 RStudio 窗口中独立运行,保持环境隔离。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要将 RStudio 连接到多个 LLM 智能体进行交互式编码、手稿审核或多智能体数据分析工作流时,选择 ClaudeR。
什么时候不要选它
如果您需要对外部系统进行写入访问(主要专注于 R 执行和分析),或者您不使用 R/RStudio 生态系统,则不要选择 ClaudeR。
此 server 暴露的工具
从 README 抽取出 12 个工具execute_rExecute R code and return the output.
execute_r_with_plotExecute R code that generates a plot that the model can see.
execute_r_asyncExecute long-running R code asynchronously and returns a job ID.
get_async_resultPoll for the result of an asynchronous job.
list_sessionsList all active RStudio sessions the agent can connect to.
connect_sessionConnect to a specific RStudio session by name.
get_session_historyView execution history filtered by agent ID.
read_fileRead any text file from disk without needing it open in RStudio.
get_active_documentGet the content of the active document in RStudio.
modify_code_sectionModify a specific section of code in the active document.
insert_textInsert text at the current cursor position or specific line/column.
get_viewer_contentRead HTML content from the viewer pane (plotly, DT, leaflet widgets).
可对比工具
安装
安装
# 使用 devtools 安装
if (!require("devtools")) install.packages("devtools")
devtools::install_github("IMNMV/ClaudeR")
# 设置您的 AI 工具
library(ClaudeR)
install_clauder() # 用于 Claude Desktop / Cursor
install_cli(tools = "claude") # 用于 Claude Code CLI
# 在 RStudio 中启动服务器
claudeAddin()对于 Claude Desktop 配置,添加到 Claude Desktop 的 config.json 文件中:
{
"mcpServers": {
"clauder": {
"command": "Rscript",
"args": ["-e", "library(ClaudeR); claudeServe()"],
"env": {
"R_PROFILE_USER": ""
}
}
}
}FAQ
- 支持哪些 LLM 代理?
- ClaudeR 支持 Claude Code、Codex、Gemini CLI、Qwen Code 和任何其他基于 MCP 的 LLM 代理。它还支持 Ollama,用于私有、离线标注。
- 多个 AI 代理可以在同一个 R 会话中工作吗?
- 是的,ClaudeR 具有内置的多智能体协调协议,允许多个代理通过 R 环境中的共享消息板共享同一个 RStudio 会话。
ClaudeR 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。