Post

Introducing acquaint, an R package that turns your R sessions into a Model Context Protocol (MCP) server. This allows MCP-enabled tools like Claude Desktop and Claude Code to run #rstats code _in your active R sessions_ to explore objects, read documentation, etc. posit-dev.github.io/acquaint/

27 reposts151 likes

Please do file an issue if you struggled to get your config working! I would anticipate any of Windows/Linux/macOS should work, as well as R processes from Positron / RStudio / the command line.

Can confirm this works. After a bit of looking about: Switch the Copilot panel to Agent, click the Configure Tools button to the left of the send message button, choose Add More Tools, choose Command, fill in the RScript command as per the website.

Hey Simon! This is awesome, really excited to try this out! Are there any risks with sensitive information or environment variables being passed in to the prompts/metadata via the MCP server and do you have any recommendations for using the MCP server safely?

This is indeed a risk. We've configured a default set of tools that we feel are atomic and reduce risk, rather than some sort of general `run_r_code()` tool. In general, I'd recommend only using model providers that satisfy your privacy needs, i.e. that you're comfortable passing your data to.

Trying to check it out, but when I tried to add to claude code I got an error: claude mcp add -s "user" r-acquaint Rscript -e "acquaint::mcp_server()" Invalid environment variable format: acquaint::mcp_server(), environment variables should be added as: -e KEY1=value1 -e KEY2=value2