CR

cafferychen777/rstudio-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

12 stars 4 forks 品質 70 トレンド 19MIT

MCP server providing AI assistants with deep RStudio integration capabilities

概要

A Model Context Protocol (MCP) server that provides AI assistants with deep RStudio integration capabilities, including environment management, code execution, project management, and more. - : Create, switch, and manage R environments - : Execute R code in specified environments with result capture - : Create and manage RStudio projects - : Install, update, and manage R packages - : Git integration for RStudio projects - : Capture and manage R plots and visualizations - : Full compliance with MCP 2025-06-18 specification - Python 3.8 or higher - R 4.0 or higher - RStudio (optional, but recommended) This creates a default configuration file at ~/.rstudio-mcp/config.yaml. Edit the configuration file to customize settings: The server uses YAML configuration files. Here's an example configuration: This MCP server is designed to work seamlessly with popular AI coding assistants in RStudio's terminal environment.

README

以下は原文 README の抜粋です。原文を見る。

RStudio MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with deep RStudio integration capabilities, including environment management, code execution, project management, and more.

Features

  • Environment Management: Create, switch, and manage R environments
  • Code Execution: Execute R code in specified environments with result capture
  • Project Management: Create and manage RStudio projects
  • Package Management: Install, update, and manage R packages
  • Version Control: Git integration for RStudio projects
  • Visualization: Capture and manage R plots and visualizations
  • MCP Compliance: Full compliance with MCP 2025-06-18 specification

Installation

Prerequisites

  • Python 3.8 or higher
  • R 4.0 or higher
  • RStudio (optional, but recommended)

Install from Source

git clone https://github.com/rstudio/rstudio-mcp.git
cd rstudio-mcp
pip install -e .

Install Dependencies

pip install -r requirements.txt

Quick Start

1. Initialize Configuration

rstudio-mcp --init-config

This creates a default configuration file at ~/.rstudio-mcp/config.yaml.

2. Edit Configuration (Optional)

Edit the configuration file to customize settings:

nano ~/.rstudio-mcp/config.yaml

3. Run the Server

# Run with default configuration
rstudio-mcp

# Run with custom configuration
rstudio-mcp --config /path/to/config.yaml

# Run in debug mode
rstudio-mcp --debug

Configuration

The server uses YAML configuration files. Here’s an example configuration:

# Server settings
name: "rstudio-mcp"
version: "1.0.0"
debug: false

# Logging configuration
logging:
  level: "INFO"
  file: "~/.rstudio-mcp/logs/server.log"
  max_size: "10MB"
  backup_count: 5

# RStudio configuration
rstudio:
  installation_path: null  # Auto-detect
  default_r_version: "4.3.0"

# Environment management
environments:
  default_location: "~/.rstudio-mcp/environments"
  auto_cleanup: true
  max_environments: 10

# Security settings
security:
  allowed_packages:
    - "base"
    - "utils"
    - "stats"
    - "graphics"
  blocked_functions:
    - "system"
    - "shell"
  execution_timeout: 300

Integration with AI Coding Assistants

This MCP server is designed to work seamlessly with popular AI coding assistants in RStudio’s terminal environment. The server supports the Model Context Protocol (MCP) specification and can be integrated with various AI clients.

Supported AI Clients

Based on the MCP client compatibility matrix, the following AI coding assistants support MCP integration:

  • Claude Code - Supports prompts and tools
  • VS Code GitHub Copilot - Full MCP support with dynamic tool discovery
  • Continue - Supports tools, prompts, and resources
  • Cursor - Supports tools via Composer
  • Cline - Supports tools and resources
  • JetBrains AI Assistant - Supports tools for all JetBrains IDEs
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "rstudio-mcp": { "command": "rstudio-mcp", "args": ["--config", "~/.rstudio-mcp/config.yaml"], "env": { "RSTUDIO_MCP_DEBUG": "false" } } } }