ClaudeR
Lets your AI agent run code in your live R or Python session in RStudio or Positron, see plots and edit your open file.
365 stars on GitHubby IMNMVLicense NOASSERTIONUpdated 18 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add clauder -- uvx clauder-mcp
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Fit a regression on the data frame I already have loaded and show me the residual plot.
Read the script I have open and fix the error I got in the console.
What it is
ClaudeR connects AI agents such as Claude Code or Codex to the R session you already have open. The agent runs code where your cleaned data and fitted models are, sees the plots it draws and reads the objects in your environment. A companion Python package does the same for a live Python session.
What it can do
execute_r_with_plot: run R code and get the plot backget_async_result: wait for a long-running job to finishget_active_document: read the file open in your editormodify_code_section: change part of a file and save itinsert_text: add text to the open filesuggest_edit: propose a change and wait for your approvalrun_annotation_job: label rows of data with an AI modelrestore_session: go back to a saved checkpoint
When to use
- βΊWhen you want an AI agent to analyze data that is already loaded in your RStudio or Positron session.
- βΊWhen you want several agents to share one session or work on separate datasets side by side.
- βΊWhen you need a record of every line of code an agent ran on your data.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
data-analysisHelps your agent analyze numbers and datasets by computing basic statistics and saving a summary of the results.browser-cdpHelps your agent control a Chrome browser through its debug connection, reusing your existing logins to open pages, run scripts, and read data.matplotlibHelps your agent create data visualizations from Python code. It can generate static, animated, and interactive plots for analysis.Frequently asked questions
Is ClaudeR free and open source?
The readme shows an MIT license badge, and the project is installed from GitHub and PyPI without any fee mentioned.
What do I need to install it?
You install the ClaudeR R package in RStudio or Positron, then register it with your AI tool using install_clauder() or install_cli(). For Python there is a companion package, clauder-mcp, that runs with uvx.
Which AI tools does it work with?
It works with MCP-based agents such as Claude Code, Codex, Claude Desktop and Cursor. Gemini CLI support was removed after Google shut that tool down.
Can more than one agent use the same session?
Yes. Several agents can share one session and divide the work, or you can run separate sessions so each agent works on its own dataset.
Can I control what the agent receives?
Yes. The addin lets you turn off automatic plot sending and hide groups of tools to save context.
Is my work recorded?
The readme says there is a record of every line an agent ran, and you can also log your own console commands in the same file.
If it does not work
- βΊRestart your AI app fully after running install_clauder() or install_cli().
- βΊMake sure you started the server in RStudio with claudeAddin() before asking the agent to work.
- βΊOn Windows, update to a recent ClaudeR version; older versions had a session-check bug that could end another RStudio session.
5 new skills a week. 1 minute to read.