datalayer/jupyter-mcp-server
🪐 🔧 Model Context Protocol (MCP) Server for Jupyter.
cdf49eb7ced8jupyter-mcp-server-mcpb2.2.6 in extensions/mcpb/pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 32 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- 4 source files could be read only in part
- 1 of 30 tools, prompts and resources could not be followed through the code
- 5 tools, prompts and resources registered only in the repository's tests are not counted on this page
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 20 tools, 4 resources, 1 prompt. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
clear_cell_output, delete_cell, edit_cell_source, execute_cell, move_cell, overwrite_cell_source and 1 morecapabilities_resourceNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files7 tools · clear_cell_output, delete_cell, edit_cell_source +4
Not all three are present in the tools the scanner traced.
Tool annotations
19 of 25 tools declare annotations. readOnlyHint 5, destructiveHint 13, idempotentHint 11, openWorldHint 3.
Each declaration matches what the traced code does.
Tools, prompts and resources (25: 20 tools, 4 resources, 1 prompt)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
jupyter_citeprompt Like @ or # in Coding IDE or CLI, cite specific cells from specified notebook and insert them into the prompt.
Like @ or # in Coding IDE or CLI, cite specific cells from specified notebook and insert them into the prompt.
capabilities_resourceresource What this server can do, and where each answer came from.Env vars
What this server can do, and where each answer came from.
A server does things a client cannot see and did not ask for — replacing
a dead kernel with an empty one is the clearest case. Reading this is how
a client finds out which of those are on, and an operator finds out *why*
a capability is on, which is the first question asked when one surprises
somebody.
A resource as well as a `server/discover` field, because a client may
want to re-read it without re-discovering the server, and because a
person can open a resource and look.notebookresource A notebook in use, as nbformat JSON. Cells and outputs are resources of their own.
A notebook in use, as nbformat JSON. Cells and outputs are resources of their own.
notebook-cellresource One cell by its nbformat id, with its outputs listed rather than inlined.
One cell by its nbformat id, with its outputs listed rather than inlined.
notebook-cell-outputresource One output of one cell, with its own MIME type. Read it only if you need the bytes.
One output of one cell, with its own MIME type. Read it only if you need the bytes.
clear_cell_outputtool Clear the outputs and execution count of a single code cell in the currentlyFilesoutside textdestructive (declared)
Clear the outputs and execution count of a single code cell in the currently
activated notebook, without deleting the cell itself.connect_to_jupytertool Connect to a Jupyter server dynamically with URL and token.destructive (declared)
Connect to a Jupyter server dynamically with URL and token.
This tool allows you to connect to different Jupyter servers without needing to
restart the MCP server or modify configuration files. Particularly useful when:
- Working with multiple Jupyter servers with different ports/tokens
- Jupyter server token changes dynamically
- Need to switch between different Jupyter instances
The server is checked first: the tool asks it for `/api/status` with the
given token, and if it can't be reached, rejects the token or doesn't
answer with a 200, the call fails and the previous connection stays in
place. The `local` URL and non-Jupyter document providers are not checked.
Example usage:
- "Connect to http://localhost:8888 with token abc123"
- "Connect to http://localhost:8889 without authentication"delete_celltool Delete specific cells from the currently activated notebook and return the cell source of deleted cells (if include_source=True).Filesoutside textdestructive (declared)
Delete specific cells from the currently activated notebook and return the cell source of deleted cells (if include_source=True).
edit_cell_sourcetool Perform a surgical find-and-replace within a cell's source (like an editor's Edit tool).Filesoutside textdestructive (declared)
Perform a surgical find-and-replace within a cell's source (like an editor's Edit tool).
Finds `old_string` in the cell and replaces it with `new_string`. Matching is literal
(not regex) and may span multiple lines. By default, `old_string` must appear exactly once;
set `replace_all=True` for multiple occurrences. Returns a diff of the changes made.
Prefer this over overwrite_cell_source for small, targeted edits — it is safer because
unchanged parts of the cell are left untouched. Use read_cell first to see the current
source and construct an accurate old_string.execute_celltool Execute a cell from the currently activated notebook with timeout and return it's outputsFilesoutside textdestructive (declared)
Execute a cell from the currently activated notebook with timeout and return it's outputs
execute_codetool Execute code directly in a kernel (not saved to notebook).destructive (declared)
Execute code directly in a kernel (not saved to notebook).
If `use_sandbox` selected an active sandbox, this tool executes on that
sandbox instead of a Jupyter kernel. This allows agents to switch between
kernel-backed and sandbox-backed execution using the same execute_code API.
Targets the current activated notebook's kernel by default. Pass kernel_id
to execute in a specific kernel directly — including raw kernels with no
notebook attached.
Recommended to use in following cases:
1. Execute Jupyter magic commands(e.g., `%timeit`, `%pip install xxx`)
2. Performance profiling and debugging.
3. View intermediate variable values(e.g., `print(xxx)`, `df.head()`)
4. Temporary calculations and quick tests(e.g., `np.mean(df['xxx'])`)
5. Execute Shell commands in Jupyter server(e.g., `!git xxx`)
Under no circumstances should you use this tool to:
1. Import new modules or perform variable assignments that affect subsequent Notebook execution
2. Execute dangerous code that may harm the Jupyter server or the user's data without permissioninsert_celltool Insert a cell to specified position from the currently activated notebook.destructive (declared)
Insert a cell to specified position from the currently activated notebook.
insert_execute_code_celltool Insert a cell at specified index from the currently activated notebook and then execute it with timeout and return it's outputsdestructive (declared)
Insert a cell at specified index from the currently activated notebook and then execute it with timeout and return it's outputs
It is a shortcut tool for insert_cell and execute_cell tools, recommended to use if you want to insert a cell and execute it at the same timelist_filestool List all files and directories recursively in the Jupyter server's file system.read-only (declared)
List all files and directories recursively in the Jupyter server's file system.
Used to explore the file system structure of the Jupyter server or to find specific files or directories.list_kernelstool List all available kernels in the Jupyter server.read-only (declared)
List all available kernels in the Jupyter server.
This tool shows all running and available kernel sessions on the Jupyter server,
including their IDs, names, states, connection information, and kernel specifications.
Useful for monitoring kernel resources and identifying specific kernels for connection.list_notebookstool List all notebooks that have been used via use_notebook toolread-only (declared)
List all notebooks that have been used via use_notebook tool
move_celltool Move a cell from source_index to target_index within the currently activated notebook.Filesoutside textdestructive (declared)
Move a cell from source_index to target_index within the currently activated notebook.
The cell is removed from source_index and placed at target_index. Cells in between shift
to fill the gap. The cell's type, source, and outputs are preserved.
Example: in a notebook [A, B, C, D], move_cell(1, 3) produces [A, C, D, B].
Use this tool instead of manually deleting and re-inserting a cell — it is atomic and
preserves cell metadata. Use read_notebook first to see cell indices if needed.overwrite_cell_sourcetool Replace the entire source of a cell in the currently activated notebook.Filesoutside textdestructive (declared)
Replace the entire source of a cell in the currently activated notebook.
Returns a diff showing the changes made.
Use this when rewriting a cell completely. For small, targeted changes,
prefer edit_cell_source instead — it is safer for partial edits.read_celltool Read a cell as readable text entries.Filesoutside textread-only (declared)
Read a cell as readable text entries.
Includes metadata and source, plus optional formatted output text rather
than raw nbformat objects.read_notebooktool Read a notebook and return index, source content, type, execution count of each cell.read-only (declared)
Read a notebook and return index, source content, type, execution count of each cell.
Using brief format to get a quick overview of the notebook structure and it's useful for locating specific cells for operations like delete or insert.
Using detailed format to get detailed information of the notebook and it's useful for debugging and analysis.
It is recommended to use brief format with larger limit to get a overview of the notebook structure,
then use detailed format with exact index and limit to get the detailed information of some specific cells.restart_notebooktool Restart the kernel for a specific notebook.destructive (declared)
Restart the kernel for a specific notebook.
spec.handlertool
No description.
unuse_notebooktool Unuse from a specific notebook and release its resources.destructive (declared)
Unuse from a specific notebook and release its resources.
use_notebooktool Connect to or create a notebook by path and activate it for following cell operations.destructive (declared)
Connect to or create a notebook by path and activate it for following cell operations.
Pass an optional notebook_name to register an alias you can later activate via
use_notebook_by_name or pass explicitly to cell tools; when omitted, notebook_name
defaults to notebook_path.
Kernel selection follows the notebook's existing context. Pass kernel_id to
use a kernel that is already running (or to switch an already-connected
notebook to a different kernel); use_notebook verifies it is alive and
creates a Jupyter session for the notebook when no session exists. Without
kernel_id, a sandbox already selected with use_sandbox is reused. If none is
selected but the notebook already has a live Jupyter session, use_notebook
triggers use_sandbox for that session's kernel and reports that in the
reply. With neither, no kernel is created. Pass kernel_id=NEW to start an
isolated kernel.use_notebook_by_nametool Switch the active notebook to an already-connected notebook by its registered name.
Switch the active notebook to an already-connected notebook by its registered name.
Use use_notebook first to connect a notebook by notebook_path (optionally giving it a
notebook_name), then call use_notebook_by_name to switch back to it without repeating
the path.Text the model reads (26)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
spec.handler tool
list_files tool
List all files and directories recursively in the Jupyter server's file system.
Used to explore the file system structure of the Jupyter server or to find specific files or directories.list_kernels tool
List all available kernels in the Jupyter server.
This tool shows all running and available kernel sessions on the Jupyter server,
including their IDs, names, states, connection information, and kernel specifications.
Useful for monitoring kernel resources and identifying specific kernels for connection.use_notebook tool
Connect to or create a notebook by path and activate it for following cell operations.
Pass an optional notebook_name to register an alias you can later activate via
use_notebook_by_name or pass explicitly to cell tools; when omitted, notebook_name
defaults to notebook_path.
Kernel selection follows the notebook's existing context. Pass kernel_id to
use a kernel that is already running (or to switch an already-connected
notebook to a different kernel); use_notebook verifies it is alive and
creates a Jupyter session for the notebook when no session exists. Without
kernel_id, a sandbox already selected with use_sandbox is reused. If none is
selected but the notebook already has a live Jupyter session, use_notebook
triggers use_sandbox for that session's kernel and reports that in the
reply. With neither, no kernel is created. Pass kernel_id=NEW to start an
isolated kernel.use_notebook_by_name tool
Switch the active notebook to an already-connected notebook by its registered name.
Use use_notebook first to connect a notebook by notebook_path (optionally giving it a
notebook_name), then call use_notebook_by_name to switch back to it without repeating
the path.list_notebooks tool
List all notebooks that have been used via use_notebook tool
restart_notebook tool
Restart the kernel for a specific notebook.
unuse_notebook tool
Unuse from a specific notebook and release its resources.
read_notebook tool
Read a notebook and return index, source content, type, execution count of each cell.
Using brief format to get a quick overview of the notebook structure and it's useful for locating specific cells for operations like delete or insert.
Using detailed format to get detailed information of the notebook and it's useful for debugging and analysis.
It is recommended to use brief format with larger limit to get a overview of the notebook structure,
then use detailed format with exact index and limit to get the detailed information of some specific cells.insert_cell tool
Insert a cell to specified position from the currently activated notebook.
overwrite_cell_source tool
Replace the entire source of a cell in the currently activated notebook.
Returns a diff showing the changes made.
Use this when rewriting a cell completely. For small, targeted changes,
prefer edit_cell_source instead — it is safer for partial edits.edit_cell_source tool
Perform a surgical find-and-replace within a cell's source (like an editor's Edit tool).
Finds `old_string` in the cell and replaces it with `new_string`. Matching is literal
(not regex) and may span multiple lines. By default, `old_string` must appear exactly once;
set `replace_all=True` for multiple occurrences. Returns a diff of the changes made.
Prefer this over overwrite_cell_source for small, targeted edits — it is safer because
unchanged parts of the cell are left untouched. Use read_cell first to see the current
source and construct an accurate old_string.execute_cell tool
Execute a cell from the currently activated notebook with timeout and return it's outputs
insert_execute_code_cell tool
Insert a cell at specified index from the currently activated notebook and then execute it with timeout and return it's outputs
It is a shortcut tool for insert_cell and execute_cell tools, recommended to use if you want to insert a cell and execute it at the same timeread_cell tool
Read a cell as readable text entries.
Includes metadata and source, plus optional formatted output text rather
than raw nbformat objects.delete_cell tool
Delete specific cells from the currently activated notebook and return the cell source of deleted cells (if include_source=True).
clear_cell_output tool
Clear the outputs and execution count of a single code cell in the currently
activated notebook, without deleting the cell itself.move_cell tool
Move a cell from source_index to target_index within the currently activated notebook.
The cell is removed from source_index and placed at target_index. Cells in between shift
to fill the gap. The cell's type, source, and outputs are preserved.
Example: in a notebook [A, B, C, D], move_cell(1, 3) produces [A, C, D, B].
Use this tool instead of manually deleting and re-inserting a cell — it is atomic and
preserves cell metadata. Use read_notebook first to see cell indices if needed.execute_code tool
Execute code directly in a kernel (not saved to notebook).
If `use_sandbox` selected an active sandbox, this tool executes on that
sandbox instead of a Jupyter kernel. This allows agents to switch between
kernel-backed and sandbox-backed execution using the same execute_code API.
Targets the current activated notebook's kernel by default. Pass kernel_id
to execute in a specific kernel directly — including raw kernels with no
notebook attached.
Recommended to use in following cases:
1. Execute Jupyter magic commands(e.g., `%timeit`, `%pip install xxx`)
2. Performance profiling and debugging.
3. View intermediate variable values(e.g., `print(xxx)`, `df.head()`)
4. Temporary calculations and quick tests(e.g., `np.mean(df['xxx'])`)
5. Execute Shell commands in Jupyter server(e.g., `!git xxx`)
Under no circumstances should you use this tool to:
1. Import new modules or perform variable assignments that affect subsequent Notebook execution
2. Execute dangerous code that may harm the Jupyter server or the user's data without permissionconnect_to_jupyter tool
Connect to a Jupyter server dynamically with URL and token.
This tool allows you to connect to different Jupyter servers without needing to
restart the MCP server or modify configuration files. Particularly useful when:
- Working with multiple Jupyter servers with different ports/tokens
- Jupyter server token changes dynamically
- Need to switch between different Jupyter instances
The server is checked first: the tool asks it for `/api/status` with the
given token, and if it can't be reached, rejects the token or doesn't
answer with a 200, the call fails and the previous connection stays in
place. The `local` URL and non-Jupyter document providers are not checked.
Example usage:
- "Connect to http://localhost:8888 with token abc123"
- "Connect to http://localhost:8889 without authentication"read_notebook tool
A read that stamps a version, as the real one does.
jupyter_cite prompt
Like @ or # in Coding IDE or CLI, cite specific cells from specified notebook and insert them into the prompt.
notebook resource
A notebook in use, as nbformat JSON. Cells and outputs are resources of their own.
notebook-cell resource
One cell by its nbformat id, with its outputs listed rather than inlined.
notebook-cell-output resource
One output of one cell, with its own MIME type. Read it only if you need the bytes.
capabilities_resource resource
What this server can do, and where each answer came from.
A server does things a client cannot see and did not ask for — replacing
a dead kernel with an empty one is the clearest case. Reading this is how
a client finds out which of those are on, and an operator finds out *why*
a capability is on, which is the first question asked when one surprises
somebody.
A resource as well as a `server/discover` field, because a client may
want to re-read it without re-discovering the server, and because a
person can open a resource and look.What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 25 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 25 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 25 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 25 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 25 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 25 capabilities; 24 more call code the scanner could not follow, where it may happen
- Tools that touch files7 of 25 capabilities touch files; 17 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 25 capabilities; 24 more call code the scanner could not follow, where it may happen
Where the code is: 25 handlers in 2 files at commit cdf49eb7ced8
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests5 manifests: docs/package.json, examples/cli/requirements.txt, extensions/mcpb/pyproject.toml, extensions/sandboxes/pyproject.toml, pyproject.toml
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 5 not resolved: docs/package.json: dependency ranges declared here were not resolved against a lockfile and were not checked; examples/cli/requirements.txt: 6 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionNo MCP SDK declared in a manifest
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 25 capabilities; 24 more call code the scanner could not follow, where it may happen
- Environment variables1 capability reads environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | Streamable HTTP |
| Sign-in | not checked needs the live server |
| Servers in the code | 7 (subscriber-test, revalidation-round-trip, bare, target, somewhere else, somewhere else again) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-14 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 6 catalogs (awesome_habitoai, awesome_tensorblock, github_search, glama, mcp_toplist, mcpservers_org) |
|---|---|
| License | BSD-3-Clause |
| Created | 2025-02-12 |
| Topics | ai jupyter mcp mcp-server tools |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.