Connects AI agents to persistent R sessions for code execution, plotting, workspace inspection, and optional session attachment.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
One-click editor setup isn’t available for this listing yet — we don’t have a confirmed install command, and we’d rather show nothing than point your editor at the wrong package or host. Follow the project’s own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by MCPR.
phisanti/MCPR MCP server connects an MCP client to a live R runtime. The default server process is a private R session belonging to the agent, so objects created during one tool call remain available to later calls. This supports workflows such as loading packages, transforming data, fitting models, checking results, and refining plots without rerunning a complete script each time.
The package also supports collaboration with a human R session. A person can start an MCPR session from an interactive R console, after which the agent can discover and attach to it. The server is described as experimental in the project materials.
The client launches MCPR::mcpr_server() as an R process. MCPR communicates using JSON-RPC 2.0 over nanonext sockets. Agent-facing functions are exposed as separate MCP tools rather than as one general protocol endpoint.
Ordinary operations use the currently active session and do not take a session identifier. Session routing is controlled independently through manage_r_sessions. The default route is the agent’s private session; joining another session changes where ordinary tools execute until the agent detaches.
Plot output can use httpgd for off-screen rendering when available. MCPR can fall back to standard R graphics devices, and its graphics handling includes token management for image responses.
R must be installed before MCPR. The package is installed from GitHub with remotes::install_github("phisanti/MCPR"); the README also shows installing remotes first when it is not present.
After installation, install_mcpr(agent = "claude") can configure the server for supported agents. The documented agent names are Claude, Gemini, Copilot, and Codex. Manual Claude Desktop configuration uses an R command with the following arguments:
Configuration locations vary by operating system and client. Claude Desktop, Gemini, Copilot, and Codex each have documented configuration paths in the project README.
phisanti/MCPR MCP server documents these core tools:
execute_r_code(code) evaluates arbitrary R expressions and returns structured results, output, warnings, and errors.show_plot(expr, target, width, height, format) creates plots. User-targeted output displays through the active graphics device; agent-targeted output returns an encoded image with metadata and token information.manage_r_sessions(action, session) lists sessions, joins a human session, starts an MCPR-owned secondary session, detaches to the private session, or closes an MCPR-owned secondary session.view(what, max_lines) provides environment introspection and debugging. The documented options include session summaries and terminal output.MCPR is intended for stateful, iterative R work, not merely isolated command execution. Attaching to an existing R console requires the user to start that session with mcpr_session_start() before the agent can join it. The README does not document authentication, hosted deployment, or remote service credentials. Support for graphics depends on the available R graphics setup: httpgd is optional because standard graphics devices provide a fallback. The project labels its lifecycle as experimental, so client configuration details and behaviour may change.
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/phisanti-mcpr)<a href="https://allmcps.com/mcp/phisanti-mcpr"><img src="https://allmcps.com/api/badge/phisanti-mcpr?style=directory" alt="MCPR on AllMCPs" /></a>