Token导航 LogoToken导航

MCP Server · AI代理

Jupyter Kernel MCP

一个本地笔记本执行系统,允许AI代理运行Jupyter笔记本单元格,具有持久的内核状态、输出持久性和结构化的JSON控制界面。

stdio官方级别未说明来源级核验工具 9
PythonClaudeAI代理

快速开始

作者 / 组织
KJH-Sun
提供方
KJH-Sun

工具数量

9

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

2

仓库热度

收录来源

1 个

MCP World

选型结论

Jupyter Kernel MCP 属于AI代理类 MCP Server,公开资料标注 9 个工具,通过stdio 本地进程接入,适配 Claude,有可以直接复制的安装命令;接入前要先准备 会话凭据。

分类

AI代理

传输方式

stdio

认证方式

会话凭据

部署方式

公开资料未说明

安装与配置

安装命令

pip install git+https://github.com/KJH-Sun/jupyter-kernel-mcp.git

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 对应的运行时,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 9 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

Notebook Agent — Stateful Notebook Execution System

A local notebook execution system that lets AI agents run Jupyter notebook cells with persistent kernel state, output persistence, and structured JSON control surface.

Quick Start

Install

# GitHub에서 직접 설치
pip install git+https://github.com/KJH-Sun/jupyter-kernel-mcp.git

# 또는 로컬 클론 후 설치
git clone https://github.com/KJH-Sun/jupyter-kernel-mcp.git
cd notebook-agent
pip install -e ".[dev]"

Update

pip install --no-cache-dir --force-reinstall git+https://github.com/KJH-Sun/jupyter-kernel-mcp.git
버전 번호가 동일하면 pip이 캐시를 재사용하므로 --no-cache-dir --force-reinstall 플래그가 필요합니다. 설치 후 Claude Code에서 MCP 서버를 재시작해야 변경사항이 반영됩니다.

Claude Code MCP 서버로 사용

설치 후 프로젝트의 .mcp.json에 추가:

{
  "mcpServers": {
    "notebook-runtime": {
      "command": "notebook-agent-mcp",
      "args": []
    }
  }
}

Claude Code를 (재)시작하면 다음 도구들이 자동으로 사용 가능해집니다:

  • open_notebook — 노트북 열기 + 커널 시작
  • list_cells — 셀 목록 조회
  • run_cell — 단일 셀 실행
  • run_until — 처음부터 N번 셀까지 실행
  • restart_kernel — 커널 재시작
  • list_sessions — 활성 세션 조회
  • get_cell_output — 셀 출력 조회 + 이미지 추출
  • shutdown_idle — 유휴 커널 종료
  • save_notebook — 노트북 저장

Run the FastAPI Server

uvicorn app.main:app --host 127.0.0.1 --port 8000

Use the CLI (no server required)

# Open a notebook (starts kernel)
notebook-agent open --path /path/to/notebook.ipynb

# List cells
notebook-agent list-cells --path /path/to/notebook.ipynb

# Run a single cell (0-based index)
notebook-agent run-cell --path /path/to/notebook.ipynb --cell 0

# Run all cells up to index 5 with fresh kernel
notebook-agent run-until --path /path/to/notebook.ipynb --cell 5 --mode restart_and_run_until

# Restart kernel
notebook-agent restart-kernel --path /path/to/notebook.ipynb

# List active sessions
notebook-agent sessions

# Shutdown idle kernels
notebook-agent shutdown-idle --max-idle 1800

# Read cell outputs and extract images
notebook-agent get-cell-output --path /path/to/notebook.ipynb --cell 3

# Save notebook
notebook-agent save --path /path/to/notebook.ipynb

All CLI commands output structured JSON.

Execution Modes

reuse_existing_session (default)

Reuses the existing kernel session. Variables, imports, and state from prior cell executions are preserved. Fast — only runs the requested cell.

Use when: running cells sequentially in order, or when prior cells have already been executed.

restart_and_run_until

Shuts down the current kernel, starts a fresh one, then runs all code cells from cell 0 through the target cell. Guarantees clean, reproducible state.

Use when:

  • A cell fails with NameError or ImportError (missing prior state)
  • You want to ensure reproducible results
  • The user asks to "run from scratch"

Example Agent Workflow

# 1. Open notebook
notebook-agent open --path analysis.ipynb

# 2. Check cells
notebook-agent list-cells --path analysis.ipynb

# 3. Run cells in order
notebook-agent run-cell --path analysis.ipynb --cell 0
notebook-agent run-cell --path analysis.ipynb --cell 1

# 4. If cell 3 fails with NameError, retry with full state rebuild
notebook-agent run-cell --path analysis.ipynb --cell 3 --mode restart_and_run_until

# 5. Check image outputs from a cell (e.g. matplotlib chart)
notebook-agent get-cell-output --path analysis.ipynb --cell 2
# → image_paths: ["/tmp/notebook-agent/analysis/cell_2_0.png"]

HTTP API

When the FastAPI server is running:

EndpointMethodDescription
/notebooks/openPOSTOpen notebook, start kernel
/notebooks/cells?path=...GETList cells
/notebooks/run-cellPOSTRun a single cell
/notebooks/run-untilPOSTRun cells 0..N
/notebooks/restart-kernelPOSTRestart kernel
/notebooks/savePOSTSave notebook
/sessionsGETList active sessions
/sessions/shutdown-idlePOSTShutdown idle kernels

Architecture

See docs/architecture.md for detailed component design.

Agent Usage Guide

See docs/agent_skill.md for instructions on how an AI agent should use this system.

Tests

pytest

Tests use real Jupyter kernels — requires ipykernel installed.

工具与能力

工具数量

9

资源数量

0

提示词数量

0

能力标签

Jupyter笔记本Python本地部署AI代理笔记本执行持久内核开发工具

支持客户端

Claude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

多步任务编排

把拆解、检索、执行串成一条链,模型按步骤调用工具。

长期上下文

把会话、笔记和知识放到外部存储,换个会话还能接着做。

接自有流程

把内部系统和模型连起来,让助手调用已有的工作流。

选择建议

值得选的地方

  • 只提供 9 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 需要自备会话凭据,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到会话凭据的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Jupyter Kernel MCP

MCP World · 本页

9stdio有1 个2026-05-17
Everything Claude Code

MCP World

0stdio有1 个2026-05-17
Filesystem 560c4363

MCP World

13未说明未标注2 个2026-05-17
Time 7365cb6d

MCP.so

2SSE有2 个2026-05-17
Server Everything (everything)

MCP World

11stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Jupyter Kernel MCP 怎么安装?

公开资料给出的安装命令是 pip install git+https://github.com/KJH-Sun/jupyter-kernel-mcp.git,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Jupyter Kernel MCP 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Jupyter Kernel MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Jupyter Kernel MCP 需要 API Key 吗?

公开资料标注的认证方式是会话凭据,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Jupyter Kernel MCP 支持哪些客户端?

公开资料标注支持 Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP