You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add native Jupyter notebook (.ipynb) support #11409
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
OpenCode currently cannot work with Jupyter notebooks (`.ipynb` files). This limits OpenCode's usefulness for researchers and data scientists who primarily work with notebooks.
Proposed Solution
Add native support for reading and editing Jupyter notebooks by implementing 5 new tools:
read_notebook - Parse and display notebook structure and content
edit_notebook_cell - Edit specific cells while preserving metadata
add_notebook_cell - Insert new cells at any position
delete_notebook_cell - Remove cells from notebooks
list_notebook_cells - Quick overview of all cells
Implementation Details
Full JSON structure validation and preservation
Supports code, markdown, and raw cell types
Maintains execution counts and outputs
Cell metadata and language info preserved
Compatible with Jupyter notebook format 4.x+
Benefits
Enables OpenCode to assist with data science workflows
Supports the growing data science and ML community
Maintains compatibility with existing Jupyter ecosystem
No external dependencies required
Alternatives Considered
Converting notebooks to Python scripts (loses notebook structure)
Using external tools (adds complexity and dependencies)
Additional Context
I have already implemented this feature and tested it comprehensively. The implementation follows OpenCode's coding guidelines and is ready for review.
Test results available at: TESTING_GUIDE.md and JUPYTER_SUPPORT.md
Reacted by Alex Launi, Gustavo Morais, Gabriel Patzleiner, Peter McHale, Arthur Brito Medeiros, Sergey Troitskiy, Jack Mead, Nontas, justinhallas, Jason Ng and 12 more
Have you tried jupytext? It creates a .py paired to the ipynb, synchronizing both ways. Then all existing text based tools can work on the .py. I believe the format of the .py is fairly common and intuitive (code cell markers with %%, etc) so llms should be well trained on it, compared to the json or some custom tools.
This actually reduces complexity in opencode (reimplementing notebook handling), and a single optional dependency doesn't seem that bad
What is actually needed then is a way to run, rerun, clear, etc
was this merged? I am now working with notebooks and would love native support. but not sure cos sometime OC creates notebook without problems and sometime it has hard time with edits
I don't get any json syntax errors when it's editing a notebook and from what I can see it does a really nice job replacing only the specific cells it needs to, probably could be better but it works well as is, even without mcps or custom tooling 🤷♂️
I think this won't be shipped since it's been almost 6 months, so making it separately from the core seemed like a better path. We don't have the rich diff view that the default code snippet has, but we have cell edits, image view, and we don't always rewrite the full JSON of the ipynb.
Activity
IndianBoy42 commentedon Feb 20, 2026
Have you tried jupytext? It creates a .py paired to the ipynb, synchronizing both ways. Then all existing text based tools can work on the .py. I believe the format of the .py is fairly common and intuitive (code cell markers with %%, etc) so llms should be well trained on it, compared to the json or some custom tools.
This actually reduces complexity in opencode (reimplementing notebook handling), and a single optional dependency doesn't seem that bad
What is actually needed then is a way to run, rerun, clear, etc
VeryEvilHumna commentedon Feb 22, 2026
@IndianBoy42
Jupytext on sync replaces the file entirely and that kills the Jupyter Kernel (at least in vscode)
@IndianBoy42
https://github.com/datalayer/jupyter-mcp-server
Would be glad to see that functionality as a plugin, native support (#11414) bloats the context and would be used by a very few users
serg9375 commentedon Mar 2, 2026
was this merged? I am now working with notebooks and would love native support. but not sure cos sometime OC creates notebook without problems and sometime it has hard time with edits
pnpm-aftab commentedon Mar 2, 2026
It did not :(
serg9375 commentedon Mar 3, 2026
Do you copy the skill files into the .config/opencode? Or you just live with your own fork rn
PhmnPh commentedon Apr 5, 2026
Huge support. Native jupyter notebook support would be a big deal for ml researchers. Any news on this pr?
VeryEvilHumna commentedon Apr 5, 2026
Use an mcp server
That one connects to runtime:
https://github.com/datalayer/jupyter-mcp-server
That one is runtime-less:
https://github.com/VeryEvilHumna/mcp-server-jupyter-edit
colesmcintosh commentedon Apr 10, 2026
This works already, it edits the notebook cells fine. I think this can be closed.
VeryEvilHumna commentedon Apr 10, 2026
If it edits them fine it doesn't mean it does it a good and token-efficient way without json syntax errors
But I support closing the issue as the problem is already solved with mcps or custom tools
colesmcintosh commentedon Apr 13, 2026
I don't get any json syntax errors when it's editing a notebook and from what I can see it does a really nice job replacing only the specific cells it needs to, probably could be better but it works well as is, even without mcps or custom tooling 🤷♂️
zhiyuanzhai commentedon May 25, 2026
So it's now more of a UI feature request. The Jupyter cells are still displayed simply as plain JSON. Better to render them for appearance.
Restodecoca commentedon Jun 25, 2026
@pnpm-aftab Hi. So I made a plugin for ipynb: https://github.com/Restodecoca/opencode-ipynb
I think this won't be shipped since it's been almost 6 months, so making it separately from the core seemed like a better path. We don't have the rich diff view that the default code snippet has, but we have cell edits, image view, and we don't always rewrite the full JSON of the ipynb.
github-actions commentedon Aug 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.