Jupyter MCP Server is a Model Context Protocol (MCP) implementation that lets you interact with Jupyter notebooks running in any JupyterLab environment, including your local installation. It provides real-time notebook monitoring, intelligent cell execution handling, and compatibility with various MCP clients like Claude Desktop, Cursor, and Windsurf.
Install the Jupyter MCP Server package using pip:
pip install jupyter-mcp-server
For the latest development version, you can install directly from GitHub:
pip install git+https://github.com/datalayer/jupyter-mcp-server.git
Start the Jupyter MCP Server with the following command:
jupyter-mcp-server
By default, the server runs on port 8000. You can specify a different port using the --port
option:
jupyter-mcp-server --port 8080
The server can be configured with several options:
jupyter-mcp-server --help
Common configuration options:
--port PORT
: Specify the server port (default: 8000)--host HOST
: Specify the server host (default: localhost)--jupyter-server-url URL
: URL of the Jupyter server to connect toTo connect to a specific JupyterLab instance, use the --jupyter-server-url
option:
jupyter-mcp-server --jupyter-server-url http://localhost:8888
Make sure your JupyterLab instance is running and accessible at the specified URL.
http://localhost:8000
)The server provides real-time visibility into notebook changes as they happen.
The server intelligently handles cell execution, including:
The MCP server supports various tool commands:
If you're having trouble connecting to your JupyterLab instance:
If authentication is required for your JupyterLab instance:
jupyter-mcp-server --jupyter-server-url http://localhost:8888 --jupyter-token YOUR_TOKEN
Replace YOUR_TOKEN
with your actual Jupyter server token.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.