Skip to content

About

A sandboxed interactive data workbench for agents

Resources

Stars

78 stars

Watchers

1 watching

Forks

Repository files navigation

MCP Console

An interactive data workbench for AI agents.

Console gives agents a persistent, sandboxed environment for working with data in R, Python, and SQL. It adapts the interactive facilities of these runtimes to the way agents work, including help systems, debuggers, graphics, and package management.

Agents can work in one language or move freely between them within a session, add packages as the analysis develops, and manage multiple sessions in parallel. Console records the work as it unfolds, giving you a record of the code, results, plots, and the agent's notes.

MCP Console is a standalone binary written in Rust. It works with MCP-compatible clients such as Codex, Claude Code, and Pi, as well as libraries and SDKs for building AI-powered applications.

Development preview: interfaces may change. Console supports macOS, Linux, and Windows on x86-64 and ARM64.

Quickstart

Install uv and run the command for your client:

uvx mcp-console configure-client codex
# Or: uvx mcp-console configure-client claude

Restart your client after setup.

For other MCP clients, register uvx mcp-console serve as a stdio MCP server.

Python and SQL work out of the box. To use R, you'll need to have R installed separately. No Console configuration file is required.

A good way to get a feel for Console is to try it with an analysis you're already working on. Ask your agent to explore some data using Console, follow up on something you find interesting, and have a look at the session recording.

Get started · Install and connect

Working with Console

Interactive sessions

An analyst rarely knows at the outset every step an analysis will involve: what they discover along the way informs what they do next.

Like REPLs and notebooks, Console is built around a stateful session. With data and intermediate results still in memory, asking another question is often trivial.

In contrast to working through a shell tool, an agent doesn't need to start a fresh process, reload data, or repeat preprocessing steps each time it wants to run a snippet of code. In contrast to working through a terminal (PTY) tool, it doesn't need to parse prompts or rely on heuristics to determine whether a computation has finished or is waiting for input.

Sandboxed execution

Console runs the agent's code in an operating-system sandbox. The operating system enforces restrictions on filesystem and network access independently of the agent's decisions. These restrictions apply equally to the code the agent writes, the packages it loads, and any subprocesses it starts.

Within its session, the agent is free to explore and manipulate data; what it can access and change outside the session remains up to you.

Console ships with two built-in sandbox policies:

  • read_only permits reading host files and working in private temporary storage, while restricting filesystem modifications elsewhere and network access.
  • workspace additionally permits modifications within the project directory, with exceptions for sensitive locations such as .git and agent configuration files.

The built-in default is read_only, though client and project configuration can select different permissions. Readable host files, including secrets, are not protected from reads under this policy.

The configuration system lets you grant write access to selected directories, deny reads from sensitive paths, and allow network access to selected domains through a proxy.

An interface for agents

Rather than interact with the runtimes through a terminal, Console embeds them directly, giving it access to their internal state. It can report whether a runtime is idle, busy, or waiting for input, and return results as soon as they're available.

Many of the runtimes' interactive facilities have been adapted to the way agents work.

  • Browse help pages and vignettes.
  • See and refine plots, returned directly as images.
  • Drive a debugger, step through code, and inspect live objects.
  • Read large outputs selectively from overflow files without flooding the agent's context.

Long-running computations and parallel sessions

Console lets an agent manage multiple sessions in parallel.

An agent can start a long-running computation in one session and continue working in another. It can monitor the computation's progress, interrupt it, or restart the session if it hangs.

With separate sessions, an agent can also pursue several lines of inquiry concurrently.

R, Python, and SQL in one session

Console embeds R, Python, and SQL runtimes in the same process. An agent can create a data frame in R, query it directly with SQL, and work with it in Python, without writing intermediate files or reloading the data.

Native bridges make it efficient to pass data between languages, often without copying it. An agent can choose a language anew at each step of an analysis, drawing on the strengths of each language and its package ecosystem.

The SQL interface uses an in-memory DuckDB database by default, and can also use existing database connections from R or Python.

Console makes it easy to work across languages, but works equally well as a pure R, Python, or SQL REPL.

Packages and environments

Console lets agents request packages as they work, even when the runtime has no network access or permission to write to package libraries.

An agent can declare package requirements alongside its code, and Console prepares the dependencies in a separate sandbox with its own permissions. Console can add compatible packages without forcing a session restart or losing the work already in memory.

By default, Console manages its own Python environment and separate R package libraries, so the agent's package installations don't alter the environments you use for other work.

It prepares a starter set of packages, including NumPy, pandas, and Matplotlib for Python and tidyverse packages for R. You can also point Console at an existing Python environment.

See Packages and environments.

Session recordings

By default, Console records every session as it happens, capturing code, outputs, plots, timings, and runtime events.

The agent can also add notes alongside or between code submissions, treating the recording as an append-only journal. It can jot down observations, hypotheses, tentative conclusions, and leads worth pursuing.

Rather than relying solely on the agent's summary, you can examine how it prepared the data, inspect the code and intermediate results, and see what other approaches it tried.

Recordings are available in several forms:

  • Markdown: a readable account of the investigation, bringing together code, notes, and results.
  • Quarto: a document with inline package requirements that you and the agent can review, refine, and develop into a report.
  • JSONL: a structured event log for programmatic monitoring, tracing, debugging, and model evaluation.

Recordings are stored locally and are not redacted; review them before sharing.

Equip your own agent

Console provides the data workbench for your agent. It manages persistent sessions, package environments, sandboxing, and session recordings, and gives agents access to the runtimes and their interactive facilities.

You're free to use whatever model, SDK, or framework suits your application and manage the conversation however you like.

You can also tailor the interface Console presents to the agent. Choose which languages and tool arguments to expose, customize tool descriptions and prompts, initialize sessions with preloaded datasets or database connections, and configure sandbox permissions to suit your application.

Console's R and Python packages make it easy to integrate with Ellmer, Chatlas, the Anthropic SDK, the Codex SDK, and other libraries and agent frameworks.

Build on Console · R integration · Python integration

Development version

Install the build tools, then install the development version and register it with your client:

uv tool install git+https://github.com/posit-dev/mcp-console
mcp-console configure-client codex --no-uvx
# Or: mcp-console configure-client claude --no-uvx

Restart your client after setup.

Documentation

mcp-console was previously called mcp-repl. Licensed under the MIT license.

About

A sandboxed interactive data workbench for agents

Resources

Stars

78 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages