ClaudeR: Running an MCP Agent Inside a Live RStudio Session
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
At a glance
- What is it?
- ClaudeR is an R package that exposes your running R session to Claude Code, Codex, Gemini CLI or any MCP client. It installs from GitHub, ships a Python MCP server on PyPI, and writes audit findings back as Word comments.
- Who is it for?
- Adopt ClaudeR if your analysis lives in an interactive RStudio session and you want an MCP agent to run code against the real objects, plots and data already loaded there, with a per-agent log and checkpoints you can replay. Do not adopt it if you work in notebooks or batch scripts, if you need a formal security review of an agent that can execute arbitrary R in your session, or if you cannot tolerate a project whose LICENSE file and licence badge disagree.
- 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 October 1, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What ClaudeR solves that a chat window cannot
A browser chat with a frontier model has no access to the objects in your R global environment. You copy code out, paste results back, and lose the connection between a plot and the data that produced it. ClaudeR closes that loop by exposing the running RStudio session over the Model Context Protocol, so an agent can execute code in the session you are already working in and see the result, including generated plots, as the README describes.
The intended user is a researcher or data scientist who works interactively rather than in a rendered notebook. The README frames the audience around manuscript work: editing a script, running a quick analysis, or having an LLM audit statistical claims against a manuscript before submission. The repository topics list data-science alongside rstudio-addin and mcp, which matches that positioning. If your workflow is a knitr document you knit from scratch each time, the live-session premise buys you less.
The R package, the Python server and how they talk
The repository splits into two halves. R/ holds the R package side, which is what you load in RStudio and what provides the addin. clauder-mcp/ and clauder-py/ hold the Python side, published to PyPI as clauder-mcp, which is the MCP server the agent actually connects to. The Dockerfile is three lines and installs that Python package on python:3.12-slim, running clauder-mcp as its command, so the server can be containerised independently of R.
The data flow is: your agent client (Claude Code, Codex, Gemini CLI, Cursor, Claude Desktop) speaks MCP to the clauder-mcp server, and that server reaches back into the live RStudio session. The README states the agent can execute code in your active RStudio environment so it can see the executed code and any generated plots in real time. Session discovery is file-based: the release notes mention a stale discovery file left in place after a failed liveness check on Windows, which implies each session registers itself somewhere on disk for the server to find.
Tool exposure is grouped rather than flat. The README lists editor, session, coordination, background jobs and manuscript audit as groups the AGENT CONTEXT panel can hide, and states there are 41 tools in total. Multi-agent operation works two ways: several agents on one script, or several RStudio windows kept siloed so separate agents work on separate datasets.
Installing ClaudeR and running a first agent session
The README's Quick Start installs the R package from GitHub with devtools, then registers the MCP server with your chosen client. Run this in an R console:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("IMNMV/ClaudeR")After the package is installed, load it and call the installer for your client. The README gives two variants, one for Claude Desktop and Cursor, one for the Claude Code CLI:
library(ClaudeR)
install_clauder() # For Claude Desktop / Cursor
install_cli(tools = "claude") # For Claude Code CLIThe README does not spell out what these functions write or where, so treat them as the registration step and check your client's MCP configuration afterwards. Then start the server from inside RStudio:
claudeAddin()That launches the addin, which is where the AGENT CONTEXT panel lives. The README notes that the panel's two settings (automatic plot sending, and which tool groups are visible) are per session and take effect without a restart, but that some MCP clients only notice a changed tool list on reconnect. If your agent cannot see a tool you just enabled, reconnect the client before concluding the setting failed.
The README also points AI agents at llms-install.md for automated setup, and the Dockerfile shows the server can be run without R present:
FROM python:3.12-slim
RUN pip install clauder-mcp
CMD ["clauder-mcp"]That container is the server only. The R side still has to exist somewhere for the agent to execute against.
Token cost, plot capture and the limits of the audit trail
The most concrete constraint in the README is context budget. All 41 tools cost about 8,600 tokens of schema on every request, and the README states a programming-only session needs about 1,200 of that. That is a design trade-off, not a bug: hiding groups you do not use is the documented remedy, and it is per session. If you are on a small context window or paying per token, enabling everything by default is the wrong configuration.
Plot handling has a documented failure mode that was fixed. The README says `p <- ggplot(...)` used to return a full image to the agent even though assignment displays nothing, so agents received plots that never appeared in the Plots pane. Capture now requires the plot to have actually been shown. Turning off automatic plot sending is the other lever: the README says the agent is told a plot was drawn and asks for it with `execute_r_with_plot`, saving roughly 4,500 tokens per image. That number is the project's own claim, not an independent measurement.
Console logging has a narrower gap. The release notes state that when logging is started from the addin, `message()` output is the one thing not captured, and that the addin says so. Started from the console via `start_console_logging()`, the handlers are installed and that gap does not apply. If your agent needs message output to diagnose a problem, start logging from the console, not the checkbox.
Where ClaudeR is the wrong tool
ClaudeR assumes a live, long-running R session is the thing worth connecting to. Reproducible pipelines that run in CI, targets-based workflows, and Quarto or R Markdown documents rendered from a clean environment all get less from it, because there is no interactive session holding state the agent needs to see. The agent can run code, but it cannot reconstruct the environment that produced a result after the session is gone.
The bigger caution is scope of execution. An agent connected this way can execute R in your session, which means it can touch every object, file path and credential that session can reach. The README addresses this with a per-agent audit trail of every line executed, checkpoints that make any step reversible, and findings written back as Word comments, but the audit trail is a record, not a sandbox. Nothing in the README describes a permission model that prevents a tool call from running. If your institution requires an agent to be constrained before it acts rather than logged after, this design will not satisfy that requirement.
Licence is a second unresolved point. The repository's LICENSE file exists, the README shows an MIT badge, and the GitHub licence field reports NOASSERTION. Those three do not agree. Read the file.
How it differs from an MCP server that only runs commands
The obvious alternative is a general-purpose MCP server for shell or Python execution, or an agent CLI pointed at a project directory. The difference is what the agent can see. A shell-execution server runs a command and returns stdout and stderr. ClaudeR runs code inside a session that already holds your data frames, your fitted models and your plot history, and the README's stated goal is that the agent sees the executed code and any generated plots in real time. A shell server cannot return the plot that a live session just drew, and it cannot act on an object that only exists in memory.
The second difference is the manuscript-audit path. ClaudeR ships a manuscript audit tool group and writes findings back into your documents as Word comments, per the README. A generic execution server has no concept of a manuscript, so you would be building that loop yourself: extract claims, run checks, then place comments into the document. That is a real amount of glue, and it is the part of ClaudeR that is hardest to replace with a shell server plus a prompt.
Against paid researcher-facing AI products, the README's argument is structural rather than about model quality: the work happens in your live session, with a per-agent audit trail and reversible checkpoints, which a web wrapper cannot offer. That is the project's claim about its own architecture. Whether the audit trail is sufficient for your compliance context is a question the README does not answer.
Maintenance, upgrades and licence status
The last push to the default branch was on 2026-09-07, and v0.15.0 was released the same day. Before that, v0.3.1 landed on 2026-03-24 and v0.2.1 on 2026-02-23, so the release cadence between February and September is uneven rather than steady. The repository is not archived. The release notes read as user-driven: the 0.14.x logging fixes, the 0.15.0 context panel and the 0.13.2 Windows liveness fix are all described as coming from user reports or requests.
Upgrade cost is split across two artefacts that version in step. The R package installs from GitHub via devtools, and the Python server installs from PyPI as clauder-mcp; the 0.15.0 entry names both "R 0.15.0 / clauder-mcp 0.15.0", which suggests they are meant to move together. If you pin one and not the other, you are running a combination the release notes do not describe. The Dockerfile pins nothing beyond python:3.12-slim, so a container build will pick up whatever clauder-mcp is current at build time.
On licence: the README displays an MIT badge, a LICENSE file and a LICENSE.md both exist at the repository root, and the GitHub licence field reports NOASSERTION. The README does not state which text governs. That is a question for whoever handles licensing at your institution, not something to resolve from a badge.
Editorial conclusion
Adopt ClaudeR if your analysis lives in an interactive RStudio session and you want an MCP agent to run code against the real objects, plots and data already loaded there, with a per-agent log and checkpoints you can replay. Do not adopt it if you work in notebooks or batch scripts, if you need a formal security review of an agent that can execute arbitrary R in your session, or if you cannot tolerate a project whose LICENSE file and licence badge disagree. Before installing, read LICENSE and LICENSE.md side by side, confirm your R is 4.0 or newer, and check whether the tool groups you actually need are the ones you enable in the AGENT CONTEXT panel, since the README states that all 41 tools cost about 8,600 tokens of schema on every request.
Frequently asked questions
What is ClaudeR and what does it connect to?
It is an R package that links RStudio to MCP-configured LLM agents such as Claude Code, Codex or Gemini CLI, so the agent can execute code in your active RStudio session. The README also says it works with Cursor and any service that supports MCP servers.
How do I install ClaudeR and start using it?
The README's Quick Start installs the package from GitHub with devtools::install_github("IMNMV/ClaudeR"), then calls install_clauder() for Claude Desktop or Cursor, or install_cli(tools = "claude") for the Claude Code CLI. The server is then started from RStudio with claudeAddin().
Does ClaudeR need a separate Python package or Docker container?
Yes. The MCP server side lives in clauder-mcp/ and clauder-py/ and is published to PyPI as clauder-mcp, and the repository Dockerfile installs that package on python:3.12-slim and runs clauder-mcp. The R package still has to run somewhere for the agent to execute against.
Can several agents use ClaudeR at the same time?
The README states that multiple agents can work on one script, or that multiple RStudio windows can be kept siloed so separate agents operate independently on different datasets.
What is the licence for ClaudeR?
The README shows an MIT badge and the repository contains both LICENSE and LICENSE.md, while the GitHub licence field reports NOASSERTION. The README does not say which text governs, so read the files directly.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/imnmv-clauder)