Skip to main content

Keystone-MCP

CI      Python 3.11, 3.12, 3.13      version 0.6.4      FastMCP 4.1      MCP Streamable HTTP      CLAUDE skill

Keystone-MCP is the single front door of an agent application. A person works in one MCP client — Claude Desktop, Cursor, Claude Code — and that client talks only to Keystone-MCP. Behind it you run your own services, each in its own language, with its own storage, exposing its work as MCP tools.

Keystone-MCP is one layer with three jobs: facade (one address and one tool catalog for the client, split into sections), router (every call is forwarded to the service that actually owns that tool), and authorization (it checks who signed in and decides, from one policy file, what that person may see and call). Services keep their business logic and do not check roles themselves — Keystone-MCP already decided before the call reaches them.

One front door, many services behind it. Clients connect through Keystone-MCP. Keystone-MCP authenticates the caller, applies a role policy, and routes the call. Each service speaks MCP and keeps its own storage.

Documents, Billing and Search on the diagram are examples of services you bring. Keystone-MCP ships the facade, the built-in users directory, and the proxy.

Try it locally

Three containers — Keystone-MCP, Redis, and a sample upstream service — up in one command, with a sign-in, a second person with a smaller role, and that person's catalog shrinking to match:

git clone https://github.com/keystone-codes/keystone-mcp.git
cd keystone-mcp
docker compose -f docker-compose.demo.yml up -d --build --wait

Then connect a client and sign in: docs/paths/local-compose.md (about 15 minutes).

DEV tokens are for your machine only. They are a shared password — anyone holding one signs in as any email already in the users directory. The production profile refuses to start with one set. See the security model.

Get started

Why Keystone-MCP

  • One facade. A client sees one address and one tool catalog, split into sections, one per service.
  • Any users directory. Built in (SQLite for one host, Postgres for production), or your own directory over HTTP.
  • Any sign-in method. Google, OIDC (Okta, Entra, Keycloak), DEV tokens, and API keys for machines — one LoginProvider interface.
  • Install and administer through the agent. Agent skills: keystone-gateway-bootstrap installs the gateway and proves it with a live sign-in; keystone-user-admin adds people and changes roles (users_* tools); keystone-policy-admin changes the policy (policy_* tools); keystonectl (keystonectl repository) installs services behind the gateway. Or setup.sh --non-interactive.
  • Services in any language or SDK. Each one is a plain MCP server behind a transparent proxy; it keeps its own stack and storage.
  • One policy file, reloaded live. Access rules live in a single file; a change takes effect on SIGHUP, no restart.
  • Services never check roles themselves. RBAC is decided once, on Keystone-MCP, before a call is forwarded.
  • production refuses a weak setup. DEV tokens, a SQLite users directory, and plain HTTP on a public host fail startup, not just a warning.
  • Metrics and audit included. Prometheus series and structured authorization events ship with the process.
  • One image, two architectures. linux/amd64 and linux/arm64.

Full description of every capability: docs/features.md.

What it does not do

  • One organization per deployment. One users directory, one policy file and one upstream registry per Keystone-MCP. For several organizations, run several instances. Multi-tenancy is not planned.
  • No admin UI. People and roles are managed with the users_* tools from an agent, the keystone-mcp users commands and the policy file. A UI could be a separate project on top of the users directory protocol.
  • No business data. Keystone-MCP stores people, roles and sessions; your services keep their own data and logic.
  • No routing by request content. A call goes to the service that owns the tool name; arguments are not inspected or rewritten.
  • Not a sandbox for upstream code. A stdio upstream runs as the same OS user as Keystone-MCP with no isolation; trust it like you trust Keystone.

Documentation

All guides, grouped by role: docs/README.md.

Metrics and structured logs: audit and metrics, logging.

Contributing

See docs/CONTRIBUTING.md.

Security reports

See SECURITY.md.

License

Keystone-MCP is released under the Apache License 2.0. Copyright 2026 Alexey Klochkov (skynet@kofe.in).

You may use, modify and distribute it, including commercially. Keep this license and the copyright notice with the code, and mark the files you change.

License: Apache 2.0

Metadata

Release files for keystone-mcp-gateway 0.6.4

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

Source distribution (sdist)

Source distribution for keystone-mcp-gateway 0.6.4
File Size Uploaded Provenance Actions
keystone_mcp_gateway-0.6.4.tar.gz 407.2 kB With provenance Details for keystone_mcp_gateway-0.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keystone-mcp-gateway 0.6.4
File Interpreter ABI Platform Actions
keystone_mcp_gateway-0.6.4-py3-none-any.whl Python 3 none any Details for keystone_mcp_gateway-0.6.4-py3-none-any.whl

Total release size: 857.0 kB

Release files / keystone_mcp_gateway-0.6.4.tar.gz

Download URL keystone_mcp_gateway-0.6.4.tar.gz
Size 407.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3c78a8dc99634777a73ef3a11ce01caa93088cbe5a65e723a82cad0f76677fef
BLAKE2b-256 checksum
How to use checksums
c05c5155b56dd643274846c5cb0d2986ae6993d5ec34c8e0302465d764cde4d7
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 Nov 3, 2026.

Transparency log

Release files / keystone_mcp_gateway-0.6.4-py3-none-any.whl

Download URL keystone_mcp_gateway-0.6.4-py3-none-any.whl
Size 449.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78329d9e7131ce635b082366d603444ec5b8683fcfa0e14b57e334342ce88515
BLAKE2b-256 checksum
How to use checksums
8357f9fb363e61173e8c08413c9e332b0625d87bca8f5b5d9b9b9afc959e969b
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 Nov 3, 2026.

Transparency log

Security for keystone-mcp-gateway 0.6.4

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 keystone_mcp_gateway-0.6.4.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 Nov 3, 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