Connect RStudio to AI assistants for interactive R coding and data analysis.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Connect a live R or Python session, in RStudio or Positron, to Claude Code, Codex, or any MCP-based LLM agent. For interactive analysis, multi-agent orchestration, and automated manuscript auditing.
ClaudeR connects MCP-configured LLM agents, like Claude Code or Codex, to the R session you are already working in. The agent runs code where your cleaned data and fitted models actually are, sees the plots it draws, reads the objects in your environment, and can edit the file open in your editor. A companion Python package does the same for a live Python session, and both work in RStudio and Positron.
Several agents can share one session and divide the work between them, or you can run separate sessions side by side so each agent works on its own dataset without touching the others.
It covers much of what a paid research AI tool does, with the work happening in your own session and a record of every line an agent ran.
AI agents: See llms-install.md for automated setup instructions.
| Single agent via Claude Desktop App | Multi-agent: Codex + Claude Code via CLI | GPT 5.4 Codex: Data analysis + Quarto report |
|---|---|---|
![]() | ![]() | ![]() |
Console logging from the addin fixed (R 0.14.2). Ticking "Also log my own console commands" in the addin armed nothing on 0.14.1, while calling start_console_logging() in the console worked. Cause: globalCallingHandlers() (used to observe warnings and messages) can only be called with an empty handler stack, and inside the Shiny observer that handles the checkbox it errors, which aborted the function before the console callback was registered. The callback is now registered first and unconditionally; the handlers are installed only when logging is started from the console, and otherwise warnings are read from last.warning after each command. Started from the addin, message() output is the one thing not captured, and the addin says so.
Control what reaches the agent, and stop sending plots nobody saw (R 0.15.0 / clauder-mcp 0.15.0). From two user requests. A new AGENT CONTEXT panel in the addin does two things. "Send plots to the agent automatically" can be turned off: the agent is told a plot was drawn and asks for it with execute_r_with_plot, saving roughly 4,500 tokens per image when you mostly want text. Your Plots pane is unaffected either way. "Tools available to the agent" hides whole groups you are not using (editor, session, coordination, background jobs, manuscript audit); all 41 tools cost about 8,600 tokens of schema on every request, and a programming-only session needs about 1,200 of that. Both settings are per session and take effect without a restart, though some MCP clients only notice a changed tool list on reconnect. Separately, a bug fix: p <- ggplot(...) returned a full image to the agent even though assignment displays nothing, so the agent was sent plots that never appeared in your Plots pane. Capture now requires the plot to have actually been shown.
Logging fixes (R 0.14.1). Two problems from a user report. Agent output was never written to the log, only the code, because the entry was written before the code ran; the log now records what each call printed. And the output capture added in 0.14.0 could stop console logging entirely: it opened its own output sink before registering the console callback, so if that sink could not be opened, nothing was logged at all. Opening it is now optional and failing back to logging commands and their values, the sink is restored if another execution unwinds it, and an agent run no longer pops a sink it did not open. Logged output lines are marked so that replay, history and notebook export skip them.
Console logging now captures output, not just results (R 0.14.0). From follow-up on the logging request. The log recorded the value a command returned, so anything printed as a side effect was missing: cat(), progress output, and print() called inside a function. Running f() showed the call but not what f() printed, which is exactly the context an agent needs when you hand it an error you hit yourself. Standard output is now teed to the log and grouped under the command that produced it, alongside the warnings, messages, and errors already captured. Your console still shows everything as normal.
Windows session-liveness fix (R 0.13.2). Checking whether a recorded R session was still alive used tools::pskill(pid, signal = 0). That is the standard idiom on Unix, but on Windows pskill always calls TerminateProcess regardless of signal, so the check killed the session it was asking about, then reported it as alive and left the stale discovery file in place. Starting a server could therefore terminate another RStudio session and leave agents routed to a dead port. Liveness is now probed without signalling. Separately, registering a session whose name is already held by a different live session now warns instead of silently overwriting its discovery file, which had left agents holding the wrong port and token.
Unified console logging (R 0.13.0). The session log recorded what the agent ran, but not what you ran, so asking an agent to explain an error you hit in the console meant re-running the work through it. Tick "Also log my own console commands" under Logging and your console activity joins the same file, tagged by who ran what: the command, its printed result, and any warnings, messages, or errors. "Read the last 100 lines of the log" is now enough for an agent to see both sides of the session. Off by default; toggle it in the addin or call start_console_logging() / stop_console_logging().
Editor tools fixed, plus approve-before-apply edits (R 0.12.5 / clauder-mcp 0.14.4). From two user reports. modify_code_section and insert_text now save to disk by default and report saved_to_disk, so an agent no longer believes it wrote a file when the change sat unsaved in the buffer. Bounded replacements may change the line count (the old equality constraint is gone). Both tools accept a path to target a specific file, open and focus it, and refuse to edit a different document instead of failing silently. get_active_document now reports the path, the document id, and whether the buffer differs from disk, so buffer state and file state stop being confused for each other. New suggest_edit tool: the agent proposes a change and waits for the user to approve it, using rstudioapi::showEditSuggestion() when the installed rstudioapi provides it, and otherwise staging the edit unsaved so the user accepts by saving or rejects with undo.
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/clauder-rstudio-mcp-server)<a href="https://allmcps.com/mcp/clauder-rstudio-mcp-server"><img src="https://allmcps.com/api/badge/clauder-rstudio-mcp-server?style=directory" alt="ClaudeR RStudio MCP Server on AllMCPs" /></a>