Skip to main content

Bring AI to Jupyter notebooks. MCP server for Claude, ChatGPT, Gemini, OpenCode and any agent.

Project description

nteract

A convenience wrapper that finds and launches runt mcp — the MCP server shipped with the nteract desktop app.

Download the nteract desktop app — you'll need it to see notebooks, collaborate with agents, and manage environments.

The recommended way to add the MCP server is runt mcp directly. This PyPI package is a convenience for users who prefer uvx.

Quick Start

The MCP server ships with the desktop app. After installing, use runt mcp directly:

Claude Code

# Stable
claude mcp add nteract -- runt mcp

# Nightly
claude mcp add nteract-nightly -- runt-nightly mcp

Manual JSON config

{
  "mcpServers": {
    "nteract": {
      "command": "runt",
      "args": ["mcp"]
    }
  }
}

Via this PyPI package

If runt isn't on your PATH, this package finds it in the app bundle:

claude mcp add nteract -- uvx nteract

That's it. Now Claude can execute Python code, create visualizations, and work with your data.

What is this?

nteract is an MCP (Model Context Protocol) server that connects AI assistants like Claude to Jupyter notebooks. It enables:

  • Code execution: Run Python in a persistent kernel
  • Real-time collaboration: Watch the AI work in the nteract desktop app
  • Shared state: Multiple agents can work on the same notebook
  • Environment management: Automatic Python environment setup

Example

Ask Claude:

"Help me visualize my log data"

Claude will:

  1. Connect to a notebook session
  2. Write and execute code
  3. Generate visualizations
  4. Show you the results

You can open the same notebook in the nteract desktop app to see changes in real-time and collaborate with the AI.

Available Tools

Tool Description
list_active_notebooks List all open notebook sessions
join_notebook Join an existing notebook session by ID
open_notebook Open an existing .ipynb file
create_notebook Create a new notebook
save_notebook Save notebook to disk as .ipynb file
create_cell Add a cell to the notebook (use and_run=True to execute)
execute_cell Run a specific cell (returns partial results after timeout)
run_all_cells Queue all code cells for execution
set_cell Update a cell's source and/or type
get_cell Get a cell by ID with outputs
get_all_cells View all cells in the notebook
replace_match Targeted literal text find-and-replace in a cell
replace_regex Regex-based find-and-replace in a cell
move_cell Reorder a cell within the notebook
clear_outputs Clear a cell's outputs
delete_cell Remove a cell from the notebook
interrupt_kernel Interrupt the currently executing cell
restart_kernel Restart kernel with updated dependencies
show_notebook Open the notebook in the nteract desktop app (disabled with --no-show)
add_dependency Add a Python package dependency
remove_dependency Remove a dependency
get_dependencies List current dependencies
sync_environment Hot-install new deps without restart

CLI Flags

Flag Description
--version Print version and exit
--nightly Use runt-nightly (nightly daemon and app)
--stable Use runt (stable daemon and app, default)
--legacy Use the built-in Python MCP server instead of runt mcp

By default, nteract finds and exec's the installed runt (or runt-nightly) binary. The --legacy flag falls back to the built-in Python MCP server.

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Claude    │────▶│   nteract   │────▶│   runtimed  │
│  (or other  │     │ MCP Server  │     │   daemon    │
│     AI)     │     │             │     │             │
└─────────────┘     └─────────────┘     └──────┬──────┘
                                               │
                    ┌─────────────┐             │
                    │   nteract   │◀────────────┘
                    │ Desktop App │  (real-time sync)
                    └─────────────┘
  • nteract (this package): MCP server for AI assistants
  • runtimed: Low-level daemon and Python bindings (docs)
  • nteract desktop: Native app for humans to collaborate with AI

Real-time Collaboration

The magic of nteract is that AI and humans share the same notebook:

  1. AI connects via MCP and runs code
  2. Human opens the same notebook in nteract desktop
  3. Changes sync instantly via CRDT
  4. Both see the same kernel state

This enables workflows like:

  • AI does initial analysis, human refines
  • Human writes code, AI debugs errors
  • Multiple AI agents collaborate on complex tasks

Development

# Clone
git clone https://github.com/nteract/desktop
cd desktop/python/nteract

# Install dependencies
uv sync

# Run tests
uv run pytest

Related Projects

License

BSD-3-Clause

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nteract-2.1.1a202604060447.tar.gz (64.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nteract-2.1.1a202604060447-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file nteract-2.1.1a202604060447.tar.gz.

File metadata

  • Download URL: nteract-2.1.1a202604060447.tar.gz
  • Upload date:
  • Size: 64.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nteract-2.1.1a202604060447.tar.gz
Algorithm Hash digest
SHA256 776d0e86297881f8d32067428ae6a22dde35e95f74f80bdec4e68f7099bf84ef
MD5 3eeb692bcc5c261b7655361bbcdca5bd
BLAKE2b-256 1013a8e4b0071cb64d34d0a3f7fc8aea45ba47f5becdb39db21714fa29ca1ea3

See more details on using hashes here.

File details

Details for the file nteract-2.1.1a202604060447-py3-none-any.whl.

File metadata

  • Download URL: nteract-2.1.1a202604060447-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nteract-2.1.1a202604060447-py3-none-any.whl
Algorithm Hash digest
SHA256 e2c99789063889fd4c98e027dee186251a322d2e596f6a5c84467f7cd44c44db
MD5 67f10ef6d3d4ac4e4058d3c4874d76a7
BLAKE2b-256 6c638382248bc1324519e5eed67cb0d2ab78111f3729e924c8b91ea6a4d440ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page