vscode-notebook-mcp
vscode-notebook-mcp
VS Code 에디터의 Jupyter 노트북을 MCP 호환 AI 에이전트(예: Claude Code)에 노출하는 VS Code 확장 프로그램입니다. 에이전트는 VS Code가 사용하는 것과 동일한 커널을 사용하여 셀을 읽고, 편집하고, 실행합니다.
상태: 프리 알파, 1인 개발 프로젝트. 처음부터 새로 구축되었으며 포크가 아닙니다.
도구 (12)
탐색
도구 | 설명 |
| URI, 파일 이름, 셀 개수 및 활성 상태를 포함하여 열려 있는 모든 노트북 나열 |
| 인덱스, 종류, 언어, 미리보기, 실행 상태를 포함하여 셀 나열 |
| 셀의 전체 소스 |
| 셀의 출력 (텍스트, 오류, base64 이미지) |
셀 조작
도구 | 설명 |
| 코드 또는 마크다운 셀을 임의의 위치에 삽입; 선택적으로 실행 |
| 기존 셀의 내용 교체 |
| 인덱스로 셀 삭제 |
실행
도구 | 설명 |
| 기존 코드 셀을 실행하고 출력 반환 |
| 한 셀의 출력 지우기 |
| 모든 셀의 출력 지우기 |
커널
도구 | 설명 |
| 언어, 상태, 노트북 URI |
|
|
모든 도구는 선택적 notebook_uri(생략 시 활성 노트북 에디터 사용)와 response_format("markdown" 또는 "json")을 허용합니다.
Related MCP server: lsp-mcp
설정
아직 설치하지 않았다면 VS Code에 Jupyter 확장 프로그램을 설치하세요.
이 확장 프로그램을 빌드하고 실행하세요:
npm install npm run build그런 다음 이 폴더를 VS Code에서 열고 F5를 눌러 확장 프로그램이 로드된 확장 개발 호스트를 시작하세요.
MCP 클라이언트 구성에 추가하세요:
{ "mcpServers": { "notebook": { "url": "http://127.0.0.1:49777/mcp" } } }확장 개발 호스트에서
.ipynb파일을 엽니다. 상태 표시줄에서🪐 :49777표시기를 확인하세요.
구성
설정 | 기본값 | 설명 |
|
| 선호 포트. 사용 중일 경우 자동으로 증가(+99까지). |
명령어
Notebook MCP: Restart ServerNotebook MCP: Show Server Info
아키텍처
┌─────────────────────────────────────────────────────────┐
│ VS Code window │
│ │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Jupyter extension (ms-toolsai.jupyter) │ │
│ │ │ │
│ │ Notebook document ◄──► Kernel ──► Outputs │ │
│ └───────────────────────────────────────────────────┘ │
│ ▲ │
│ │ vscode.NotebookEdit, │
│ │ notebook.cell.execute, │
│ │ jupyter.kernels.getKernel │
│ │ │
│ ┌───────────────────────┴───────────────────────────┐ │
│ │ This extension │ │
│ │ │ │
│ │ HTTP server :49777 ──► MCP tools (12) │ │
│ │ (StreamableHTTPServerTransport) │ │
│ └───────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│ HTTP (MCP protocol)
▼
┌───────────────────────────────┐
│ AI agent │
│ (Claude Code, Cursor, etc.) │
└───────────────────────────────┘구현 참고 사항
쓰기는
vscode.NotebookEdit+vscode.WorkspaceEdit를 통해 이루어지며, 실행 취소/다시 실행을 보존합니다.실행은
notebook.cell.execute를 디스패치하고cell.executionSummary.success가boolean값이 될 때까지 폴링하여 대기합니다(VS Code는 실행이 시작되자마자 요약을 생성하지만,success는 커널이 완료될 때만 boolean이 됩니다).삽입된 셀은 메타데이터 ID로 태그가 지정되어 다른 동시 편집으로 인해 인덱스가 변경된 후에도 실행기가 다시 찾을 수 있습니다.
다중 노트북: 모든 도구는
notebook_uri를 허용합니다. 확인 방식: 명시적 URI →vscode.workspace.notebookDocuments에서 조회(또는 열기); 그렇지 않으면vscode.window.activeNotebookEditor로 대체.
개발
npm install
npm run build # esbuild bundle
npm run watch # rebuild on change
npm run typecheck # tsc --noEmit
npm test # vitest (no tests yet)VS Code에서 F5를 눌러 확장 개발 호스트를 시작하세요.
참고 자료
이 프로젝트와 유사한 다른 프로젝트:
datalayer/jupyter-mcp-server — HTTP/WebSocket을 통해 실행 중인 Jupyter 서버와 통신하는 MCP 서버.
olavocarvalho/vscode-runtime-notebook-mcp — 이 프로젝트와 유사한 아키텍처(VS Code Notebook API + 내장 HTTP MCP 서버).
저는 학습을 위해 이 프로젝트를 처음부터 새로 만들었으며, 설계를 조정하고 새로운 기능을 개발할 여지를 두었습니다.
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Read and write your Fresh Jots notes from Claude, Cursor, and any MCP client.
System-of-record notebook for AI coding agents: pages, datastores, tasks, skills over MCP.
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, edit, execute cells, and capture outputs from Jupyter notebooks directly within VS Code or Cursor via the Model Context Protocol.6 npm16MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with VS Code's language server protocol features (definitions, references, diagnostics) and debugger (breakpoints, stepping, variable inspection) via an MCP server.9 npm1MIT
- AlicenseNot gradedqualityAmaintenanceVS Code extension that bridges local Jupyter Notebooks with AI Agents via MCP, enabling direct control of the active notebook tab.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables external agents to run, edit, create, and manage the Jupyter notebook the user is actively editing in VS Code, headlessly and without approval dialogs. Works with any MCP client and is Jupyter-optional for document operations.1MIT