Beta Space StudioBeta Space Studio logo
MCP Tools·2 January 2025·Said Sürücü·16

R Language MCP

Secure Docker-based MCP server for R statistical analysis. Run R code and create visualizations through natural language.

Author: Said SürücüCategory: MCP ToolsLast update: 2 January 2025
R Language MCP
16GitHub stars

Overview

R Language MCP is a secure Docker-based MCP server built with Python and FastMCP. It enables conversational R data visualization and analysis. All code runs in isolated containers for security.

Features

  • Natural Language Analysis: R operations through Claude conversations
  • Docker Security: Isolated container execution for full security
  • File Integration: Local directory mounting for direct data access
  • Publication-Quality Visualizations: Create ggplot2 charts through conversation
  • Package Management: On-demand R package installation
  • Smart Caching: Instant results for repeated operations
  • Persistent Containers: Reuse the same environment (no startup delay)

Installation

macOS

brew install r uv python@3.12 --cask docker
uvx --from git+https://github.com/saidsurucu/rlang-mcp-python rlang-mcp-python

Linux (Ubuntu/Debian)

sudo apt install r-base python3.12 docker.io
pip install uv
uvx --from git+https://github.com/saidsurucu/rlang-mcp-python rlang-mcp-python

Windows

Download R and Python 3.12+, then:

pip install uv
uvx --from git+https://github.com/saidsurucu/rlang-mcp-python rlang-mcp-python

Usage Examples

Data Mounting

"Mount ~/Documents/analysis directory as R working directory."

File Discovery

"List all Excel files and show available data."

Analysis

"Load sales_data.xlsx, show summary statistics, calculate monthly totals."

Visualization

"Create a publication-quality bar chart of monthly sales by category."

Security

  • All R code runs in isolated Docker containers
  • No access to host system
  • Volume mounting for secure file sharing
  • Resource usage limits

Supported R Packages

  • Data Processing: dplyr, tidyr, data.table
  • Visualization: ggplot2, plotly, lattice
  • Statistics: stats, MASS, car
  • File Handling: readxl, readr, haven

License

MIT License

Tools that connect to your own data.

R Language MCP is open source. If your organization needs something similar for its own data sources, let's talk.

R Language MCP - Resources | Beta Space Studio | Beta Space Studio