af-jupyterlab-mcp
af-jupyterlab-mcp
AF 사용자가 UChicago ATLAS Analysis Facility Kubernetes 클러스터에서 자신의 사용자별 JupyterLab 서버를 생성, 검사, 삭제할 수 있게 해주는 MCP 서버입니다. 현재 af-portal이 배포하는 것과 동일한 노트북을 LLM용 도구로 노출합니다.
아키텍처
LLM <--MCP/HTTP--> af-jupyterlab-mcp <--k8s API--> notebook namespace (Pod/Service/Secret/Ingress)
^
| Authorization: Bearer <broker-issued JWT>
|
af-mcp-platform credential broker1단계(현재 이 저장소)는 af-portal의 portal/jupyterlab.py와 네 개의 Jinja 템플릿에서 포팅한, 노트북의 Pod/Service/Secret/Ingress 4중 항목을 관리하는 여섯 가지 도구를 제공합니다. 2단계(추적 중, 아직 구축되지 않음)는 노트북 내부에서 실행되는 Datalayer jupyter-mcp-server에 대한 타입 프록시를 추가합니다 — maniaclab/af-mcp-platform#189 참조.
Related MCP server: rucio-mcp
프로젝트 구조
src/af_jupyterlab_mcp/
├── cli.py # argparse: `af-jupyterlab-mcp serve` (HTTP only)
├── config.py # env-driven Settings: namespace, domain, image allowlist, quotas
├── server.py # FastMCP setup, lifespan (k8s client + broker verifier), tool registration
├── auth/
│ └── broker.py # extract_bearer(), get_broker_claims() -- broker-issued JWT verification
├── k8s/
│ ├── errors.py # GuardrailError, NameConflictError, NotFoundOrNotYoursError, ...
│ ├── guardrails.py # CPU/memory/duration range + image allowlist validation
│ ├── names.py # sanitize_k8s_pod_name, name availability, name generation
│ ├── templates.py # Jinja rendering of the four ported manifests
│ ├── notebooks.py # create/get/list/delete notebook (ported portal logic)
│ ├── gpu.py # get_gpu_availability (ported portal logic)
│ └── templates/ # pod.yaml.j2, service.yaml.j2, secret.yaml.j2, ingress.yaml.j2
│ # (ported verbatim from af-portal/portal/templates/jupyterlab/)
└── tools/
└── jupyterlab.py # the six @mcp.tool() functions도구 목록
create_jupyter_serverlist_jupyter_serversget_jupyter_serverdelete_jupyter_serverget_gpu_availabilitylist_supported_images
모든 서버의 소유자는 항상 검증된 브로커 JWT의 claims.unixname입니다. 어떤 도구도 소유자/사용자 이름 인수를 받지 않습니다.
빌드 및 테스트 명령
pixi run test # quick tests
pixi run lint # pre-commit + pylint
pixi run helm-lint # lint + smoke-render the Helm chartTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Massed Compute MCP — GPU inventory, VM lifecycle, billing, SSH keys, and setup recipes.
GPU cloud platform — create, manage, and monitor instances, snapshots, SSH keys, and billing.
Read GPU instances, types, images, filesystems and firewall rules; launch and terminate instances.
Deploy applications and manage governed Kubernetes preview spaces and capacity.
Related MCP Servers
- FlicenseAqualityCmaintenanceAn MCP server that enables LLMs to execute Python code on GPU-accelerated compute nodes within SLURM-managed HPC environments. It bridges local clients to remote clusters by launching JupyterLab sessions via SLURM jobs to facilitate high-performance notebook-based computation.7-
- AlicenseNot gradedqualityBmaintenanceAn MCP server that exposes Rucio distributed data management operations as tools for LLMs. Designed for ATLAS physicists working with grid data on analysis facilities, but usable with any Rucio instance.6Apache 2.0
- AlicenseAqualityDmaintenanceEnables code execution in isolated Docker containers with persistent IPython, Node.js, or R kernels, supporting file import/export and cross-session transfers via MCP tools.6MIT
- AlicenseAqualityDmaintenanceAI-powered MCP server for connecting and managing Jupyter Notebooks. Enables interactive code execution, multi-notebook management, and multimodal output for data analysis, visualization, and machine learning.12101 PyPI9MIT