@fre4x/jupyter 1.0.45 → 1.0.47
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.
- package/README.md +28 -7
- package/dist/index.js +23356 -3752
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# @fre4x/jupyter
|
|
2
2
|
|
|
3
|
-
Jupyter Notebook MCP server for reading, writing,
|
|
3
|
+
Jupyter Notebook MCP server for reading, writing, executing code in `.ipynb` files, and launching a local Jupyter UI.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Read/Write**: Full support for `.ipynb` (JSON) manipulation.
|
|
8
|
-
- **Execute**: Run code cells in
|
|
9
|
-
- **Control**:
|
|
8
|
+
- **Execute**: Run code cells in a real Jupyter kernel over the Jupyter WebSocket protocol.
|
|
9
|
+
- **Control**: Launch or connect to a local Jupyter server, list kernels, and open notebooks in the browser.
|
|
10
10
|
- **Mock Mode**: Development without a real Jupyter server using `MOCK=true`.
|
|
11
|
+
- **Auto Start**: In non-mock mode the MCP process starts or connects to Jupyter before accepting requests.
|
|
11
12
|
|
|
12
13
|
## Tools
|
|
13
14
|
|
|
@@ -15,8 +16,8 @@ Jupyter Notebook MCP server for reading, writing, and executing code in `.ipynb`
|
|
|
15
16
|
- `jupyter_create_notebook`: Create a new empty Jupyter notebook.
|
|
16
17
|
- `jupyter_add_cell`: Add a new cell (code/markdown) to a notebook.
|
|
17
18
|
- `jupyter_update_cell`: Update the content of an existing cell.
|
|
18
|
-
- `jupyter_execute_code`: Execute code in a Jupyter kernel
|
|
19
|
-
- `jupyter_list_kernels`: List all active Jupyter kernels
|
|
19
|
+
- `jupyter_execute_code`: Execute code in a real Jupyter kernel.
|
|
20
|
+
- `jupyter_list_kernels`: List all active Jupyter kernels.
|
|
20
21
|
- `jupyter_open_notebook`: Open a notebook in the default browser or viewer.
|
|
21
22
|
|
|
22
23
|
## Usage
|
|
@@ -34,7 +35,9 @@ MOCK=true npx @fre4x/jupyter
|
|
|
34
35
|
"command": "npx",
|
|
35
36
|
"args": ["-y", "@fre4x/jupyter"],
|
|
36
37
|
"env": {
|
|
37
|
-
"
|
|
38
|
+
"JUPYTER_ROOT_DIR": "/absolute/path/to/notebooks",
|
|
39
|
+
"JUPYTER_AUTO_OPEN": "true",
|
|
40
|
+
"JUPYTER_START_NOTEBOOK_PATH": "/absolute/path/to/notebooks/demo.ipynb"
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -44,4 +47,22 @@ MOCK=true npx @fre4x/jupyter
|
|
|
44
47
|
## Requirements
|
|
45
48
|
|
|
46
49
|
- Node.js 18+
|
|
47
|
-
-
|
|
50
|
+
- JupyterLab or Jupyter Notebook installed locally for managed startup, or `JUPYTER_SERVER_URL` pointing at an existing server.
|
|
51
|
+
- `xdg-open` / `open` / Windows shell integration for browser launch.
|
|
52
|
+
|
|
53
|
+
## Runtime Behavior
|
|
54
|
+
|
|
55
|
+
- `MOCK=true` keeps the old fixture-only behavior.
|
|
56
|
+
- Without `MOCK=true`, the server first tries `JUPYTER_SERVER_URL` if provided.
|
|
57
|
+
- Otherwise it launches a local Jupyter process (`jupyter lab`, then notebook fallbacks) with `--no-browser`.
|
|
58
|
+
- After the server is ready, it opens the Jupyter UI in your default browser.
|
|
59
|
+
- If `JUPYTER_START_NOTEBOOK_PATH` is set, that notebook is opened directly; otherwise the root Jupyter UI is opened.
|
|
60
|
+
|
|
61
|
+
## Environment Variables
|
|
62
|
+
|
|
63
|
+
- `JUPYTER_SERVER_URL`: Use an already-running Jupyter server instead of launching one.
|
|
64
|
+
- `JUPYTER_TOKEN`: Optional token for an external Jupyter server.
|
|
65
|
+
- `JUPYTER_ROOT_DIR`: Root directory for managed Jupyter startup. Defaults to the current working directory.
|
|
66
|
+
- `JUPYTER_AUTO_OPEN`: Set to `false` to skip browser launch on MCP startup.
|
|
67
|
+
- `JUPYTER_START_NOTEBOOK_PATH`: Notebook to open automatically on startup.
|
|
68
|
+
- `JUPYTER_KERNEL_NAME`: Kernel name used when code execution needs to create a kernel. Defaults to `python3`.
|