
usamak98/python-notebook-mcp 是从 https://github.com/usamak98/python-notebook-mcp. 导入的 MCP 服务器候选
概览
usamak98/python-notebook-mcp 是从 https://github.com/usamak98/python-notebook-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
Python 笔记本 MCP MCP服务器使AI助手能够通过模型上下文协议与Jupyter笔记本交互。
该服务器允许兼容的 AI 助手(如 Cursor 或 Claude Desktop)与本地机器上的 Jupyter Notebook 文件(.ipynb)交互。
📋 先修条件
在开始之前,请确保你已安装以下设备:
-
Python: 版本3.10或更高。
-
uv: 来自 Astral 的快速 Python 安装包和虚拟环境管理器。如果你没有,请安装: -
fastmcpCLI(可选,适用于 Claude Desktopfastmcp install): 如果你计划使用fastmcp install方法用于 Claude Desktop,需要fastmcp命令可用。
🔧 布置
-
克隆仓库:
-
选择设置方法:
-
选项A:自动设置(推荐) 从项目的根目录(你刚输入
cd)执行适合你操作系统的脚本。 -
macOS / Linux:
-
Windows (PowerShell):
这些脚本会创建.venv,安装依赖关系,并输出MCP客户端配置所需的精确路径。
- 选项B:手动设置
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
This server allows compatible AI assistants (like Cursor or Claude Desktop) to interact with Jupyter Notebook files (.ipynb) on your local machine.
📋 Prerequisites
Before you begin, ensure you have the following installed:
- Python: Version 3.10 or higher.
uv: The fast Python package installer and virtual environment manager from Astral. If you don’t have it, install it:# On macOS / Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows (PowerShell) powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # IMPORTANT: Add uv to your PATH if prompted by the installer # For macOS/Linux (bash/zsh), add to your ~/.zshrc or ~/.bashrc: # export PATH="$HOME/.local/bin:$PATH" # Then restart your shell or run `source ~/.zshrc` (or equivalent)fastmcpCLI (Optional, for Claude Desktopfastmcp install): If you plan to use thefastmcp installmethod for Claude Desktop, you need thefastmcpcommand available.# Using uv uv pip install fastmcp # Or using pipx (recommended for CLI tools) pipx install fastmcp
🔧 Setup
-
Clone the Repository:
git clone https://github.com/UsamaK98/python-notebook-mcp.git # Or your fork/local path cd python-notebook-mcp -
Choose Setup Method:
- Option A: Automated Setup (Recommended)
Run the appropriate script for your OS from the project’s root directory (where you just
cd-ed into).- macOS / Linux:
# Make script executable (if needed) chmod +x ./install_unix.sh # Run the script bash ./install_unix.sh - Windows (PowerShell):
- macOS / Linux:
- Option A: Automated Setup (Recommended)
Run the appropriate script for your OS from the project’s root directory (where you just
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"jupyter": {
// Use the absolute path to the Python executable inside your .venv
"command": "/full/absolute/path/to/python-notebook-mcp/.venv/bin/python", // macOS/Linux
// "command": "C:\\full\\absolute\\path\\to\\python-notebook-mcp\\.venv\\Scripts\\python.exe", // Windows
"args": [
// Absolute path to the server script
"/full/absolute/path/to/python-notebook-mcp/server.py"
],
"autoApprove": ["initialize_workspace"] // Optional: Auto-approve certain safe tools
}
}
}