Skip to content

Commit 2221703

Browse files
fix docs (#152)
1 parent 161e804 commit 2221703

File tree

3 files changed

+57
-24
lines changed

3 files changed

+57
-24
lines changed

Makefile

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,9 @@ build-docker: ## build the docker image
5959

6060
start-docker: ## start the jupyter mcp server in docker
6161
docker run -i --rm \
62-
-e DOCUMENT_URL=http://localhost:8888 \
63-
-e DOCUMENT_ID=notebook.ipynb \
64-
-e DOCUMENT_TOKEN=MY_TOKEN \
65-
-e RUNTIME_URL=http://localhost:8888 \
62+
-e JUPYTER_URL=http://localhost:8888 \
63+
-e JUPYTER_TOKEN=MY_TOKEN \
6664
-e START_NEW_RUNTIME=true \
67-
-e RUNTIME_TOKEN=MY_TOKEN \
6865
--network=host \
6966
datalayer/jupyter-mcp-server:latest
7067

@@ -90,12 +87,9 @@ start: ## start the jupyter mcp server with streamable-http transport
9087
@exec echo
9188
jupyter-mcp-server start \
9289
--transport streamable-http \
93-
--document-url http://localhost:8888 \
94-
--document-id notebook.ipynb \
95-
--document-token MY_TOKEN \
96-
--runtime-url http://localhost:8888 \
90+
--jupyter-url http://localhost:8888 \
91+
--jupyter-token MY_TOKEN \
9792
--start-new-runtime true \
98-
--runtime-token MY_TOKEN \
9993
--port 4040
10094

10195
start-empty: ## start the jupyter mcp server with streamable-http transport and no document nor runtime
@@ -106,11 +100,9 @@ start-empty: ## start the jupyter mcp server with streamable-http transport and
106100
@exec echo
107101
jupyter-mcp-server start \
108102
--transport streamable-http \
109-
--document-url http://localhost:8888 \
110-
--document-token MY_TOKEN \
111-
--runtime-url http://localhost:8888 \
103+
--jupyter-url http://localhost:8888 \
104+
--jupyter-token MY_TOKEN \
112105
--start-new-runtime false \
113-
--runtime-token MY_TOKEN \
114106
--port 4040
115107

116108
start-jupyter-server-extension: ## start jupyter server with MCP extension

docs/docs/configure/index.mdx

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,22 +134,63 @@ Options:
134134
--transport [stdio|streamable-http] Transport type (default: stdio)
135135
--provider [jupyter|datalayer] Provider type (default: jupyter)
136136
--jupyterlab BOOLEAN Enable JupyterLab mode (default: true)
137-
--runtime-url TEXT Runtime URL for kernel operations (default: http://localhost:8888)
137+
--runtime-url TEXT Runtime URL for kernel operations (default: None)
138138
--runtime-token TEXT Runtime authentication token (default: None)
139139
--runtime-id TEXT Specific kernel ID to use (default: None)
140-
--start-new-runtime BOOLEAN Create new runtime vs use existing (default: false)
141-
--document-url TEXT Document URL for notebook operations (default: http://localhost:8888)
140+
--start-new-runtime BOOLEAN Create new runtime vs use existing (default: true)
141+
--document-url TEXT Document URL for notebook operations (default: None)
142142
--document-id TEXT Notebook path/ID (default: None)
143143
--document-token TEXT Document authentication token (default: None)
144+
--jupyter-url TEXT Jupyter URL as default for both document and runtime URLs (default: None)
145+
--jupyter-token TEXT Jupyter token as default for both document and runtime tokens (default: None)
144146
--port INTEGER Port for streamable-http transport (default: 4040)
145147
```
146148

147-
**Example:**
149+
### Additional Commands
150+
151+
The server also supports additional commands for advanced workflows:
152+
153+
#### Connect Command
154+
```bash
155+
jupyter-mcp-server connect --help
156+
157+
Usage: jupyter-mcp-server connect [OPTIONS]
158+
159+
Connect a Jupyter MCP Server to a document and a runtime.
160+
161+
Options:
162+
--provider [jupyter|datalayer] Provider type (default: jupyter)
163+
--jupyterlab BOOLEAN Enable JupyterLab mode (default: true)
164+
--runtime-url TEXT Runtime URL for kernel operations (default: None)
165+
--runtime-token TEXT Runtime authentication token (default: None)
166+
--runtime-id TEXT Specific kernel ID to use (default: None)
167+
--document-url TEXT Document URL for notebook operations (default: None)
168+
--document-id TEXT Notebook path/ID (default: None)
169+
--document-token TEXT Document authentication token (default: None)
170+
--jupyter-url TEXT Jupyter URL as default for both document and runtime URLs (default: None)
171+
--jupyter-token TEXT Jupyter token as default for both document and runtime tokens (default: None)
172+
--jupyter-mcp-server-url TEXT URL of the Jupyter MCP Server to connect to (default: http://localhost:4040)
173+
```
174+
175+
#### Stop Command
176+
```bash
177+
jupyter-mcp-server stop --help
178+
179+
Usage: jupyter-mcp-server stop [OPTIONS]
180+
181+
Stop a running Jupyter MCP Server.
182+
183+
Options:
184+
--jupyter-mcp-server-url TEXT URL of the Jupyter MCP Server to stop (default: http://localhost:4040)
185+
```
186+
187+
### Usage Examples
188+
148189
```bash
149190
jupyter-mcp-server start \
150191
--transport streamable-http \
151-
--document-url http://localhost:8888 \
152-
--document-token MY_TOKEN \
192+
--jupyter-url http://localhost:8888 \
193+
--jupyter-token MY_TOKEN \
153194
--port 4040
154195
```
155196

docs/docs/deployment/jupyter/streamable-http/standalone/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ pip install datalayer_pycrdt==0.12.17
1717
Then, start JupyterLab with the following command.
1818

1919
```bash
20-
jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0
20+
jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN
2121
```
2222

2323
You can also run `make jupyterlab` if you cloned the repository.
2424

2525
:::note
2626

27-
The `--ip` is set to `0.0.0.0` to allow the MCP Server running in a Docker container to access your local JupyterLab.
27+
If you wish to start the Jupyter MCP server using docker, add `--ip 0.0.0.0` to the jupyter lab command to allow the MCP Server running in a Docker container to access your local JupyterLab.
2828

2929
:::
3030

@@ -46,8 +46,8 @@ Install and start the server:
4646
pip install jupyter-mcp-server
4747
jupyter-mcp-server start \
4848
--transport streamable-http \
49-
--document-url http://localhost:8888 \
50-
--document-token MY_TOKEN \
49+
--jupyter-url http://localhost:8888 \
50+
--jupyter-token MY_TOKEN \
5151
--port 4040
5252
```
5353

0 commit comments

Comments
 (0)