6–9 Jul 2026
Europe/Warsaw timezone

Now we'R coding! Bringing Agent Assistants Into Live R Sessions

8 Jul 2026, 16:00
2h
Poster Poster

Speakers

Adam Forys (Roche) Magdalena Krochmal (Roche)

Description

AI code assistants such as Claude Code, opencode, and Aider can read, write, and run code. However, they work separately from the user's R session. They cannot look at live objects, call R functions, or update a running Shiny application. We present a way to connect these assistants directly to R and Shiny using the Model Context Protocol (MCP).

The main idea is to use CLI-based AI agents as chat providers in the R ecosystem. Instead of relying only on API-based models, users can connect to any CLI agent that supports MCP and get the same chat experience. The agent keeps its own tools, such as file editing, search, and shell access, while also getting access to custom R tools and live session data.

The connection works through MCP and the mcptools package. Together, they create a two-way link between the CLI agent and the running R process. The agent can call R functions, read session state, and in Shiny applications, change UI components in real time. The user talks to the agent through a chat interface, while the agent works with both the file system and the live R session.

The poster will show the architecture using Claude Code as an example, but the design works with any CLI agent that supports MCP. This makes it a general pattern for bringing AI coding assistants into R, Shiny, or other programming environments.

If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.

AI used for proof-reading.

Keywords: Please list up to 5 keywords to help us find the right session for your contribution. AI agents, Model Context Protocol, Shiny, MCP, real time
Virtual Option This submission is for onsite presentation only
Video Recording Video sharing is fine
The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. Confirm

Author

Adam Forys (Roche)

Co-author

Presentation materials

There are no materials yet.