Skip to main content

Keystone-MCP

CI      Python 3.11, 3.12, 3.13      version 0.5.0      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.
  • Onboarding and access through the agent. An administrator adds people, changes roles, and manages access by asking the agent — two agent skills (users_* and policy_* tools), 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.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 keystone-mcp-gateway 0.6.0
File Size Uploaded Provenance Actions
keystone_mcp_gateway-0.6.0.tar.gz 399.2 kB With provenance Details for keystone_mcp_gateway-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 844.3 kB

Release files / keystone_mcp_gateway-0.6.0.tar.gz

Download URL keystone_mcp_gateway-0.6.0.tar.gz
Size 399.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4e1ac8524d63e5e9c9edfb433c13585ce7aa8d784ecb6b493a36cfbe2c4a53b5
BLAKE2b-256 checksum
How to use checksums
d90dde56049d214bd50331c964a66224d92ca627d4b4bd971b4bf478797a3905
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 / keystone_mcp_gateway-0.6.0-py3-none-any.whl

Download URL keystone_mcp_gateway-0.6.0-py3-none-any.whl
Size 445.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7ee16d278e114305f6d3765c9b02e03efc03e9ffafcb1a716845bbb6be2d926
BLAKE2b-256 checksum
How to use checksums
474fb553144d8e7c10b003447bac9437c712ff19c6c03f9f4954699d1aabeaf4
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 keystone-mcp-gateway 0.6.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 keystone_mcp_gateway-0.6.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 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