ClaudeR
@imnmv
About ClaudeR
R MCP Integration for Claude
Overview
What is ClaudeR?
ClaudeR is an R package that creates a direct connection between RStudio and Claude AI, allowing interactive coding sessions where Claude can execute code in your active RStudio session and see results in real‑time. It runs on RStudio (desktop) and can also be used with Cursor (if the R extension for VS Code is installed). It is designed for R users who want AI‑assisted coding, data analysis, and visualization.
How to use ClaudeR?
Install required R packages (R6, httpuv, jsonlite, etc.) and Python dependencies (mcp, httpx). Then install ClaudeR from GitHub using devtools::install_github("IMNMV/ClaudeR"). Configure Claude Desktop or Cursor by editing the MCP config file (claude_desktop_config.json or mcp.json) with the correct paths. In RStudio, load the package and run claudeAddin() to start the server, then ask Claude to execute R code in your session.
Key features of ClaudeR
- Execute R code directly from Claude in your RStudio session
- Generate and refine plots and visualizations
- Perform iterative data analysis with environment access
- Log all executed code to timestamped files
- Print Claude’s code to the console before execution
- Modify specific sections of the active document
Use cases of ClaudeR
- Exploratory data analysis with real‑time statistical tests
- Creating and refining scatterplots, correlation matrices, and trend lines
- Fitting linear models and other statistical models
- Generating Quarto presentations from an active qmd file
- Getting code explanations and targeted edits for your R scripts
FAQ from ClaudeR
What is ClaudeR and how does it differ from other AI‑assisted R tools?
ClaudeR uses the Model Context Protocol (MCP) to create a bidirectional connection between Claude AI and your local RStudio session. Unlike cloud‑based solutions, code executes in your own R environment, and results are returned to Claude for iterative collaboration.
Which platforms and models does ClaudeR support?
ClaudeR works with RStudio (desktop) and can also be used with Cursor if the R extension for VS Code is installed. It requires the Claude Desktop app and is compatible with Claude AI models accessible through the app.
How are MCP servers set up for ClaudeR?
You configure an MCP server in Claude Desktop’s claude_desktop_config.json (or Cursor’s mcp.json) pointing to the package’s Python script (persistent_r_mcp.py). The server bridges Claude and RStudio via the R addin.
Is ClaudeR free to use?
Yes, ClaudeR is released under the MIT license and is free to use. You must have your own access to Claude AI (via Claude Desktop) and installed dependencies (R, Python).
What security restrictions does ClaudeR implement?
System commands (system(), system2(), shell()) and file deletion operations are blocked. This protects your system from unintended changes while allowing safe data analysis, visualization, and non‑destructive R functions. Normal R code run directly by the user is unaffected.
Basic information
More IDE & Code Editors MCP clients
Arbitrum MCP Tools 🚀🦾
utkucyInstall MCP CLI
supermemoryaiA simple CLI to install MCP servers into any client
Mcphub.nvim
ravitemerA powerful Neovim plugin for managing MCP (Model Context Protocol) servers
DrissionPage MCP Server -- 骚神出品
wxhzhwxhzh基于DrissionPage和FastMCP的浏览器自动化MCP服务器,提供丰富的浏览器操作API供AI调用
Comments