MCP server that integrates with RStudio to provide tools for editor manipulation, R code execution, and session management
Strong tool naming with clear action verbs (get_, set_, insert_, replace_, execute_). All 11 tools have descriptions (avg 180 chars, within 10-1024 baseline). All parameters have type definitions and descriptions. Tool annotations present (readOnlyHint, destructiveHint, idempotentHint). Key gaps: output schemas not documented in source; no pagination guidance for rstudio_r_execute output; error handling descriptions minimal; no recovery guidance for failure cases.
Read the active RStudio source document, including its document ID, path when saved, complete live contents (including unsaved edits), line count, selected text, and selection ranges. Fails when no RStudio session bridge or active source document is available.
Insert text into a live RStudio buffer. Omit both line and column to insert at the current selection or cursor; otherwise provide both. Editor positions use one-based lines and zero-based columns.
Create a new unsaved RStudio source document without executing it. Supported types are r, rmarkdown, and sql. Repeated calls create additional documents.
Open an existing local file in RStudio and optionally move the cursor. The path must exist. Use -1 for line and column to leave the cursor unspecified. This changes RStudio UI state but does not alter the file.
Replace an exact range in a live RStudio buffer. The end must not precede the start. Positions use one-based lines and zero-based columns. This may overwrite unsaved work.
Output schemas not documented. Tool descriptions state what is returned (e.g., 'bounded visible output, warnings, messages, value class, elapsed time') but no structured schema is visible in source. LLMs cannot plan downstream operations without knowing response field names and types.
Error handling lacks recovery guidance. Descriptions mention failure conditions ('Fails when no RStudio session bridge...', 'can fail') but do not guide the LLM on what to do next. No actionable error messages or retry strategies documented.
rstudio_r_execute lacks output bounds documentation. Description mentions 'default elapsed limit is 30 seconds and returned output limit is 20,000 characters' but no guidance on what happens when limits are exceeded or how to handle truncated output.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2025-06-18+ | v2 |
Save one RStudio document to its existing path. Omit document_id to target the active editor. Unsaved new documents without a path may require interactive RStudio handling and can fail.
Replace the complete live contents of one RStudio document. This changes the in-memory editor buffer and may overwrite unsaved work. Omit document_id to target the active or last-active editor.
Move the cursor in a live RStudio document without changing text. Positions use one-based lines and zero-based columns.
Set one selection range in a live RStudio document without changing text. Positions use one-based lines and zero-based columns.
Execute arbitrary R code synchronously in the active RStudio global environment and return bounded visible output, warnings, messages, value class, and elapsed time. The default elapsed limit is 30 seconds and returned output limit is 20,000 characters. This can modify files, workspace state, processes, packages, and remote systems.
Read local R and RStudio versions, working directory, active project, and active-document metadata. Returns active_document as null when there is no active source document.
Destructive operations lack confirmation pattern. Tools like rstudio_editor_set_contents and rstudio_editor_replace_range can overwrite unsaved work but offer no dry-run or confirmation step to prevent accidental data loss.
Parameter constraints not fully specified. rstudio_r_execute accepts timeout_seconds (1-120) and max_output_chars (100-100,000) but descriptions do not explicitly state these bounds, forcing LLMs to infer valid ranges.