
cursor-notebook-mcp
by jbeno·★ 157·综合分 45
一个MCP服务器,使AI代理能够通过单元格操作和元数据编辑与Jupyter笔记本文件交互。
概述
cursor-notebook-mcp是一个基于Python的模型上下文协议(MCP)服务器,旨在帮助AI代理与Jupyter笔记本文件交互。它提供全面的工具用于创建、读取、编辑和导出笔记本文件,解决了Cursor在代理模式下无法直接编辑笔记本的限制。该服务器使用nbformat进行安全操作,使用nbconvert提供导出功能,并采取措施将操作限制在用户定义的目录中。
试试问 AI
装完之后,这里有 6 个你可以让 AI 做的事:
什么时候选它
当您需要通过 MCP 让 AI 代理执行全面的笔记本操作时,请选择这个 MCP 服务器。
什么时候不要选它
如果您需要 Jupyter 生态系统之外的更高级绘图或可视化工具,或者需要比基本单元格操作更集成的 AI/笔记本功能,请避免使用此服务器。
此 server 暴露的工具
从 README 抽取出 12 个工具notebook_createCreates a new, empty notebook file.
notebook_readReads an entire notebook and returns its structure as a dictionary.
notebook_add_cellAdds a new code or markdown cell after a specified index.
notebook_edit_cellReplaces the source content of a specific cell.
notebook_delete_cellDeletes a specific cell.
notebook_exportExports the notebook to another format (e.g., python, html).
notebook_split_cellSplits a cell into two at a specified line number.
notebook_merge_cellsMerges a cell with the cell immediately following it.
notebook_searchSearches cells for a keyword, showing contextual snippets.
notebook_get_outlineProduces an outline showing cell numbers with major headings/functions.
notebook_clear_all_outputsClears outputs and execution counts for all code cells.
notebook_renameRenames/moves a notebook file from one path to another.
可对比工具
安装
安装
从PyPI安装:
pip install cursor-notebook-mcp从源码安装:
git clone https://github.com/jbeno/cursor-notebook-mcp.git
cd cursor-notebook-mcp
python -m venv .venv
source .venv/bin/activate # Windows上使用 `.venv\Scripts\activate`
pip install -e .服务器配置 (Cursor)
创建或更新您的 ~/.cursor/mcp.json:
{
"mcpServers": {
"notebook_mcp": {
"url": "http://127.0.0.1:8080/mcp"
}
}
}然后运行服务器:
cursor-notebook-mcp --transport streamable-http --allow-root /path/to/your/notebooks --host 127.0.0.1 --port 8080FAQ
- 这个服务器支持哪些传输模式?
- 该服务器支持stdio、流式HTTP和SSE传输模式。建议新设置使用流式HTTP。
- 除了Cursor,这个服务器可以与其他AI工具一起使用吗?
- 是的,虽然它是为Cursor设计的,但该服务器可以配置为与VS Code(Insiders)、Claude Code或任何支持MCP的模型/代理一起使用。
- 导出功能需要哪些外部依赖?
- Pandoc用于大多数非HTML导出格式。对于PDF导出,nbconvert还需要LaTeX(推荐XeLaTeX)。
cursor-notebook-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。