Jupyter内核MCP服务

通过MCP为AI助手提供持久化的Jupyter内核服务,支持计算、数据分析与绘图,并在后续请求之间保留变量、数据和函数。

  • by 0x0L
  • Python
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 0x0L/ipykernel-mcp

使用说明

jupyter-kernel-mcp

Give your AI agent a persistent Jupyter kernel for calculations, data analysis, and plots. Variables, data, and functions stay available across follow-up requests.

Use an MCP-compatible client and a Jupyter installation with your chosen kernel.

See also example conversations and development setup.

Quick setup with uvx

Add this to your client's mcp.json, replacing the paths with absolute paths on your machine:

{
  "mcpServers": {
    "jupyter-python": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/0x0L/jupyter-kernel-mcp",
        "jupyter-kernel-mcp",
        "--jupyter", "/path/to/project/.venv/bin/jupyter",
        "--kernel", "python3",
        "--cwd", "/path/to/project"
      ]
    }
  }
}

--jupyter and --kernel are required. Choose a kernel listed by your Jupyter executable's kernelspec list command. --cwd is optional and defaults to the server's working directory. Install analysis libraries in the kernel's environment.