
Jupyter Mcp Server
io.github.ChengJiale150Published by GitHub account ChengJiale150v1.1.0Updated Oct 24, 2026
A powerful MCP server for AI-driven Jupyter Notebook management and execution
Overview
A local MCP server that lets an AI assistant connect to, edit and run Jupyter Notebooks and kernels, returning text, image and table outputs.
- What you can do
- Connect, list and restart Jupyter Notebooks, and read their source content without outputs. List, read, insert, overwrite and delete individual cells. Execute cells and return their outputs, including images and tables. Append and run a new code cell at the end of a notebook, or run temporary code that is not saved. Adjust execution based on cell output across several notebooks at once.
- When to use it
- Useful when you want an assistant to work inside Jupyter Lab on exploratory data analysis, visualization or machine learning tasks, especially across more than one notebook and with multimodal results. Less useful if you only need to read or edit notebook files as plain text.
- Requirements
- Runs locally over stdio as the PyPI package better-jupyter-mcp-server, launched for example with uvx. Needs Python 3.12+ and uv. A running Jupyter Server is required, plus its URL and authentication token, which the README says must be supplied in the assistant's prompt or rules. Jupyter dependencies such as jupyter-collaboration and datalayer_pycrdt must be installed. An optional ALLOW_IMG setting controls image output.
Installation
In SourceWeft
- Open Jupyter Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
🪐 Jupyter MCP Server
[Jupyter MCP Server]专门为AI连接与管理Jupyter Notebook而开发的MCP服务
由 ChengJiale150 开发
[Python] [License] [Version] [mcp-registry]
English | 中文
📖 目录
🎯 项目简介
Jupyter MCP Server 是一个基于 Model Context Protocol (MCP) 的服务,为目前最先进的的AI IDE(如 Cursor) 与CLI工具(如Gemini CLI)提供连接与管理Jupyter Notebook的能力。使得AI能够操作Notebook,进行数据分析、可视化、机器学习等任务。
🤔 为什么需要Jupyter MCP Server
Jupyter Notebook 是数据科学家最常用的工具之一,它提供了一个交互式的环境,使其可以方便地进行数据分析、可视化、机器学习等探索性任务。然而,由于Notebook自身的格式限制,使得其难以像纯文本文件(如Markdown、Python文件)一样被AI直接理解。
现有的提供操作Notebook的工具或MCP服务,要么仅能阅读与编辑Notebook,要么仅能操纵单个Notebook,难以满足同时操纵多个Notebook的复杂需求。此外,大多数工具也不支持多模态输出,无法充分利用目前最先进的多模态大模型(如Gemini 2.5)的强大图文理解能力。
Jupyter MCP Server 就是为了解决这个问题而开发的。它通过MCP协议,向AI提供了管理Jupyter Kernel与Notebook的工具,使其能够操纵多个Notebook进行交互式的任务执行,并输出多模态结果,助力数据科学家提高分析效率。
✨ 关键亮点
- 🔌 MCP兼容: 能够在任何支持MCP协议的IDE或CLI工具中使用
- 📚 多Notebook管理: 支持同时管理多个Notebook
- 🔁 交互式执行: 能够根据Cell的输出自动调整执行策略
- 📊 多模态输出: 支持输出多模态结果,如文本、图片、表格等
🔧 工具一览
Notebook管理模块
Cell基本功能模块
Cell高级集成功能模块
工具的具体内容详见工具文档
🛠️ 快速上手
环境准备
安装Jupyter MCP Server
源代码
- 克隆项目并安装依赖
- (可选)配置config.toml
进入src/config.toml文件,根据需要配置参数(如是否允许返回图片数据)
- 启动Jupyter MCP Server
如果成功启动,会输出类似如下信息代表启动成功:
- 配置标准JSON格式
具体客户端集成详见集成文档
使用Jupyter MCP Server
本地手动启动Jupyter Server
在正式使用前,需要连接Jupyter Server,这里介绍如何在本地手动启动Jupyter Server:
- 打开终端并激活环境:
打开计算机终端命令行,并激活环境
对于使用conda(Anaconda)的用户,可以使用以下命令激活环境:
这里为了方便起见,这里可以直接使用base环境(conda activate base)
然后切换到你当前的项目目录,方便后续的文件操作
- 安装必要依赖:
- 启动Jupyter Server:
使用下述命令启动Jupyter Server
成功启动后会弹出浏览器窗口,你可以在此查看根路径是否为工程目录
- 获取认证Token:
使用下述命令获取认证Token
运行后会输出类似如下信息:
其中YOUR_TOKEN为认证Token
- 添加提示词与规则
在正式使用前,你必须添加如下提示词于规则文件中以提供Jupyter MCP Server的必要连接信息:
此外,推荐在提示词中添加关键Notebook路径信息,方便AI快速定位目标Notebook提高connect_notebook工具的执行效率,可以在Jupyter Lab网页中右键点击目标Notebook文件,选择Copy Path获取相对路径
在提供上述内容后,你就可以开始使用Jupyter MCP Server了!
使用LLM托管Jupyter Server
- 安装必要依赖:
- 提供提示词与规则文档:
✅ 最佳实践
- 使用支持多模态输入的大模型(如Gemini 2.5 Pro)进行交互,以充分利用最先进的多模态理解能力
- 使用支持MCP协议返回图像数据并支持解析的客户端(如Cursor、Gemini CLI等),部分客户端可能不支持该功能
- 将复杂任务(如数据科学建模)拆分为多个子任务(如数据清洗、特征工程、模型训练、模型评估等),并逐步执行
- 给出结构清晰的提示词与规则,这里可以参考提示词与规则文档
- 在提示词中融入专家经验与智慧(如数据清洗、特征工程的技巧),这是AI最缺乏的,也是最需要补充的
- 尽可能提供丰富的上下文信息(如现有数据集的字段解释,文件路径,详细的任务要求等)
- 提供Few Shot案例,提供Baseline或已有Workflow作为参考
示例
🤝 贡献指南
我们欢迎社区贡献!如果您想为Jupyter MCP Server项目做出贡献,请:
- Fork 本仓库
- 创建您的特性分支 (
git checkout -b feature/AmazingFeature) - 提交您的更改 (
git commit -m 'Add some AmazingFeature') - 推送到分支 (
git push origin feature/AmazingFeature) - 开启一个 Pull Request
贡献类型
- 🐛 Bug修复
- 📝 旧功能完善
- ✨ 新功能开发
- 📚 文档改进
- 🌍 国际化支持
开发帮助文档
- 可以详见项目架构文档辅助理解项目架构与关键通信流程
🤗 致谢
本项目受到以下项目的帮助,在此表示感谢:
- DataLayer: 感谢DataLayer开源的jupyter_nbmodel_client与jupyter_kernel_client库,为Jupyter MCP的快速开发提供了极大的帮助
- FastMCP: 感谢FastMCP的开发者们,没有FastMCP就没有Jupyter MCP的快速集成
此外,本项目还参考了以下已有Jupyter MCP服务的实现,在此也一并表示感谢:
- datalayer/jupyter-mcp-server
- jjsantos01/jupyter-notebook-mcp
- ihrpr/mcp-server-jupyter
- itisaevalex/jupyter-mcp-extended
如果这个项目对您有帮助,请给我们一个 ⭐️
Made with ❤️ by ChengJiale150
Source: README.md at commit 13021af
Tools
0Version history
1- v1.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts