Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| JLAB_MCP_DIR | No | Base working directory | ~/.jlab-mcp |
| JLAB_MCP_LOG_DIR | No | SLURM job logs | ~/.jlab-mcp/logs |
| JLAB_MCP_PORT_MAX | No | Port range upper bound | 19000 |
| JLAB_MCP_PORT_MIN | No | Port range lower bound | 18000 |
| JLAB_MCP_SLURM_MEM | No | Memory in MB | 32000 |
| JLAB_MCP_SLURM_CPUS | No | CPUs per task | 4 |
| JLAB_MCP_SLURM_GRES | No | SLURM generic resource | gpu:1 |
| JLAB_MCP_SLURM_TIME | No | Wall clock time limit | 4:00:00 |
| JLAB_MCP_NOTEBOOK_DIR | No | Notebook storage | ~/.jlab-mcp/notebooks |
| JLAB_MCP_SLURM_MODULES | No | Space-separated modules to load (e.g. cuda/12.6) | |
| JLAB_MCP_CONNECTION_DIR | No | Connection info files | ~/.jlab-mcp/connections |
| JLAB_MCP_SLURM_PARTITION | No | SLURM partition | gpu |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tasks | {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
} |
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_new_session | Start a new session: submit SLURM job, start kernel, create notebook. Args: experiment_name: Name for the experiment/notebook. Returns: Dict with session_id, notebook_path, job_id, hostname. |
| start_session_resume_notebook | Resume a notebook: re-execute all cells to restore kernel state. Args: experiment_name: Name for this session. notebook_path: Path to existing notebook to resume. Returns: Dict with session_id, notebook_path, job_id, hostname, errors. |
| start_session_continue_notebook | Continue a notebook: fork it with fresh kernel (no re-execution). Args: experiment_name: Name for this session. notebook_path: Path to existing notebook to fork. Returns: Dict with session_id, notebook_path (forked), job_id, hostname. |
| execute_code | Execute code in the kernel and add cell to notebook. Args: session_id: Session identifier. code: Python code to execute. Returns: Formatted output string. |
| edit_cell | Edit an existing cell, re-execute it, and update outputs. Args: session_id: Session identifier. cell_index: Cell index (supports negative indexing). code: New code for the cell. Returns: Formatted output string. |
| add_markdown | Add a markdown cell to the notebook. Args: session_id: Session identifier. markdown: Markdown content. Returns: Confirmation with cell index. |
| shutdown_session | Shutdown session: stop kernel and cancel SLURM job. Args: session_id: Session identifier. Returns: Confirmation message. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| server_status | Get server status: active sessions, job states. |