{"id":26775466,"url":"https://github.com/usamak98/python-notebook-mcp","last_synced_at":"2025-06-22T05:35:21.911Z","repository":{"id":284943737,"uuid":"956527563","full_name":"UsamaK98/python-notebook-mcp","owner":"UsamaK98","description":"Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context Protocol","archived":false,"fork":false,"pushed_at":"2025-03-28T14:31:55.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T14:33:22.088Z","etag":null,"topics":["ai-tools","claude","claude-desktop","cursor-ide","fastmcp","ipynb","jupyter","jupyter-notebooks","mcp","model-context-protocol","model-context-protocol-servers","notebook-editor","python","windsurf"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UsamaK98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-28T12:02:46.000Z","updated_at":"2025-03-28T14:31:59.000Z","dependencies_parsed_at":"2025-03-28T14:34:14.292Z","dependency_job_id":"7dcc1f9e-61c2-4dfb-be9e-cb3463918fc7","html_url":"https://github.com/UsamaK98/python-notebook-mcp","commit_stats":null,"previous_names":["usamak98/python-notebook-mcp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsamaK98%2Fpython-notebook-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsamaK98%2Fpython-notebook-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsamaK98%2Fpython-notebook-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UsamaK98%2Fpython-notebook-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UsamaK98","download_url":"https://codeload.github.com/UsamaK98/python-notebook-mcp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246131335,"owners_count":20728303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","claude","claude-desktop","cursor-ide","fastmcp","ipynb","jupyter","jupyter-notebooks","mcp","model-context-protocol","model-context-protocol-servers","notebook-editor","python","windsurf"],"created_at":"2025-03-29T03:18:26.098Z","updated_at":"2025-03-29T03:18:26.692Z","avatar_url":"https://github.com/UsamaK98.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003ePython Notebook MCP\u003c/h1\u003e\n  \u003cp\u003eMCP server enabling AI assistants to interact with Jupyter notebooks through the Model Context Protocol.\u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"MIT License\"/\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Python-3.10+-blue.svg\" alt=\"Python 3.10+\"/\u003e\n    \u003cimg src=\"https://img.shields.io/badge/MCP-Compatible-orange.svg\" alt=\"MCP Compatible\"/\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## 🚀 Features\n\n- Create and manage Jupyter notebooks\n- Read/write notebook cells (code and markdown)\n- View cell outputs including text and visualizations\n- Initialize custom workspace directories\n\n## 📋 Prerequisites\n\n- Python 3.10+\n- `fastmcp` and `nbformat` packages\n\n## 🔧 Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/usamakhatab/python-notebook-mcp.git\ncd python-notebook-mcp\n\n# Install dependencies with uv (recommended)\nuv pip install -r requirements.txt\n\n# Install dependencies with pip\npip install -r requirements.txt\n```\n\n## 🔌 Integration\n\n### Claude Desktop\n\n1. Open Claude Desktop settings → Developer → Edit Config\n2. Add to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"jupyter\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--with\", \"fastmcp\", \"fastmcp\", \"run\", \"C:\\\\full\\\\path\\\\to\\\\server.py\"],\n      \"autoApprove\": [\"initialize_workspace\", \"list_notebooks\"]\n    }\n  }\n}\n```\n\n### Cursor IDE\n\nAdd to `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"jupyter\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--with\", \"fastmcp\", \"fastmcp\", \"run\", \"C:\\\\full\\\\path\\\\to\\\\server.py\"]\n    }\n  }\n}\n```\n\n## 📘 Usage\n\n### Key Concept: Workspace Initialization\n\nAlways begin by initializing the workspace:\n\n```\ninitialize_workspace(\"C:\\\\absolute\\\\path\\\\to\\\\project\")\n```\n\n\u003e ⚠️ You **must** provide the full absolute path; relative paths are not accepted\n\n### Core Operations\n\n```\n# Create a notebook\ncreate_notebook(\"notebook.ipynb\", \"My Analysis\")\n\n# Add a cell\nadd_cell(\"notebook.ipynb\", \"print('Hello, world!')\", \"code\")\n\n# Read a cell\nread_cell(\"notebook.ipynb\", 0)\n\n# Edit a cell\nedit_cell(\"notebook.ipynb\", 0, \"# Updated markdown\")\n\n# View outputs\nread_cell_output(\"notebook.ipynb\", 1)\n```\n\n## 🛠️ Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `initialize_workspace` | **REQUIRED FIRST STEP** - Set workspace directory |\n| `list_notebooks` | List all notebook files in a directory |\n| `create_notebook` | Create a new Jupyter notebook |\n| `read_notebook` | Get complete notebook contents |\n| `read_cell` | Get a specific cell from a notebook |\n| `edit_cell` | Update a cell's content |\n| `read_notebook_outputs` | Get all outputs from a notebook |\n| `read_cell_output` | Get output from a specific cell |\n| `add_cell` | Add a new cell to a notebook |\n\n## 🧪 Development\n\n### Debugging\n\nRun in development mode:\n```bash\nfastmcp dev server.py\n```\n\n### Testing\n\nTest your MCP server with the FastMCP CLI:\n\n```bash\n# Install the MCP CLI\npip install \"fastmcp[cli]\"\n\n# Run the CLI against your server\nmcp-cli run server.py\n```\n\nThis opens an interactive shell where you can test all available tools manually.\n\n## 🔍 Troubleshooting\n\n- **Wrong directory?** Initialize workspace with absolute path\n- **Connection issues?** Use dev mode for detailed logs\n- **MCP errors?** Check paths in configuration file\n\n## 📄 License\n\n[MIT License](LICENSE) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusamak98%2Fpython-notebook-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusamak98%2Fpython-notebook-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusamak98%2Fpython-notebook-mcp/lists"}