Skip to main content

keystonectl

keystonectl installs MCP services behind a Keystone MCP gateway from a catalog, checks service packages and deployments, and gives agents a plan/apply interface.

  • Service manifest — authors and operators share one package description (keystone-service.yaml).
  • Check before run — lint and check validate packages and layout without starting containers.
  • Generate and lifecycle — init, service plan/apply, lock file, and compose fragments for the gateway.

keystonectl does not install keystone-mcp itself and does not edit RBAC policy files.

What keystonectl writes

service apply writes the package compose fragment, env files, docker-compose.packages.yml (the second -f), the upstream registry, the catalog snapshot, and the gateway names in .env. It does not edit packages/<name>.override.yml or the operator's docker-compose.yml. See docs/generation.md.

Install

Preferred:

uv tool install keystonectl

Alternatives:

pipx install keystonectl
uvx keystonectl --version

Quick start

keystonectl init --adopt <deployment-dir>
keystonectl --root <deployment-dir> catalog list
keystonectl --root <deployment-dir> bundle install minimal
keystonectl --root <deployment-dir> service status

Without sources.yaml the default catalog keystone-codes is used at tag v1.3.0.

Every command, its questions, and its error ids are in docs/commands.md.

A service you run yourself is not a package. keystonectl service add-remote records its URL, namespace, and filters, and writes a mode 600 handoff file for the team that runs it. keystonectl does not generate compose for that service.

Run from a checkout

uv run keystonectl --version
uv run keystonectl init <directory>
uv run keystonectl init --adopt <directory>
uv run keystonectl lint <manifest-or-directory>
uv run keystonectl --root <directory> check
uv run keystonectl --root <directory> catalog list
uv run keystonectl --root <directory> service plan <package>
uv run keystonectl --root <directory> service apply <package>

service install is another name for service apply. package lint is another name for lint.

Install through chat

Agents install services by following skills/keystonectl/. Copy that directory into the agent's skills directory on the host where keystone-mcp runs. The skill ships in the repository, not in the wheel: copy skills/keystonectl/ from a checkout or a release archive.

The agent runs keystonectl with --json, asks one question at a time, and takes a secret only as a path to a mode 600 file. It does not run Docker, edit compose files, or edit the RBAC policy. Recommended roles are handed to the keystone-policy-admin skill from keystone-mcp 0.5.0, which applies them after an administrator confirms, also for bundles. Without that skill, the agent shows the same {role, allow} list and the policy path for the administrator to apply.

JSON

Pass --json for one JSON document on stdout. The document matches src/keystonectl/schemas/output.schema.json. --json does not prompt. Secrets read during the run are replaced with ***.

Exit codes are the same for text and JSON:

Code Meaning
0 Done. Warnings are allowed.
1 The command was used incorrectly.
2 An answer is missing. Nothing was changed.
3 A rule failed, or something outside keystonectl failed. retryable is true only for this code.

Answers

Non-secret answers can be given with --set KEY=VALUE or the environment. The name of a per-service answer is KEYSTONE_SETUP_SERVICE_<PKG>_<SUFFIX>, with the package name in upper case and - turned into _. A secret is only a path to a mode 600 file. The variable name ends in _FILE. --set refuses secret variables.

Lookup order: --set, the environment, the answer stored in the lock, then the manifest default.

Files

Path Role
services.lock.yaml What is installed. Not committed.
sources.yaml Catalog sources. Absent means the default keystone-codes catalog.
keystonectl/upstreams.yaml Upstream registry read by keystone-mcp.
keystonectl/catalog-snapshot.yaml Catalog snapshot read by keystone-mcp.
.keystonectl/ Cache of catalogs and packages.

Start the stack with both compose files, for example:

docker compose -f docker-compose.yml -f docker-compose.packages.yml up -d

init --adopt prints that command. Without the second file, keystone-mcp does not see the registry, the snapshot, or the service network.

Documentation

Why things are the way they are: ADR 0006.

Verification

scripts/e2e.sh runs the release checks against a real keystone-mcp: the open example and the keystone-deploy MCP layout. Flags, scenarios, and how to read the JSONL report are in scripts/e2e/README.md. The manual VM and stand protocol, with an empty result column until someone runs it, is docs/release-checklist.md.

Compatibility

The keystonectl version is independent of keystone-mcp. Service packages declare supported keystone-mcp versions in compat.keystone_mcp; keystonectl check validates them against your deployment.

License

Apache-2.0 — see LICENSE.

Metadata

Release files for keystonectl 0.2.0

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

Source distribution (sdist)

Source distribution for keystonectl 0.2.0
File Size Uploaded Provenance Actions
keystonectl-0.2.0.tar.gz 201.7 kB With provenance Details for keystonectl-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keystonectl 0.2.0
File Interpreter ABI Platform Actions
keystonectl-0.2.0-py3-none-any.whl Python 3 none any Details for keystonectl-0.2.0-py3-none-any.whl

Total release size: 431.7 kB

Release files / keystonectl-0.2.0.tar.gz

Download URL keystonectl-0.2.0.tar.gz
Size 201.7 kB
Tags Source
SHA-256 checksum
How to use checksums
77601525279a12d45ece4eb41b087e817b46af2c97674c984143d08275f48960
BLAKE2b-256 checksum
How to use checksums
34c371640222cc6a6c9eeb95f6909c6139838e7468ec44b7a8a529eddf869180
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 Oct 27, 2026.

Transparency log

Release files / keystonectl-0.2.0-py3-none-any.whl

Download URL keystonectl-0.2.0-py3-none-any.whl
Size 230.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68b6059bdf317c932593c13af3947a16a4402fe522787de21a98f060c2018e0c
BLAKE2b-256 checksum
How to use checksums
6a3056b9c4d485ac9f8f58daba44c8e3318a2316af958d5dc8e92ec1c9a3eaaf
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 Oct 27, 2026.

Transparency log

Security for keystonectl 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for keystonectl-0.2.0.tar.gz

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 Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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