Jupyter Switch
A powerful, lightweight and intuitive tool to seamlessly convert between Markdown (.md) and Jupyter Notebook (.ipynb) formats.
✨ Features
- 🚀 Automatic detection: Automatically detects whether the input file is
.mdor.ipynband converts accordingly - 🔄 Bidirectional conversion: Convert from Markdown to Jupyter Notebook and vice versa
- 🛡️ Backup protection: Automatically creates backups when output files already exist
- 📋 Preserves structure: Maintains code blocks, markdown content, and cell structure
- 🔧 MCP integration: Works as an MCP server tool for AI assistants
🤖 MCP Tool Usage (Recommended for AI Assistants)
This package provides an MCP (Model Context Protocol) server that can be used with AI assistants like Claude.
Installation as MCP Server
Add to your MCP settings configuration:
{
"mcpServers": {
"jupyter-switch": {
"command": "uvx",
"args": ["--from", "jupyter-switch", "jupyter-switch-mcp"]
}
}
}
Available Tool
switch_file: Converts between.mdand.ipynbformats automatically based on input file extension
Recommended Workflow for .ipynb Editing
- Convert to Markdown: Use the
switch_filetool to convert.ipynb→.mdfor easier editing - Edit: Modify the
.mdfile with your preferred editor - Convert back: Use the tool again to convert
.md→.ipynbwhen done
Example
"Translate this notebook to French, using jupyter-switch"
📦 CLI Usage
Installation
Install the package using pip:
pip install jupyter-switch
Usage
The main command is jupyter-switch:
# Convert a Markdown file to Jupyter Notebook
jupyter-switch example.md
# Convert a Jupyter Notebook to Markdown
jupyter-switch example.ipynb
Install with uv (Recommended) ⚡️
uvx will automatically install the package and run the command.
# Convert README.md to README.ipynb
uvx jupyter-switch README.md
# Convert notebook.ipynb to notebook.md
uvx jupyter-switch notebook.ipynb
The tool will automatically:
- Detect the input file format
- Generate the appropriate output filename
- Create a backup if the output file already exists
- Convert the content while preserving structure
Help 🆘
jupyter-switch --help
jupyter-switch --version
Conversion Details 🔄
Markdown to Jupyter Notebook
- Python code blocks (
python...) become code cells - All other content becomes markdown cells
- Adds appropriate notebook metadata and structure
Jupyter Notebook to Markdown
- Code cells become Python code blocks
- Markdown cells are preserved as-is
- Cell outputs are ignored during conversion
Requirements 🐍
- Python >= 3.10
License 📄
MIT License
Release files for jupyter-switch 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jupyter_switch-0.1.3.tar.gz | 35.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jupyter_switch-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.8 kB
Release files / jupyter_switch-0.1.3.tar.gz
| Download URL | jupyter_switch-0.1.3.tar.gz |
|---|---|
| Size | 35.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98201c3e699a75bd31e7266b4e7f4ca1d61ea66c32f524b17255e9984ed17ec6
|
|
BLAKE2b-256 checksum How to use checksums |
3778b964c9d261ed1eb95421ccdeb1bf05a527667faf77c9b253e40967102941
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 6, 2025.
Transparency logRelease files / jupyter_switch-0.1.3-py3-none-any.whl
| Download URL | jupyter_switch-0.1.3-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b078b9fd2b681340b6cc7c5eb34ed21c562d993d11a2c926277a2d53c8436d7d
|
|
BLAKE2b-256 checksum How to use checksums |
93f60dc23bb30fcea0954d8a58e9117650b47d00029fa45c7f8b8b57856a2325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 6, 2025.
Transparency log