跳到正文
cccskills
免费在 GitHub 公开

mcp-jupyter

Reference for MCP Jupyter tools (kernel management, cell execution, Papermill). Use when executing notebooks, managing kernels, or running code interactively via MCP.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md3.6 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

MCP Jupyter Reference

When to Use MCP vs Local Scripts

NeedToolWhy
Batch validation (Python)scripts/notebook_tools/notebook_tools.py validateFaster, no kernel setup
Batch execution (Python)scripts/notebook_tools/notebook_tools.py executePapermill CLI, simpler
Structure analysisscripts/notebook_tools/notebook_helpers.py list --verboseLocal, instant
Find enrichment gapsNotebookHelper.find_cells_needing_enrichment()Python API
Cell-by-cell .NET executionMCP execute_on_kernelOnly option (Papermill blocked)
Interactive debuggingMCP manage_kernel + execute_on_kernelLive kernel state
Notebook read/write via APIMCP read_cells, add_cellRemote/programmatic

Rule: Prefer local scripts for Python notebooks. Use MCP for .NET kernels and interactive sessions. See notebook-helpers skill for full script reference.

Available MCP Tools

ToolDescription
list_kernels()List available kernel specs
manage_kernel(action, kernel_name/id)start/stop/restart/interrupt kernel
execute_on_kernel(kernel_id, mode, ...)Execute code, cell, or full notebook
execute_notebook(input_path, ...)Papermill execution (sync/async)
read_notebook(path)Read notebook content
read_cells(path, mode)Read cells (list/summary)
get_notebook_info(path)Notebook metadata
manage_async_job(action, job_id)Manage async Papermill jobs

Supported Kernels

KernelNameNotes
Python 3python3Via ipykernel in conda mcp-jupyter-py310
.NET C#.net-csharpVia dotnet-interactive
.NET F#.net-fsharpVia dotnet-interactive
Lean 4lean4Via WSL wrapper

Execution Patterns

Python notebooks - Papermill (preferred for batch)

execute_notebook(
    input_path="MyIA.AI.Notebooks/path/notebook.ipynb",
    output_path="MyIA.AI.Notebooks/path/notebook.ipynb",  # Same file = overwrite with outputs
    mode="sync"
)

Python notebooks - Cell-by-cell (for control)

manage_kernel(action="start", kernel_name="python3")
# Execute cells
execute_on_kernel(kernel_id="...", mode="notebook_cell", path="notebook.ipynb", cell_index=0)
# ...
manage_kernel(action="stop", kernel_id="...")

.NET notebooks - Cell-by-cell ONLY

IMPORTANT: Papermill does NOT work with .NET notebooks. Always use cell-by-cell.

manage_kernel(action="start", kernel_name=".net-csharp")

# CRITICAL: Set working directory first
execute_on_kernel(
    kernel_id="...", mode="code",
    code='System.IO.Directory.SetCurrentDirectory(@"d:\\dev\\CoursIA\\MyIA.AI.Notebooks\\Sudoku");'
)

# Execute cells sequentially
for idx in range(cell_count):
    execute_on_kernel(kernel_id="...", mode="notebook_cell", path="notebook.ipynb", cell_index=idx)

manage_kernel(action="stop", kernel_id="...")

Known Issues

ProblemWorkaround
Papermill + #!importUse cell-by-cell execution
Papermill + .NET kernelsKernel hangs at startup; use cell-by-cell
.NET cold start timeoutNormal (30-60s); retry once
Async progress values incorrectKnown bug; ignore progress numbers
Kernel unresponsive after failed PapermillStop and restart kernel
Relative paths failSet working directory explicitly
Widgets/interactive elementsUse BATCH_MODE=true parameter

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Cycle 30 min du secrétaire vérificateur myia-po-2028:CoursIA-3. Atteste en tiers, du plus ancien au plus récent, les PRs ouvertes sans dossier valide (chaque READY, une fois lu et approuvé par ai-01, est mergé sans attendre son cycle), et fait circuler l'information sur workspace-CoursIA-3.

中文简介正在准备中。当前显示原文说明。

jsboige/CoursIA162026年10月22日 更新

Analyze a Slidev deck qualitatively — organ reports (structure, composition) + vision AI on rendered PNGs. Arguments: <deck_id> [--slides 1,5,10]

中文简介正在准备中。当前显示原文说明。

jsboige/CoursIA162026年10月22日 更新

Build or improve Jupyter notebooks iteratively with quality scoring. Arguments: <new|improve|fix> <path> [--topic] [--domain] [--level] [--quality] [--max-iter]

中文简介正在准备中。当前显示原文说明。

jsboige/CoursIA162026年10月22日 更新

Detect cell-ordering / enchainement problems in Jupyter notebooks (canonical-order slippage, misplaced or forgotten cells). Arguments: [target] [--severity HIGH|MED|LOW] [--json]

中文简介正在准备中。当前显示原文说明。

jsboige/CoursIA162026年10月22日 更新

Clean up and reorganize markdown in enriched Jupyter notebooks. Arguments: [target] [--dry-run] [--aggressive] [--hierarchy-only]

中文简介正在准备中。当前显示原文说明。

jsboige/CoursIA162026年10月22日 更新

Cycle de coordination ai-01 (coordinateur UNIQUEMENT — jamais sur un worker). Lit memoire + dashboards + inbox + GitHub, merge les PRs pretes, tranche les design-gates, dispatche des grains par lane, reporte. Arguments: [--dispatch] [--focus <topic>]

中文简介正在准备中。当前显示原文说明。

jsboige/CoursIA162026年10月22日 更新

查看 jsboige 的全部技能

报告此技能的问题