Skip to main content

rustygate

A Jupyter kernel gateway as one binary: kernels, terminals, files, search, and per-cell notebook operations, over the same REST and websocket API shapes jupyter_server uses.

Running

rustygate [--host H] [--port N] [--token T | --token-file PATH] [--root DIR] [--tls]

The defaults are 127.0.0.1, port 8787, no auth, and the working directory as the files root. With a token set, requests carry Authorization: Bearer T; Jupyter's Authorization: token T form and ?token=T are also accepted. --token-file reads the token without putting it in the process arguments. --tls serves https and wss from a self-signed certificate generated at startup; clients opt out of verification (jupyasyncclient's verify=False).

Running as a service

rustygate service installs and controls a user service using launchd on macOS and systemd on Linux:

rustygate service install --root ~/git --workdir ~/git/project
rustygate service status
rustygate service restart
rustygate service stop
rustygate service start
rustygate service uninstall

install starts the service immediately; running it again replaces the configuration. Add --host 0.0.0.0 for direct network access, --token-file ~/.config/rustygate/token for authentication, and --tls when wanted. A missing token file is generated with user-only permissions. --env-file sources environment variables inherited by kernels. The service PATH is the rustygate binary's own directory (the venv bin, under a pip install) plus the standard system directories, so kernels find python despite the minimal launchd and systemd defaults. The default loopback service can instead be reached remotely through an SSH tunnel.

GET / lists every route with a one-line summary, and GET /help/<path> describes the routes at a path (a template such as api/kernels/{kid}, or a concrete path): each method's parameters, query keys, body shape, and what it does. The text comes from the handlers' doc comments through the docments crate, so it cannot drift from the code.

GET /openapi.json is the same API as an OpenAPI 3.1 document, with request and response schemas generated (via schemars) from the typed query, body, and model structs the route table declares. The two websocket routes describe their message protocols in prose, since OpenAPI has no channel vocabulary.

MCP

POST /mcp is a stateful Streamable HTTP MCP server for Claude Code and other MCP clients. Its tools list, create, select, restart, interrupt, and delete kernels, plus execute Python/IPython cells (py); code runs exactly as written, so magics like a %%bash first line work unchanged. The MCP transport session remembers its current kernel server-side, so the model does not need to carry an id between calls. Executing with no kernel current starts one for the session, and ending the session (DELETE /mcp, which Claude Code sends on shutdown) stops every kernel the session created with autoclose. create(dlgname) is get-or-create by kernel path and autocloses its kernel by default (autoclose=false keeps it); an execution may name another existing binding for that call without changing the current selection. A client may also send per-session creation defaults (cwd, env, startup code, quiet) in its initialize params; see DEV.md.

POST /mcp/{path} is the smaller stateless alternative for clients configured for one dialog. The URL-decoded relative path is the fixed kernel binding, so no MCP session id or model-visible kernel selector is needed. It exposes only py and interrupt; the first execution lazily gets or creates the bound kernel, while interrupt never creates one. Its tool executions use kernel priority 1, ahead of queued normal-priority notebook runs without preempting a cell already running.

Kernels actually spawned through MCP receive RUSTYGATE_LAUNCHER=mcp, available during their startup profiles and preserved across restart. Selecting or get-or-creating a kernel that was already running does not alter its environment. See DEV.md for the tool and execution contract.

Metadata

Release files for rustygate 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for rustygate 0.1.8
File Interpreter ABI Platform
rustygate-0.1.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
rustygate-0.1.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
rustygate-0.1.8-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 12.4 MB

Release files / rustygate-0.1.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL rustygate-0.1.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f472d694ebdd197d909b0c4517a1cdf10d36b147a15fe6877889a7c177b37f25
BLAKE2b-256 checksum
How to use checksums
4aff51ad0cf8f2d5d02890c0463f86205994aa150a8882fc063f4c2521d1672e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release files / rustygate-0.1.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL rustygate-0.1.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.1 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
81ea7cc50514489ce59c3c0fe4a9659b3a1f65534610b3d8b40950c7cf8b87d2
BLAKE2b-256 checksum
How to use checksums
cf4642e3798ec8d6cdd0bd56793ea75f11958206e85498f637a58fc407ed641d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release files / rustygate-0.1.8-py3-none-macosx_11_0_arm64.whl

Download URL rustygate-0.1.8-py3-none-macosx_11_0_arm64.whl
Size 4.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2f159dae2d6606a0914abc8b4adac0cdbe35427c10d0ee6c3d1db9f359dfecfd
BLAKE2b-256 checksum
How to use checksums
2c085d0599c57db4fb45b3ddbe84c23b9a95434e061f76d15ffb714aeb752e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.24

3 release files

0.1.23

3 release files

0.1.22

3 release files

0.1.21

3 release files

0.1.19

3 release files

0.1.17

3 release files

0.1.16

3 release files

0.1.15

3 release files

0.1.14

3 release files

0.1.13

3 release files

0.1.12

3 release files

0.1.9

3 release files

This release

0.1.8 This release

3 release files

0.1.2

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page