================== /// MCP /// /// JUP /// ================== [server:online] [protocol:ready]
jupyter-mcp-server
by datalayer
🪐 ✨ Model Context Protocol (MCP) Server for real-time interaction with Jupyter notebooks (edit, execute, document) over the MCP standard.
544
93
Open Source01
insert_execute_code_cell
Insert a new code cell into the notebook, execute it immediately, and return the results
02
append_markdown_cell
Append a new markdown cell with supplied content to the end of the notebook
03
get_notebook_info
Retrieve information and metadata about the currently-connected notebook
04
read_cell
Read and return the contents of a specified notebook cell
Installation
1. Ensure Python ≥3.9 is available in your PATH.
2. (Recommended) Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
3. Install the server package from PyPI (package name inferred from repo name):
pip install jupyter-mcp-server
If you are working directly with the source code, clone the repo and run:
git clone https://github.com/datalayer/jupyter-mcp-server.git
cd jupyter-mcp-server
pip install -e .[dev]
4. Start the MCP server:
jupyter-mcp-server start # or: python -m mcp_server
By default the service binds to http://127.0.0.1:8000. Use `--port` or environment variable `MCP_PORT` to change it.
5. (Optional) Expose the server to JupyterLab by enabling the server-extension:
jupyter server extension enable mcp_server
Then refresh JupyterLab – the extension should automatically discover the running MCP endpoint.
6. Configuration (env vars or `~/.mcp/config.toml`):
- `MCP_MODELS_PATH`: Directory containing your model definitions
- `MCP_ALLOWED_ORIGINS`: Comma-separated CORS origins
- `OPENAI_API_KEY`: If you proxy OpenAI calls
- `HF_TOKEN`: If you use HuggingFace hosted models
Documentation
License: BSD 3-Clause "New" or "Revised" License
Updated 7/30/2025