You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fcd8b2e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: NEWS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
3
3
## Unreleased
4
4
5
+
- Added GitHub Copilot CLI setup support via `install_cli(tools = "copilot")`, including both `copilot mcp add` and `~/.copilot/mcp-config.json` instructions.
5
6
- Added optional async job progress reporting through `clauder_progress(stage, message = NULL, percent = NULL)` and MCP `get_async_result` progress text.
6
7
- Hardened Windows multi-session stale discovery cleanup by replacing `tools::pskill(pid, signal = 0)` liveness probing with a read-only PID check.
7
8
- Added regression coverage for async progress sidecar helpers, MCP bridge progress text, and Windows-safe cleanup.
<h1>ClaudeR - The Modern Researcher's Toolkit</h1>
4
4
<p>
5
-
<b>Connect RStudio to Claude Code, Codex, Qwen Code, Gemini CLI, or any MCP-based LLM agent for interactive coding, multi-agent orchestration, automated manuscript auditing, and data annotation.</b>
5
+
<b>Connect RStudio to Claude Code, Codex, GitHub Copilot CLI, Qwen Code, Gemini CLI, or any MCP-based LLM agent for interactive coding, multi-agent orchestration, automated manuscript auditing, and data annotation.</b>
**ClaudeR** is an R package that forges a direct link between RStudio and MCP configured LLM agents like Claude Code, Codex, or Qwen Code. This allows interactive coding sessions where the agent can execute code in your active RStudio environment so it can see the executed code and any generated plots in real-time. If you need help editing a script, a quick analysis done, or an LLM to audit your statistical claims against any manuscript before submission: ClaudeR has got your back.
21
+
**ClaudeR** is an R package that forges a direct link between RStudio and MCP configured LLM agents like Claude Code, Codex, GitHub Copilot CLI, or Qwen Code. This allows interactive coding sessions where the agent can execute code in your active RStudio environment so it can see the executed code and any generated plots in real-time. If you need help editing a script, a quick analysis done, or an LLM to audit your statistical claims against any manuscript before submission: ClaudeR has got your back.
22
22
23
23
This package, additionally, allows multiple agents to work on one script, or it can make multiple RStudio windows siloed so multiple agents can operate independently on different datasets. It's also compatible with Cursor and any service that support MCP servers.
install_cli(tools="copilot") # For GitHub Copilot CLI
36
37
37
38
# Start the server in RStudio
38
39
claudeAddin()
@@ -57,7 +58,8 @@ claudeAddin()
57
58
-**Export clean script.** Click "Export Clean Script" in the Shiny addin to strip all timestamps, agent labels, and log headers from a session log, producing a runnable `.R` file with just the code. Error blocks are preserved as comments. Also available programmatically via `export_log_as_script()`.
58
59
-**PyPI package (`clauder-mcp`).** The Python MCP bridge is now available as a standalone package on PyPI. Run it with `uvx clauder-mcp` for zero-config setup with no Python path or pip install needed. The installers (`install_cli()` and `install_clauder()`) default to uvx, with a `use_uvx = FALSE` fallback for legacy setups.
59
60
-**`read_file` tool.** Agents can now read any text file from disk (.R, .qmd, .csv, .log, etc.) without it being open in RStudio. Enables session continuity workflows: point an agent at a previous log file and tell it to pick up where the last session left off.
60
-
-**Codex + Qwen Code CLI support.**`install_cli(tools = "codex")` and `install_cli(tools = "qwen")` generate setup commands for OpenAI Codex and the [Qwen Code CLI](https://github.com/QwenLM/qwen-code) (Alibaba's gemini-cli fork). Both join Claude Code and Gemini as supported CLI agents.
61
+
-**GitHub Copilot CLI support.**`install_cli(tools = "copilot")` generates the `copilot mcp add` command and the `~/.copilot/mcp-config.json` block needed to connect Copilot CLI to ClaudeR through `uvx clauder-mcp`.
62
+
-**Codex + Qwen Code CLI support.**`install_cli(tools = "codex")` and `install_cli(tools = "qwen")` generate setup commands for OpenAI Codex and the [Qwen Code CLI](https://github.com/QwenLM/qwen-code) (Alibaba's gemini-cli fork). They join Claude Code, Copilot CLI, and Gemini as supported CLI agents.
61
63
-**Multi-agent orchestration.** Run multiple AI agents on the same R session or spread them across separate RStudio windows. Each agent gets a unique ID on startup. Console output, log files, and execution history are all attributed per agent, so you always know who did what. On its very first tool call, each agent receives a context briefing with its own ID, any other agents active on the session, and the log file path, giving it full awareness of the shared environment without any manual setup. Agents can call `get_session_history` to review what other agents have done, or read the shared log file directly. The Shiny viewer tracks connected agents in real-time.
62
64
-**Session discovery.** Each RStudio session writes a discovery file to `~/.claude_r_sessions/` on startup. AI agents find sessions automatically with no hardcoded ports. Name your sessions (e.g. "analysis", "modeling") and run them on different ports. When multiple sessions exist, agents automatically route to the session named "default". Non-default agents should call `connect_session` to bind to their target session. Single-session setups work with zero config.
63
65
-**Redesigned Shiny viewer.** Cleaner UI with grouped panels for Session, Agents, Logging, and Advanced settings. Shows connected agents and execution count in real-time. Click the `?` button for a built-in guide on multi-session setup and agent identity.
@@ -132,7 +134,7 @@ With these tools, you can:
132
134
-**Feedback & Assistance**: Get explanations of your R scripts or request edits at specific lines.
133
135
-**Visualization**: The AI can generate, view, and refine plots and visualizations.
134
136
-**Data Analysis**: Let the AI analyze your datasets and iteratively provide insights.
135
-
-**Multi-Agent Workflows**: Run Claude Desktop, Claude Code, Codex, Qwen Code, and Gemini CLI on the same R session simultaneously. Each agent is uniquely identified, and they can see each other's work through shared history and log files.
137
+
-**Multi-Agent Workflows**: Run Claude Desktop, Claude Code, Codex, GitHub Copilot CLI, Qwen Code, and Gemini CLI on the same R session simultaneously. Each agent is uniquely identified, and they can see each other's work through shared history and log files.
136
138
-**Long-Running Analysis**: Async execution handles model fitting, simulations, and large data processing without timing out.
137
139
-**Code Logging**: Save all code executed by the AI to log files for future reference. Every entry is tagged with the agent that ran it.
138
140
-**Console Printing**: Print the AI's code to the console before execution.
@@ -253,7 +255,7 @@ This architecture ensures that the AI can only perform approved operations throu
253
255
254
256
## CLI Integration
255
257
256
-
ClaudeR supports command-line interface (CLI) tools: the **Claude Code CLI**, the **OpenAI Codex CLI**, the **Qwen Code CLI**, and the **Google Gemini CLI**. This is ideal for developers who prefer a terminal-based workflow, allowing you to interact with your AI assistant directly from the command line while maintaining a live connection to your RStudio session.
258
+
ClaudeR supports command-line interface (CLI) tools: the **Claude Code CLI**, the **OpenAI Codex CLI**, the **GitHub Copilot CLI**, the **Qwen Code CLI**, and the **Google Gemini CLI**. This is ideal for developers who prefer a terminal-based workflow, allowing you to interact with your AI assistant directly from the command line while maintaining a live connection to your RStudio session.
After running the function, you must **manually apply the configuration**:
342
347
-**For Claude / Codex / Qwen**: Copy the command printed in the R console and run it in your terminal.
348
+
-**For Copilot**: Copy the printed `copilot mcp add` command, or merge the printed block into `~/.copilot/mcp-config.json`.
343
349
-**For Gemini**: Copy the generated JSON and manually add it to your `gemini.json` settings file.
344
350
345
351
After setup, **quit and restart** any active Desktop Apps or terminal sessions for the new settings to load.
@@ -364,7 +370,7 @@ The ClaudeR add-in will appear in your RStudio Viewer pane. Click **"Start Serve
364
370
### Part 2: In Your AI Tool
365
371
366
372
-**For Desktop Apps**: Open the Claude Desktop App or Cursor and begin your session.
367
-
-**For CLI Tools**: Open your terminal and use the `claude`, `codex`, `qwen`, or `gemini` commands to start interacting with your AI assistant.
373
+
-**For CLI Tools**: Open your terminal and use the `claude`, `codex`, `copilot`, `qwen`, or `gemini` commands to start interacting with your AI assistant.
368
374
369
375
> Note: You can regain console/active document control by clicking the stop button in the RStudio console. This closes the Shiny UI but the MCP server keeps running in the background and your AI agents stay connected. Re-run `claudeAddin()` to bring the viewer pane back with the same server state (port, session name, execution count). To fully stop the server, click **"Stop Server"** in the UI before closing.
370
376
@@ -424,7 +430,7 @@ If you can do it with R, your AI assistant can too.
424
430
425
431
## Limitations
426
432
427
-
- Each R session can connect to one Claude Desktop/Cursor app at a time. However, multiple CLI agents (Claude Code, Codex, Qwen Code, Gemini) can share the same session alongside a Desktop app. To isolate agents, run separate RStudio windows with different session names and ports.
433
+
- Each R session can connect to one Claude Desktop/Cursor app at a time. However, multiple CLI agents (Claude Code, Codex, GitHub Copilot CLI, Qwen Code, Gemini) can share the same session alongside a Desktop app. To isolate agents, run separate RStudio windows with different session names and ports.
428
434
- R is single-threaded, but async jobs run in a separate process via `callr` so the main session stays responsive. The background process does not share the main session's environment by default. Use the `inputs`/`outputs` parameters on `execute_r_async` to auto-marshal data in and out, or write self-contained code that uses `saveRDS()`/`readRDS()` manually.
Copy file name to clipboardExpand all lines: clauder-mcp/README.md
+23-1Lines changed: 23 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
MCP server that connects AI assistants to RStudio for interactive R coding and data analysis.
4
4
5
-
This is the Python MCP bridge component of [ClaudeR](https://github.com/IMNMV/ClaudeR). It works with Claude Desktop, Claude Code, Codex CLI, Qwen Code CLI, Gemini CLI, Cursor, and any other MCP-compatible client.
5
+
This is the Python MCP bridge component of [ClaudeR](https://github.com/IMNMV/ClaudeR). It works with Claude Desktop, Claude Code, Codex CLI, GitHub Copilot CLI, Qwen Code CLI, Gemini CLI, Cursor, and any other MCP-compatible client.
6
6
7
7
## Prerequisites
8
8
@@ -31,6 +31,28 @@ claude mcp add --transport stdio --scope user r-studio -- uvx clauder-mcp
### Step 2: Run the Setup Function for Your AI Tool
24
24
25
-
Ask the user which CLI agent they want to install for (Claude Code, Codex, Qwen Code, or Gemini), then run the matching command:
25
+
Ask the user which CLI agent they want to install for (Claude Code, Codex, GitHub Copilot CLI, Qwen Code, or Gemini), then run the matching command:
26
26
27
27
**For Claude Code CLI:**
28
28
```R
@@ -36,6 +36,12 @@ library(ClaudeR)
36
36
install_cli(tools="codex")
37
37
```
38
38
39
+
**For GitHub Copilot CLI:**
40
+
```R
41
+
library(ClaudeR)
42
+
install_cli(tools="copilot")
43
+
```
44
+
39
45
**For Qwen Code CLI:**
40
46
```R
41
47
library(ClaudeR)
@@ -55,7 +61,7 @@ install_clauder()
55
61
# For Cursor: install_clauder(for_cursor = TRUE)
56
62
```
57
63
58
-
Each function prints the exact command or config you need to apply. For CLI tools, copy and run the printed command in your terminal. For Gemini, copy the JSON into your `gemini.json` settings file.
64
+
Each function prints the exact command or config you need to apply. For Claude Code, Codex, and Qwen, copy and run the printed command in your terminal. For Copilot, use the printed `copilot mcp add` command or merge the JSON block into `~/.copilot/mcp-config.json`. For Gemini, copy the JSON into your `gemini.json` settings file.
59
65
60
66
### Step 3: Start the Server in RStudio (Manual Step)
0 commit comments