nteract 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+
7
+ jobs:
8
+ lint:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+
13
+ - name: Install uv
14
+ uses: astral-sh/setup-uv@v5
15
+
16
+ - name: Set up Python
17
+ run: uv python install 3.12
18
+
19
+ - name: Install dependencies
20
+ run: uv sync --dev
21
+
22
+ - name: Run ruff check
23
+ run: uv run ruff check src/
24
+
25
+ - name: Run ruff format check
26
+ run: uv run ruff format --check src/
27
+
28
+ typecheck:
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@v5
35
+
36
+ - name: Set up Python
37
+ run: uv python install 3.12
38
+
39
+ - name: Install dependencies
40
+ run: uv sync --dev
41
+
42
+ - name: Run ty
43
+ run: uv run ty check src/
44
+
45
+ test:
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ - name: Install uv
51
+ uses: astral-sh/setup-uv@v5
52
+
53
+ - name: Set up Python
54
+ run: uv python install 3.12
55
+
56
+ - name: Install dependencies
57
+ run: uv sync --dev
58
+
59
+ - name: Run tests
60
+ run: uv run pytest
@@ -0,0 +1,41 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+
13
+ - name: Install uv
14
+ uses: astral-sh/setup-uv@v5
15
+
16
+ - name: Set up Python
17
+ run: uv python install 3.12
18
+
19
+ - name: Build package
20
+ run: uv build
21
+
22
+ - name: Upload dist artifacts
23
+ uses: actions/upload-artifact@v4
24
+ with:
25
+ name: dist
26
+ path: dist/
27
+
28
+ publish:
29
+ needs: build
30
+ runs-on: ubuntu-latest
31
+ permissions:
32
+ id-token: write
33
+ steps:
34
+ - name: Download dist artifacts
35
+ uses: actions/download-artifact@v4
36
+ with:
37
+ name: dist
38
+ path: dist/
39
+
40
+ - name: Publish to PyPI
41
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,19 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+
8
+ # Virtual environments
9
+ .venv/
10
+
11
+ # Caches
12
+ .ruff_cache/
13
+ .pytest_cache/
14
+ .mypy_cache/
15
+
16
+ # IDE
17
+ .idea/
18
+ .vscode/
19
+ *.swp
nteract-0.0.3/PKG-INFO ADDED
@@ -0,0 +1,158 @@
1
+ Metadata-Version: 2.4
2
+ Name: nteract
3
+ Version: 0.0.3
4
+ Summary: Bring AI to Jupyter notebooks. MCP server for Claude, ChatGPT, Gemini, OpenCode and any agent.
5
+ Author-email: Kyle Kelley <rgbkrk@gmail.com>
6
+ License-Expression: BSD-3-Clause
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: httpx<1.0,>=0.27.0
9
+ Requires-Dist: mcp>=1.26.0
10
+ Requires-Dist: runtimed>=0.1.5a1
11
+ Description-Content-Type: text/markdown
12
+
13
+ # nteract/nteract
14
+
15
+ ## What's going on?
16
+
17
+ If you're here looking for the Electron-based nteract desktop app, you can view the source [in this repo](https://github.com/nteract/archived-desktop-app). **That desktop app is not actively maintained.**
18
+
19
+ We're actively developing the spritual successor to the nteract desktop app in the [nteract/desktop repo](https://github.com/nteract/desktop).
20
+
21
+ ### The New Desktop App
22
+
23
+ We're actively developing the spritual successor to the nteract desktop app in the [nteract/desktop repo](https://github.com/nteract/desktop).
24
+
25
+ The new app is a native desktop app with instant startup and intelligent environment management.
26
+
27
+ <img width="1100" height="750" alt="Screenshot 2026-02-27 at 8 33 13 AM" src="https://github.com/user-attachments/assets/06be5ab5-9390-43a9-993a-ccb07ec9139d" />
28
+
29
+ ## Bringing Agents in the Loop
30
+
31
+ We're in the prelimiary stages of hooking up the realtime system from nteract/desktop to any agent of your choice. Collaborate with agents in notebooks, render interactive elements, and explore data together.
32
+
33
+ ### Quick Start
34
+
35
+ #### Claude Code
36
+
37
+ ```bash
38
+ # Add to Claude Code
39
+ claude mcp add nteract -- uvx nteract
40
+ ```
41
+
42
+ That's it. Now Claude can execute Python code, create visualizations, and work with your data.
43
+
44
+ ## What is this?
45
+
46
+ nteract is an MCP (Model Context Protocol) server that connects AI assistants like Claude to Jupyter notebooks. It enables:
47
+
48
+ - **Code execution**: Run Python in a persistent kernel
49
+ - **Real-time collaboration**: Watch the AI work in the nteract desktop app
50
+ - **Shared state**: Multiple agents can work on the same notebook
51
+ - **Environment management**: Automatic Python environment setup
52
+
53
+ ## Example
54
+
55
+ Ask Claude:
56
+
57
+ > "Help me visualize my log data"
58
+
59
+ Claude will:
60
+ 1. Connect to a notebook session
61
+ 2. Write and execute code
62
+ 3. Generate visualizations
63
+ 4. Show you the results
64
+
65
+ You can open the same notebook in the [nteract desktop app](https://github.com/nteract/desktop) to see changes in real-time and collaborate with the AI.
66
+
67
+ ## Installation
68
+
69
+ ```bash
70
+ uvx --prerelease=allow nteract
71
+ ```
72
+
73
+ ## Claude Code Setup
74
+
75
+ Add nteract as an MCP server:
76
+
77
+ ```bash
78
+ claude mcp add nteract -- uvx --prerelease=allow nteract
79
+ ```
80
+
81
+ Or manually add to your Claude configuration:
82
+
83
+ ```json
84
+ {
85
+ "mcpServers": {
86
+ "nteract": {
87
+ "command": "uvx",
88
+ "args": ["--prerelease=allow", "nteract"]
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ## Available Tools
95
+
96
+ | Tool | Description |
97
+ |------|-------------|
98
+ | `connect_notebook` | Connect to a notebook (new or existing) |
99
+ | `run_code` | Execute Python code |
100
+ | `create_cell` | Add a cell to the notebook |
101
+ | `execute_cell` | Run a specific cell |
102
+ | `get_all_cells` | View all cells in the notebook |
103
+
104
+ ## Architecture
105
+
106
+ ```
107
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
108
+ │ Claude │────▶│ nteract │────▶│ runtimed │
109
+ │ (or other │ │ MCP Server │ │ daemon │
110
+ │ AI) │ │ │ │ │
111
+ └─────────────┘ └─────────────┘ └──────┬──────┘
112
+
113
+ ┌─────────────┐ │
114
+ │ nteract │◀────────────┘
115
+ │ Desktop App │ (real-time sync)
116
+ └─────────────┘
117
+ ```
118
+
119
+ - **nteract** (this package): MCP server for AI assistants
120
+ - **runtimed**: Low-level daemon and Python bindings ([docs](https://github.com/nteract/desktop))
121
+ - **nteract desktop**: Native app for humans to collaborate with AI
122
+
123
+ ## Real-time Collaboration
124
+
125
+ The magic of nteract is that AI and humans share the same notebook:
126
+
127
+ 1. AI connects via MCP and runs code
128
+ 2. Human opens the same notebook in nteract desktop
129
+ 3. Changes sync instantly via CRDT
130
+ 4. Both see the same kernel state
131
+
132
+ This enables workflows like:
133
+ - AI does initial analysis, human refines
134
+ - Human writes code, AI debugs errors
135
+ - Multiple AI agents collaborate on complex tasks
136
+
137
+ ## Development
138
+
139
+ ```bash
140
+ # Clone
141
+ git clone https://github.com/nteract/nteract
142
+ cd nteract
143
+
144
+ # Install dependencies
145
+ uv sync
146
+
147
+ # Run tests
148
+ uv run pytest
149
+ ```
150
+
151
+ ## Related Projects
152
+
153
+ - [nteract/desktop](https://github.com/nteract/desktop) - Native desktop app
154
+ - [runtimed on PyPI](https://pypi.org/project/runtimed/) - Low-level Python bindings
155
+
156
+ ## License
157
+
158
+ BSD-3-Clause
@@ -0,0 +1,146 @@
1
+ # nteract/nteract
2
+
3
+ ## What's going on?
4
+
5
+ If you're here looking for the Electron-based nteract desktop app, you can view the source [in this repo](https://github.com/nteract/archived-desktop-app). **That desktop app is not actively maintained.**
6
+
7
+ We're actively developing the spritual successor to the nteract desktop app in the [nteract/desktop repo](https://github.com/nteract/desktop).
8
+
9
+ ### The New Desktop App
10
+
11
+ We're actively developing the spritual successor to the nteract desktop app in the [nteract/desktop repo](https://github.com/nteract/desktop).
12
+
13
+ The new app is a native desktop app with instant startup and intelligent environment management.
14
+
15
+ <img width="1100" height="750" alt="Screenshot 2026-02-27 at 8 33 13 AM" src="https://github.com/user-attachments/assets/06be5ab5-9390-43a9-993a-ccb07ec9139d" />
16
+
17
+ ## Bringing Agents in the Loop
18
+
19
+ We're in the prelimiary stages of hooking up the realtime system from nteract/desktop to any agent of your choice. Collaborate with agents in notebooks, render interactive elements, and explore data together.
20
+
21
+ ### Quick Start
22
+
23
+ #### Claude Code
24
+
25
+ ```bash
26
+ # Add to Claude Code
27
+ claude mcp add nteract -- uvx nteract
28
+ ```
29
+
30
+ That's it. Now Claude can execute Python code, create visualizations, and work with your data.
31
+
32
+ ## What is this?
33
+
34
+ nteract is an MCP (Model Context Protocol) server that connects AI assistants like Claude to Jupyter notebooks. It enables:
35
+
36
+ - **Code execution**: Run Python in a persistent kernel
37
+ - **Real-time collaboration**: Watch the AI work in the nteract desktop app
38
+ - **Shared state**: Multiple agents can work on the same notebook
39
+ - **Environment management**: Automatic Python environment setup
40
+
41
+ ## Example
42
+
43
+ Ask Claude:
44
+
45
+ > "Help me visualize my log data"
46
+
47
+ Claude will:
48
+ 1. Connect to a notebook session
49
+ 2. Write and execute code
50
+ 3. Generate visualizations
51
+ 4. Show you the results
52
+
53
+ You can open the same notebook in the [nteract desktop app](https://github.com/nteract/desktop) to see changes in real-time and collaborate with the AI.
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ uvx --prerelease=allow nteract
59
+ ```
60
+
61
+ ## Claude Code Setup
62
+
63
+ Add nteract as an MCP server:
64
+
65
+ ```bash
66
+ claude mcp add nteract -- uvx --prerelease=allow nteract
67
+ ```
68
+
69
+ Or manually add to your Claude configuration:
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "nteract": {
75
+ "command": "uvx",
76
+ "args": ["--prerelease=allow", "nteract"]
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ ## Available Tools
83
+
84
+ | Tool | Description |
85
+ |------|-------------|
86
+ | `connect_notebook` | Connect to a notebook (new or existing) |
87
+ | `run_code` | Execute Python code |
88
+ | `create_cell` | Add a cell to the notebook |
89
+ | `execute_cell` | Run a specific cell |
90
+ | `get_all_cells` | View all cells in the notebook |
91
+
92
+ ## Architecture
93
+
94
+ ```
95
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
96
+ │ Claude │────▶│ nteract │────▶│ runtimed │
97
+ │ (or other │ │ MCP Server │ │ daemon │
98
+ │ AI) │ │ │ │ │
99
+ └─────────────┘ └─────────────┘ └──────┬──────┘
100
+
101
+ ┌─────────────┐ │
102
+ │ nteract │◀────────────┘
103
+ │ Desktop App │ (real-time sync)
104
+ └─────────────┘
105
+ ```
106
+
107
+ - **nteract** (this package): MCP server for AI assistants
108
+ - **runtimed**: Low-level daemon and Python bindings ([docs](https://github.com/nteract/desktop))
109
+ - **nteract desktop**: Native app for humans to collaborate with AI
110
+
111
+ ## Real-time Collaboration
112
+
113
+ The magic of nteract is that AI and humans share the same notebook:
114
+
115
+ 1. AI connects via MCP and runs code
116
+ 2. Human opens the same notebook in nteract desktop
117
+ 3. Changes sync instantly via CRDT
118
+ 4. Both see the same kernel state
119
+
120
+ This enables workflows like:
121
+ - AI does initial analysis, human refines
122
+ - Human writes code, AI debugs errors
123
+ - Multiple AI agents collaborate on complex tasks
124
+
125
+ ## Development
126
+
127
+ ```bash
128
+ # Clone
129
+ git clone https://github.com/nteract/nteract
130
+ cd nteract
131
+
132
+ # Install dependencies
133
+ uv sync
134
+
135
+ # Run tests
136
+ uv run pytest
137
+ ```
138
+
139
+ ## Related Projects
140
+
141
+ - [nteract/desktop](https://github.com/nteract/desktop) - Native desktop app
142
+ - [runtimed on PyPI](https://pypi.org/project/runtimed/) - Low-level Python bindings
143
+
144
+ ## License
145
+
146
+ BSD-3-Clause
@@ -0,0 +1,58 @@
1
+ [project]
2
+ name = "nteract"
3
+ version = "0.0.3"
4
+ description = "Bring AI to Jupyter notebooks. MCP server for Claude, ChatGPT, Gemini, OpenCode and any agent."
5
+ readme = "README.md"
6
+ license = "BSD-3-Clause"
7
+ authors = [
8
+ { name = "Kyle Kelley", email = "rgbkrk@gmail.com" }
9
+ ]
10
+ requires-python = ">=3.10"
11
+ dependencies = [
12
+ "mcp>=1.26.0",
13
+ "httpx>=0.27.0,<1.0",
14
+ "runtimed>=0.1.5a1", # Pin to the prerelease while nteract desktop in preview
15
+ ]
16
+
17
+ [project.scripts]
18
+ nteract = "nteract._mcp_server:main"
19
+
20
+ [build-system]
21
+ requires = ["hatchling"]
22
+ build-backend = "hatchling.build"
23
+
24
+ [tool.hatch.build.targets.wheel]
25
+ packages = ["src/nteract"]
26
+
27
+ [dependency-groups]
28
+ dev = [
29
+ "pytest>=8.0",
30
+ "pytest-asyncio>=0.23",
31
+ "ruff>=0.9",
32
+ "ty>=0.0.1a7",
33
+ ]
34
+
35
+ [tool.pytest.ini_options]
36
+ asyncio_mode = "auto"
37
+ asyncio_default_fixture_loop_scope = "function"
38
+
39
+ [tool.ruff]
40
+ line-length = 100
41
+ target-version = "py310"
42
+
43
+ [tool.ruff.lint]
44
+ select = [
45
+ "E", # pycodestyle errors
46
+ "W", # pycodestyle warnings
47
+ "F", # pyflakes
48
+ "I", # isort
49
+ "UP", # pyupgrade
50
+ "B", # flake8-bugbear
51
+ "SIM", # flake8-simplify
52
+ ]
53
+
54
+ [tool.ruff.format]
55
+ quote-style = "double"
56
+
57
+ [tool.ty.environment]
58
+ python-version = "3.10"
@@ -0,0 +1,5 @@
1
+ """nteract - AI-powered Jupyter notebooks."""
2
+
3
+ from nteract._mcp_server import main
4
+
5
+ __all__ = ["main"]