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.0.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.1.1

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.1.1
File Size Uploaded Provenance Actions
keystonectl-0.1.1.tar.gz 169.8 kB With provenance Details for keystonectl-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 368.0 kB

Release files / keystonectl-0.1.1.tar.gz

Download URL keystonectl-0.1.1.tar.gz
Size 169.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0e3704f2a7026e6f4f5f791110e5868f2a2f5fbc4b648c6e48637f682270d059
BLAKE2b-256 checksum
How to use checksums
c69148b2607a30c2682ebfc82d0d4a4eb855a0e1d95023688f302db89113b579
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 15, 2026.

Transparency log

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

Download URL keystonectl-0.1.1-py3-none-any.whl
Size 198.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e59242144836d639250eea9692d8c0f27363e9809439ff1e6c8101ad126a13b6
BLAKE2b-256 checksum
How to use checksums
5092728392d466eb5f13d65eb02e73784f86690653f6e9f5dac0098b7aea0355
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 15, 2026.

Transparency log

Security for keystonectl 0.1.1

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.1.1.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 15, 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