Skip to content

[FEATURE]: Add native Jupyter notebook (.ipynb) support #11409

Closed as not planned

Description

@pnpm-aftab

Feature hasn't been suggested before.

  • 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:

  1. read_notebook - Parse and display notebook structure and content
  2. edit_notebook_cell - Edit specific cells while preserving metadata
  3. add_notebook_cell - Insert new cells at any position
  4. delete_notebook_cell - Remove cells from notebooks
  5. 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

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 31, 2026
  2. IndianBoy42 commented on Feb 20, 2026

    @IndianBoy42

    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

  3. VeryEvilHumna commented on Feb 22, 2026

    @VeryEvilHumna

    @IndianBoy42

    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.

    Jupytext on sync replaces the file entirely and that kills the Jupyter Kernel (at least in vscode)

    @IndianBoy42

    What is actually needed then is a way to run, rerun, clear, etc

    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

  4. serg9375 commented on Mar 2, 2026

    @serg9375

    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

  5. pnpm-aftab commented on Mar 2, 2026

    @pnpm-aftab
    Author

    It did not :(

  6. serg9375 commented on Mar 3, 2026

    @serg9375

    Do you copy the skill files into the .config/opencode? Or you just live with your own fork rn

  7. PhmnPh commented on Apr 5, 2026

    @PhmnPh

    Huge support. Native jupyter notebook support would be a big deal for ml researchers. Any news on this pr?

  8. VeryEvilHumna commented on Apr 5, 2026

    @VeryEvilHumna

    Huge support. Native jupyter notebook support would be a big deal for ml researchers. Any news on this pr?

    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

  9. colesmcintosh commented on Apr 10, 2026

    @colesmcintosh

    This works already, it edits the notebook cells fine. I think this can be closed.

  10. VeryEvilHumna commented on Apr 10, 2026

    @VeryEvilHumna

    This works already, it edits the notebook cells fine. I think this can be closed.

    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

  11. colesmcintosh commented on Apr 13, 2026

    @colesmcintosh

    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 🤷‍♂️

  12. assigned and unassigned on Apr 26, 2026
  13. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
  14. zhiyuanzhai commented on May 25, 2026

    @zhiyuanzhai

    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.

  15. Restodecoca commented on Jun 25, 2026

    @Restodecoca

    @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.

  16. github-actions commented on Aug 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions