Summary
I''ve been using ClaudeR for data analysis in my research. It has been working just fine for the past week, but today, after successfully running one R command, all subsequent commands fail with an error message. I have to restart the server after every single command, making ClaudeR unusable for my workflow.
My Setup
- Computer: Windows 11
- R Version: 4.5.0
- RStudio: Latest version
- Python: 3.13.5 (I followed the ClaudeR installation guide)
- ClaudeR Version: 0.2.0
- Location: UK
What Happens
- I start RStudio and run
library(ClaudeR) then claudeAddin()
- Click "Start Server" - everything looks fine, shows "HTTP Server running"
- Ask Claude to run any R command → This always works perfectly
- Ask Claude to run any second command → This always fails
- Every command after that fails until I restart the server
Error Message
When the second command fails, I see this error in Claude Desktop:
"Failed to call tool execute_r: TypeError: Cannot convert undefined or null to object"
Examples of What I've Tested
First command (always works):
- Simple math:
1+1 ✅
- Complex analysis of my cancer data ✅
- Loading packages and data manipulation ✅
Second command (always fails):
- Simple math:
2+2 ❌
- Just typing
"hello" ❌
- Any R command at all ❌
It doesn't matter if the first command is complex or the second is simple - the pattern is always the same.
Additional Issue: Console Access
When the ClaudeR connection is active, I lose access to the R console. The console shows a red "running" indicator and I don't get the normal > prompt anymore. If I press Escape to try to get the prompt back, the ClaudeR server shuts down completely and the viewer pane goes blank.
This means I can't:
- Run any R commands manually while ClaudeR is connected
- Check my data or variables directly in the console
- Troubleshoot issues by testing commands myself
- Work on other parts of my analysis while ClaudeR is running
What I've Tried
- Restarting RStudio, Claude Desktop and the workstation completely
- Trying different port numbers in the settings
- Working both inside and outside R projects
- Following the troubleshooting guide exactly
- Checking that Python packages are installed (they are)
The same pattern happens every time regardless of what I try.
My Configuration
I followed the installation guide and my configuration file contains:
{
"mcpServers": {
"r-studio": {
"command": "py",
"args": ["-3.13", "C:/Users/[USERNAME]/.R/library/ClaudeR/scripts/persistent_r_mcp.py"],
"env": {
"PYTHONPATH": "C:/Users/[USERNAME]/AppData/Local/Programs/Python/Python313/Lib/site-packages",
"PYTHONUNBUFFERED": "1"
}
}
}
}
What I Notice
- The ClaudeR interface always shows "Server running" even when commands fail
- No error messages appear in R itself
- The log file shows successful commands but failed ones don't appear at all
- Restarting the ClaudeR server temporarily fixes it (one command works, then it breaks again)
I'd be happy to provide any additional information or test specific scenarios if it would help resolve this issue. Thanks!
Summary
I''ve been using ClaudeR for data analysis in my research. It has been working just fine for the past week, but today, after successfully running one R command, all subsequent commands fail with an error message. I have to restart the server after every single command, making ClaudeR unusable for my workflow.
My Setup
What Happens
library(ClaudeR)thenclaudeAddin()Error Message
When the second command fails, I see this error in Claude Desktop:
"Failed to call tool execute_r: TypeError: Cannot convert undefined or null to object"
Examples of What I've Tested
First command (always works):
1+1✅Second command (always fails):
2+2❌"hello"❌It doesn't matter if the first command is complex or the second is simple - the pattern is always the same.
Additional Issue: Console Access
When the ClaudeR connection is active, I lose access to the R console. The console shows a red "running" indicator and I don't get the normal
>prompt anymore. If I press Escape to try to get the prompt back, the ClaudeR server shuts down completely and the viewer pane goes blank.This means I can't:
What I've Tried
The same pattern happens every time regardless of what I try.
My Configuration
I followed the installation guide and my configuration file contains:
{ "mcpServers": { "r-studio": { "command": "py", "args": ["-3.13", "C:/Users/[USERNAME]/.R/library/ClaudeR/scripts/persistent_r_mcp.py"], "env": { "PYTHONPATH": "C:/Users/[USERNAME]/AppData/Local/Programs/Python/Python313/Lib/site-packages", "PYTHONUNBUFFERED": "1" } } } }What I Notice
I'd be happy to provide any additional information or test specific scenarios if it would help resolve this issue. Thanks!