An MCP that lets the model transiently execute R code.
Project description
MCP R Playground
An MCP server that allows AI models to execute R code, see its results, and draw and observe plots. It can be used for sophisticated agentic deployments, but also as a way to augment AI clients like Claude Desktop when talking to them about scientific papers.
Features:
- Stateful sessions: each conversation thread gets a new session, but the session can persist across calss and user/assistant interactions.
- Graphics output: multimodal models can draw plots using standard R libraries like ggplot, see those plots, and react to them.
- NO HOST ISOLATION: while each session runs as a separate R environment, they have access to global dependencies and all files on the computer. While unlikely, a rogue model could write R code that deletes your important files.
- Works in all common operating systems/architectures - Windows x64 / arm64, MacOS, Linux
Configuration
Currently there's just one configuration parameter that can be set as an environment variable:
RPLAYGROUND_MCP_SUPPORT_IMAGE_OUTPUT, default True. If set to False, image output will be disabled, and tool descriptions will be made to reflect that.
Installation
Basic instructions for technical users:
- Have R installed, and the R_HOME environment variable set
- Have a recent version of the
uvinstalled - run
uvx --python=3.13 rplayground-mcp, and it should just work.
Detailed Installation
This section is for less technical users who want to set up this MCP to use with Claude Desktop or similar AI user interfaces that support MCP extensions.
Windows
- Make sure you have R installed. The recommended source is here https://cran.rstudio.com/ .
- Make sure you have
uvinstalled.uvis the project management tool for Python, the programming language this tool is written in. More detailed instructions can be found here https://docs.astral.sh/uv/getting-started/installation/#pypi, we provide the instructions for the most straightforward method:- Open the Terminal app
- In the terminal, paste in the following installation command:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - Close the Terminal app and reopen it
- type in
uvand confirm you don't see any red errors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rplayground_mcp-0.1.0.tar.gz.
File metadata
- Download URL: rplayground_mcp-0.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33dd15fa51d0c1cf727ea362ac15542577a5e85d634f64611e9fa0b37abe6070
|
|
| MD5 |
8890ebeec26a4c211cead0f9da9ce32e
|
|
| BLAKE2b-256 |
5a6d658938335d9435300ff31e57c2147f1ee071443da075c4e10bd3fe7a1f32
|
File details
Details for the file rplayground_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rplayground_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
112f1fedd7daa0d2aeb47bd4461cddfc50393e914f44326d48cc2cdf32dca75e
|
|
| MD5 |
a78ac754cc6aeed07297e2b311408e6f
|
|
| BLAKE2b-256 |
f26aa1c9bdfedaf5be738b227875267370cca206c4ab5fff0ec7d2299ac2dfe0
|