RStudio
MCP server providing AI assistants with deep RStudio integration capabilities
What is RStudio?
RStudio is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server providing ai assistants with deep rstudio integration capabilities
MCP server providing AI assistants with deep RStudio integration capabilities
This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server providing AI assistants with deep RStudio integra
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx rstudioConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use RStudio
The RStudio MCP Server provides AI assistants with deep integration into R and RStudio, enabling Claude to execute R code, manage R environments, install and update packages, create and open RStudio projects, and retrieve execution history — all through a local MCP server that bridges Claude's conversational interface with a live R runtime.
Prerequisites
- Python 3.9 or later installed
- R 4.0 or later installed and accessible as 'Rscript' in PATH
- RStudio Desktop (optional, for project management tools)
- Git to clone the repository
- Claude Desktop or Claude Code
Clone the repository and install dependencies
Download the RStudio MCP server and install its Python dependencies.
git clone https://github.com/cafferychen777/Rstudio-mcp.git
cd Rstudio-mcp
pip install -e .
pip install -r requirements.txtInitialize the configuration file
Run the built-in init command to create the default configuration file at ~/.rstudio-mcp/config.yaml.
rstudio-mcp --init-configReview and customize the configuration
Edit the generated config file to set your R version, environment storage path, execution timeout, and any functions to block for security.
# ~/.rstudio-mcp/config.yaml
debug: false
logging:
level: INFO
rstudio:
default_r_version: "4.3"
environments:
default_location: "~/.rstudio-mcp/environments"
security:
execution_timeout: 30
blocked_functions:
- system
- shellStart the MCP server
Launch the server. Use --debug for verbose output during initial setup.
rstudio-mcp
# or for debug output:
rstudio-mcp --debugConfigure Claude Desktop
Add the RStudio MCP server to your Claude Desktop configuration.
{
"mcpServers": {
"rstudio": {
"command": "rstudio-mcp",
"env": {
"R_HOME": "/usr/local/lib/R",
"RSTUDIO_MCP_LOG_LEVEL": "INFO"
}
}
}
}Verify R integration with a test execution
Ask Claude to execute a simple R expression to confirm the server is connected to the R runtime.
RStudio Examples
Client configuration
Claude Desktop configuration for the RStudio MCP server with R_HOME specified.
{
"mcpServers": {
"rstudio": {
"command": "rstudio-mcp",
"env": {
"R_HOME": "/usr/local/lib/R",
"RSTUDIO_MCP_LOG_LEVEL": "INFO",
"RSTUDIO_MCP_CONFIG": "/Users/you/.rstudio-mcp/config.yaml"
}
}
}
}Prompts to try
R analysis prompts to use with Claude once the RStudio MCP server is connected.
- "Create a new R environment called 'data-analysis' and install the tidyverse package"
- "Execute this R code in my data-analysis environment: mtcars %>% group_by(cyl) %>% summarise(mean_mpg = mean(mpg))"
- "List all packages installed in my current R environment"
- "Create a new RStudio project called 'sales-forecast' in ~/projects"
- "Show me the last 10 R commands I executed in this session"Troubleshooting RStudio
execute_r_code fails with 'R not found' or 'Rscript: command not found'
Set the R_HOME environment variable in the Claude Desktop config to the directory where R is installed (e.g., /usr/local/lib/R on macOS with Homebrew, or /usr/lib/R on Linux). You can find it by running 'R RHOME' in your terminal.
'rstudio-mcp' command not found after pip install
The CLI entry point may not be in PATH. Run 'python -m rstudio_mcp' as an alternative, or find the installed script with 'pip show rstudio-mcp' and add its location to PATH. In the Claude Desktop config, use the full path to the binary.
R code execution times out for long-running analyses
Increase the security.execution_timeout value in ~/.rstudio-mcp/config.yaml (value is in seconds, default is 30). For data-intensive work, set it to 120 or higher and restart the server.
Frequently Asked Questions about RStudio
What is RStudio?
RStudio is a Model Context Protocol (MCP) server that mcp server providing ai assistants with deep rstudio integration capabilities It connects AI assistants to external tools and data sources through a standardized interface.
How do I install RStudio?
Follow the installation instructions on the RStudio GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with RStudio?
RStudio works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is RStudio free to use?
Yes, RStudio is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
RStudio Alternatives — Similar Data Science & ML Servers
Looking for alternatives to RStudio? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up RStudio in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use RStudio?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.