Skip to main content

Keystone-MCP

CI      Python 3.11, 3.12, 3.13      version 0.6.5      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.5

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.5
File Size Uploaded Provenance Actions
keystone_mcp_gateway-0.6.5.tar.gz 407.3 kB With provenance Details for keystone_mcp_gateway-0.6.5.tar.gz

Built distribution (wheel)

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

Total release size: 857.2 kB

Release files / keystone_mcp_gateway-0.6.5.tar.gz

Download URL keystone_mcp_gateway-0.6.5.tar.gz
Size 407.3 kB
Tags Source
SHA-256 checksum
How to use checksums
55762e4f1b9bbf6cfc58ffe4dc42438b411e2f1595f56a9467a1d28f6d6260fa
BLAKE2b-256 checksum
How to use checksums
78e848e7df43e797d87da3790d1db9fa2828e122e432063f5475df98eb59e759
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 11, 2026.

Transparency log

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

Download URL keystone_mcp_gateway-0.6.5-py3-none-any.whl
Size 449.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74f7da24e0f2166732dc01453b413200ad3d4839f428adbdd7da35d7758ac72e
BLAKE2b-256 checksum
How to use checksums
6ed4d5c7a0a0d807a11657d735f6d3fb2cc5834d56b3cbf1100bb1cc39bec3a2
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 11, 2026.

Transparency log

Security for keystone-mcp-gateway 0.6.5

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.5.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 11, 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