Code Mode
The code Mode depends on abcoder In code Mode, usually you don’t need develop tools, because LLM generate code, and jupyter execute code. But if you Always want to call same codes or specific code execution. You also can develop mcp tool in code mode, just refer to tool-mode, define schemata, server, use get_nbm to get jupyter backend.Overview
Code mode is designed for interactive analysis workflows where the LLM generates code that gets executed in Jupyter notebooks. This mode leverages theNotebookManager
backend to handle multiple notebook instances with different kernels.
Additionally, it can generate complete Jupyter notebooks containing executable code, analysis results, and visualizations.
Key Components
NotebookManager
TheNotebookManager
is the core backend for code mode operations. It provides:
- Multi-notebook Management: Handle multiple Jupyter notebook instances
- Code Execution: Execute generated code with proper error handling
- Notebook Persistence: Save and load notebook states
Backend Access
Useget_nbm()
to access the NotebookManager in your MCP tools: