Model or dataset
IMNMV/ClaudeR avatar
IMNMV/ClaudeR

ClaudeR: An MCP Bridge Between RStudio and CLI Coding Agents

Connect RStudio to Claude Code, Codex, Gemini, and other LLM agents via MCP. Multi-agent orchestration, automated manuscript auditing, and zero-config setup with uvx

338 stars38 forksPythonNOASSERTION

At a glance

What is it?
ClaudeR is an R package that exposes a live RStudio session to MCP-capable agents such as Claude Code, Codex and Gemini CLI, and adds a manuscript audit path. The interesting part is not the chat window, it is that the agent runs code where your data already sits. The awkward part is the licence metadata and the moving parts on Windows.
Who is it for?
Adopt ClaudeR if you already pay for a CLI agent subscription and want it operating inside a live R session rather than a chat window: the addin, install_cli(tools = "claude") and claudeAddin() path is short, and the AGENT CONTEXT panel lets you cut the tool schema from roughly 8,600 tokens to about 1,200.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap ClaudeR fills: an agent that runs code where the data lives

Most assistant tooling for analysts hands you a chat box and asks you to paste code, errors and output back and forth. ClaudeR takes the opposite route. It is an R package that turns your running RStudio session into an MCP server, so an agent configured for Model Context Protocol can call into that session, execute R, and see what came back. The README describes the intended effect plainly: interactive coding sessions where the agent can execute code in your active RStudio environment so it can see the executed code and any generated plots in real-time. The target user is a researcher or data scientist who already has a CLI subscription to Claude Code, Codex or Gemini CLI, works in RStudio, and is tired of copying console output into a browser tab. The README is explicit that this is not a paid wrapper product: it argues the paid alternatives are prompt wrappers around the same frontier models you already reach through a CLI subscription, and that the structural difference is execution inside your live session, a per-agent audit trail of every line executed, checkpoints that make steps reversible, and findings written back into documents as Word comments.

How the bridge works: MCP server, addin, and per-agent session routing

The architecture visible in the material has three layers. The R package itself runs inside RStudio and is started through an addin, claudeAddin(). An MCP server component, distributed separately as the Python package clauder-mcp on PyPI, is what the agent actually talks to. The agent is a normal MCP client: Claude Code, Codex, Gemini CLI, Cursor, or anything else that speaks the protocol. Multi-agent support is handled by session routing rather than by threading inside R. The README states that multiple agents can work on one script, or that multiple RStudio windows can be siloed so several agents operate independently on different datasets. That implies a discovery file per session and a port per session, which matches the Windows bug note: checking whether a recorded R session was still alive used tools::pskill(pid, signal = 0), and when the check misfired it left a stale discovery file in place, so agents were routed to a dead port. The tool surface is broad: the release notes for R 0.15.0 say all 41 tools cost about 8,600 tokens of schema on every request, and that a programming-only session needs about 1,200 of that. The tools are grouped (editor, session, coordination, background jobs, manuscript audit), and the AGENT CONTEXT panel in the addin can hide whole groups you are not using.

Getting it running: devtools, install_cli, and the addin

Installation is from GitHub rather than CRAN, which matters for upgrade expectations. The README gives this sequence: if (!require("devtools")) install.packages("devtools") followed by devtools::install_github("IMNMV/ClaudeR"). Then library(ClaudeR), then a setup call that depends on your client. install_clauder() is documented for Claude Desktop and Cursor; install_cli(tools = "claude") is documented for the Claude Code CLI. The server is started from inside RStudio with claudeAddin(). The README also points at llms-install.md for automated setup, written for agents rather than humans. The description mentions uvx and zero-config setup, and the PyPI package name clauder-mcp appears in the README badges, but the supplied material does not show the exact uvx invocation, so treat that path as documented elsewhere in the repository rather than as something reproduced here. Two settings in the addin are worth knowing before you start a session. Send plots to the agent automatically can be turned off, in which case the agent is told a plot was drawn and must ask for it with execute_r_with_plot; the release notes put the saving at roughly 4,500 tokens per image. Tools available to the agent hides tool groups. Both are per session and take effect without a restart, with the caveat that some MCP clients only notice a changed tool list on reconnect.

Plot capture and console logging: two places the design had to be corrected

The release history is unusually candid about what went wrong, and two of those corrections are worth reading before you rely on the features. First, plot capture. The notes for 0.15.0 describe a bug where 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. If your workflow assigns plots and prints them later, that fix is the difference between a useful context stream and noise. Second, console logging, which is the mechanism by which an agent gets to see what you did by hand. Logging was added in 0.14.0 to tee standard output to the log and group it under the command that produced it, alongside warnings, messages and errors. The 0.14.1 notes record two follow-on problems: agent output was never written to the log, only the code, because the entry was written before the code ran; and the output capture could stop console logging entirely, because it opened its own output sink before registering the console callback. The 0.14.2 notes describe a third: globalCallingHandlers() 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. Started from the addin, message() output is the one thing not captured, and the addin says so. That is a real limitation, documented rather than hidden.

The Windows liveness bug is the sharpest warning in the release notes

The 0.13.2 entry describes a failure mode that should change how you test this on Windows. 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, according to the same notes. Two things follow. First, if you run multiple RStudio windows on Windows, this is the class of bug that costs you unsaved work, so it belongs in your evaluation rather than in a footnote. Second, the general shape of the problem does not disappear with the fix: session discovery through a file plus a port is a coordination scheme that assumes processes are well behaved, and any crash that skips cleanup leaves a stale record behind. The README does not describe a manual way to list or clear discovery files, and the supplied material does not show one, so if you hit a routing problem the recovery path is not something this review can spell out.

Manuscript auditing and the limits of what an agent can check

The feature that separates ClaudeR from a generic code-execution bridge is the manuscript audit path. The README frames it as an LLM auditing your statistical claims against a manuscript before submission, and the structural claim is that findings are written back into your actual documents as Word comments. That is a narrower and more defensible proposition than "AI writes your paper": the agent has the live session, so it can re-run a model and compare the numbers in the text against what the code produces now. The honest caveats are the ones the material itself implies. The audit is only as good as the session state: if your script does not reproduce the manuscript's numbers from a clean run, the agent will flag a discrepancy that is really a stale .RData problem. And the audit tool group is one of the groups you can hide in the AGENT CONTEXT panel, which tells you the maintainers expect most sessions not to need it. There is no documented accuracy figure for the audit, and this review has none to offer.

Alternatives and the licence question you have to resolve first

The nearest alternative for R users is the official MCP server ecosystem for R, which exposes a defined set of R operations to an MCP client without the RStudio addin layer. The difference in approach is scope and state: a generic R MCP server gives an agent the ability to run R, while ClaudeR is built around attaching to a specific live RStudio session, with the plot pane, console log, per-agent audit trail and multi-session routing that follow from that. If you only need an agent to run a script and read the result, the generic route has fewer moving parts and no addin to keep in sync. If you need the agent inside the session you are already working in, with several agents on separate datasets, that is the case ClaudeR is built for. The licence is the item to settle before any of this. The repository metadata reports NOASSERTION, while the README carries an MIT badge linking to opensource.org/licenses/MIT. Those two signals disagree, and this review cannot resolve which governs. If the package is MIT, that is permissive and the usual obligations apply; if the metadata is accurate and no licence file was detected, you have no clear grant at all. Check the LICENSE file in the repository and the licence field on the PyPI page for clauder-mcp before you depend on it in anything you ship. This is not legal advice, and for commercial or funded work the question belongs with whoever handles your licensing.

Maintenance cost: GitHub installs, a split version line, and a fast release cadence

ClaudeR is not on CRAN as far as the material shows; the documented install is devtools::install_github("IMNMV/ClaudeR"). That means upgrades are a deliberate act, and you should expect to reinstall when the R side and the Python side drift apart. The version numbers in the release list show the two components moving together in the recent entries: R 0.15.0 and clauder-mcp 0.15.0 are named as a pair in the 0.15.0 notes, and the 0.14.x notes are written against the R package version. Earlier releases are less tidy, with v0.3.1 and v0.2.1 predating the 0.15.0 line, so the project has gone through at least one significant renumbering. The cadence is also fast enough to matter operationally: the notes log four releases between 0.13.2 and 0.15.0, several of them bug fixes to logging and plot capture. If you pin a version, pin both halves and read the release notes before moving, because the logging behaviour in particular has changed in ways that affect what an agent sees. The upside of the cadence is that reported problems get addressed in the open, with causes named: the globalCallingHandlers() constraint, the pskill signal semantics, the sink ordering. The downside is that a setup you validated last month may behave differently after an upgrade.

Editorial conclusion

Adopt ClaudeR if you already pay for a CLI agent subscription and want it operating inside a live R session rather than a chat window: the addin, install_cli(tools = "claude") and claudeAddin() path is short, and the AGENT CONTEXT panel lets you cut the tool schema from roughly 8,600 tokens to about 1,200. Do not adopt it if you need a permissively licensed dependency with unambiguous terms, or if you work on Windows and cannot test session discovery yourself, because the 0.13.2 release notes describe a liveness probe that could terminate another RStudio session. Before committing, verify three things in your own setup: that claudeAddin() discovers only the sessions you expect, that the checkbox for logging your own console commands actually arms on your R version, and that your MCP client reconnects after you change the tool groups.

Official sources

  1. IMNMV/ClaudeR on GitHub
  2. Issues
  3. README
  4. Releases
Community notes

Community notes