mcp-runtime

module
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0

README

MCP Runtime

Docs Website Platform QA E2E Staging E2E Gosec Scan Gitleaks Scan Trivy FS Scan Trivy Image Scan Coverage

MCP Runtime is a Kubernetes control plane for Model Context Protocol servers. It deploys MCP servers into your cluster, enforces per-tool access policy on every call, and records each decision for audit.

The workflow has three steps:

  1. Describe your server in .mcp/servers.yaml: each tool's name, the trust level it requires, and its side effect. mcp-runtime server init creates the file, and --from-server fills in tools from a running instance. Then server build, server push, and server deploy publish it.
  2. Grant access. An access grant (mcp-runtime access grant init) lets a person, agent, or team call specific tools on that server, up to a maximum trust level and only with the side effects you allow.
  3. Open a session. An agent session (mcp-runtime access session init) time-boxes that access for one agent, and you can revoke it at any time.

On every call, a gateway in front of the server checks the caller's identity, session, trust level, and the tool's side effect before the call reaches your code, and records the decision for audit. Under the hood these are the MCPServer, MCPAccessGrant, and MCPAgentSession resources, and the operator creates the Deployment, Service, Ingress, and policy for you.

A public preview runs at platform.mcpruntime.org. The same stack installs into your own cluster with mcp-runtime setup.

[!CAUTION] MCP Runtime is alpha software. APIs, commands, and behavior are still evolving. Use the docs, CRDs, and api/v1alpha1 types as the source of truth before production use.

Features

  • MCPServer, MCPAccessGrant, and MCPAgentSession are namespaced CRDs, so servers, access, and sessions are visible and reviewable with kubectl.
  • The mcp-gateway sidecar applies deny-by-default tool rules, trust ceilings, side-effect limits, session expiry, and revocation on every tools/call.
  • Every allow and deny decision is recorded with the identity, tool, reason, and policy version, and is queryable through the Sentinel API and dashboards.
  • adapter proxy gives IDEs, agent frameworks, and scripts a local Streamable HTTP endpoint that adds a session-bound client certificate with automatic refresh and forwards OAuth when the target requires it.
  • Team namespaces, RBAC, and teamID subject matching let several teams publish and govern servers on one cluster, with private, org-wide, or public catalogs.
  • Setup, registry and image-pull wiring, ingress, rollout readiness, cluster doctor, cluster diagnostics, and status commands are included.
  • Documented install paths cover Kind, k3s, self-managed clusters, and managed Kubernetes with external registries.

What ships

  • mcp-runtime CLI for auth, bootstrap, setup, status, registry, server, catalog, cluster, access, team, and sentinel
  • mcp-runtime adapter proxy for governed Streamable HTTP agent integrations. It enrolls a session-bound client certificate with --server <name> --agent <id> once an enabled grant exists; --auto-refresh renews the certificate (see Agent Adapter)
  • Platform UI for authenticated MCP catalog browsing, platform state, and web operations
  • MCPServer, MCPAccessGrant, and MCPAgentSession CRDs
  • Kubernetes operator for Deployment, Service, Ingress, and policy materialization
  • Internal or provisioned registry workflows
  • Optional gateway enforcement for identity, tool policy, trust, and audit emission
  • Bundled Sentinel stack for ingest, processing, API, UI, and observability. Control-plane services run in mcp-platform. The event pipeline and telemetry stack run in mcp-observability. Promtail runs in mcp-log-collector. MCP servers stay in mcp-servers, mcp-servers-org, mcp-servers-public, or mcp-team-{slug}. See Namespaces.

Requirements

Using the hosted platform requires the CLI; release installation needs curl or wget on macOS/Linux, or PowerShell on Windows.

For self-hosting and source/contributor workflows, host tools include:

  • Go 1.26+ and Make for source builds and contributor workflows (release CLI installs do not need them)
  • Docker or a Docker-compatible client, with the daemon running
  • kubectl on PATH, configured for the target cluster
  • curl, jq, and python3 for documented dev and traffic-generation flows
  • kind for local Kind-based clusters

Cluster prerequisites:

  • A running Kubernetes cluster: kind, k3s, minikube, Docker Desktop Kubernetes, EKS, GKE, AKS, or equivalent
  • Working DNS, default storage class, ingress, and load-balancing path for your distribution
  • See docs/deployment-targets.md to choose the install shape, then docs/cluster-readiness.md before running production-like installs

mcp-runtime setup installs the platform stack, including Sentinel services such as ClickHouse and Kafka. You do not install those separately for the default flow.

Quick start

Install the CLI on macOS or Linux (the installer detects your OS and CPU):

curl -fsSL https://raw.githubusercontent.com/mcp-runtime/mcp-runtime/main/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"
mcp-runtime --version

For Windows, installation options, and your first hosted deployment, follow the Quickstart. No Kubernetes cluster is needed to use the hosted platform.

To install the platform on your own cluster, follow Getting Started. Choose a deployment target and check cluster readiness before setup.

To build from source or run a disposable local Kind cluster, start with the Contributor Guide.

Common commands

./bin/mcp-runtime bootstrap              # preflight cluster prerequisites
./bin/mcp-runtime setup                  # install platform stack
./bin/mcp-runtime status                 # show platform health
./bin/mcp-runtime auth login --api-url <platform-url>   # save platform credentials
./bin/mcp-runtime team create acme --name "Acme Corp"   # create a team namespace (admin)
./bin/mcp-runtime registry status        # inspect registry
./bin/mcp-runtime server status          # inspect MCP servers
./bin/mcp-runtime catalog tools          # search tools across visible servers
./bin/mcp-runtime access grant list      # inspect access grants
./bin/mcp-runtime adapter proxy --server <name> --agent <id> --auto-refresh   # connect an MCP client
./bin/mcp-runtime sentinel status        # inspect Sentinel stack

Comparison

Features and deployment models change; check each project's current documentation before choosing.

MCP directories and catalogs

The Official MCP Registry, Glama, Smithery, Docker MCP Catalog, PulseMCP, mcp.so, and client-specific catalogs help people find and install public MCP servers. MCP Runtime runs MCP servers inside your own cluster and governs calls to them. The two are complementary: a server you find in a directory can be deployed and governed with MCP Runtime.

Directories and catalogs MCP Runtime
Purpose Find and install public servers Host, deploy, govern, and audit your own servers
Data Discovery metadata, popularity, install snippets MCPServer resources, grants, sessions, policy decisions, audit events
Where it runs Third-party hosted service or client feature Your Kubernetes cluster
Request path Ends once the client is configured Every tool call passes through the gateway
MCP gateways and platforms

Several projects run MCP servers on Kubernetes or define Kubernetes APIs for MCP traffic. MCP Runtime's focus is expressing server workloads and access policy (trust ceilings, allowed side effects, per-tool rules, user consent, expiry, revocation) as validated Kubernetes resources that the operator reconciles and the gateway enforces.

Project Focus Compared with MCP Runtime
Archestra MCP platform with Kubernetes server orchestration, gateway, registry, and agent/chat features Overlaps on Kubernetes-hosted servers; broader agent platform. MCP Runtime centers access on grant and session resources.
Obot MCP hosting, registry, gateway, and an organization-facing AI experience Also hosts MCP servers. MCP Runtime keeps workload and access policy as Kubernetes state.
Microsoft MCP Gateway Kubernetes-oriented MCP gateway and management APIs, adapter/tool lifecycle, identity integrations Overlaps on Kubernetes. MCP Runtime models deployment, grants, and consented sessions as resources.
Agent Router Kubernetes Gateway API routing for MCP and AI traffic Overlaps on Kubernetes APIs, focused on routing. MCP Runtime also manages server workloads and session consent.
agentgateway High-performance data-plane gateway for MCP, agents, and AI traffic Focused on routing and policy in the data plane. MCP Runtime owns workload lifecycle and access state.
IBM ContextForge Federation and gateway for MCP, A2A, REST, and gRPC Broader protocol federation. MCP Runtime focuses on Kubernetes workload and access governance.
MCPJungle Self-hosted team gateway, unified endpoint, discovery, tool grouping Centers aggregation. MCP Runtime ties access decisions to reconciled cluster resources.
Unla MCP/API gateway with API-to-MCP conversion Focused on API conversion. MCP Runtime focuses on deployed workloads and governed sessions.
OpenZiti MCP Gateway Zero-trust networking and remote access for MCP tools Focused on networking. MCP Runtime governs workloads and agent access inside Kubernetes.
Docker MCP Gateway Local Docker-based MCP server lifecycle, catalog, and configuration Focused on local developer workflow. MCP Runtime targets platform-managed Kubernetes.
LiteLLM Model gateway with MCP access, provider routing, keys, and spend controls Focused on model routing and spend. MCP Runtime focuses on MCP server lifecycle and consented access.
Kong General API gateway with MCP proxy and AI gateway features General-purpose gateway. MCP Runtime is an MCP-specific control plane for workloads, grants, and sessions.
Portkey AI gateway and managed MCP gateway Focused on AI traffic and hosted gateways. MCP Runtime is self-managed and reconciled from Kubernetes resources.
Composio SaaS integrations, toolkits, and per-user OAuth for agents Focused on integration breadth. MCP Runtime focuses on operating MCP workloads and access policy.
Preloop Agent control plane with MCP firewall, model gateway, approvals, and budgets Focused on model controls and approvals. MCP Runtime expresses grants and sessions as Kubernetes state.
When to choose MCP Runtime

Choose MCP Runtime when you want one system to deploy MCP servers into your cluster and enforce who may call which tool, with what trust and consent.

Another project may fit better if your main need is broad SaaS integrations, model routing and spend controls, API-to-MCP conversion, remote zero-trust networking, or a full agent/chat product.

Development checks

gofmt -s -l .
go build -o bin/mcp-runtime ./cmd/mcp-runtime
go test ./... -count=1 -race
go vet ./...

For targeted tests, e2e setup, and debugging runbooks, use AGENTS.md and the docs site.

Agent tool configuration

The repo keeps Claude-specific local configuration in .claude/. Its skills entry is expected to be a symlink to ../.codex/skills, so Claude Desktop and the Codex CLI discover the same repository skills during local development.

License

Apache License 2.0. See LICENSE.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the MCP server resource.
Package v1alpha1 contains API Schema definitions for the MCP server resource.
cmd
doctor-smoke command
mcp-runtime command
operator command
e2e-image-cache command
Command e2e-image-cache ensures a local Docker image via content-hash GHCR reuse (pull on hit, build+optional push on miss).
Command e2e-image-cache ensures a local Docker image via content-hash GHCR reuse (pull on hit, build+optional push on miss).
release/platformmanifest command
Command platformmanifest prints the platform release component manifest (platform-manifest.json) for a release version, generated from the CLI's component catalog so `mcp-runtime update` and releases stay in sync.
Command platformmanifest prints the platform release component manifest (platform-manifest.json) for a release version, generated from the CLI's component catalog so `mcp-runtime update` and releases stay in sync.
agentadapter
Package agentadapter implements optional agent-side HTTP adapters that forward MCP traffic to governed MCP Runtime routes.
Package agentadapter implements optional agent-side HTTP adapters that forward MCP traffic to governed MCP Runtime routes.
cli
cli/access
Package access owns routing for the access top-level command.
Package access owns routing for the access top-level command.
cli/adapter
Package adapter routes the adapter top-level command for the certificate- authenticated HTTP proxy.
Package adapter routes the adapter top-level command for the certificate- authenticated HTTP proxy.
cli/admin
Package admin owns operator-only CLI commands that require direct Kubernetes access.
Package admin owns operator-only CLI commands that require direct Kubernetes access.
cli/auth
Package auth owns routing for the auth top-level command.
Package auth owns routing for the auth top-level command.
cli/bootstrap
Package bootstrap owns routing for the bootstrap top-level command.
Package bootstrap owns routing for the bootstrap top-level command.
cli/cluster
Package cluster implements cluster operations for the cluster CLI command.
Package cluster implements cluster operations for the cluster CLI command.
cli/cluster/doctor
Package doctor implements cluster readiness diagnostics for the cluster CLI.
Package doctor implements cluster readiness diagnostics for the cluster CLI.
cli/core
Package cli contains shared CLI infrastructure used by command packages.
Package cli contains shared CLI infrastructure used by command packages.
cli/kube
Package kube contains shared kubectl-oriented helpers for CLI commands.
Package kube contains shared kubectl-oriented helpers for CLI commands.
cli/registry
Package registry owns routing for the registry top-level command.
Package registry owns routing for the registry top-level command.
cli/root
Package root provides the foldered CLI command routing layer for the mcp-runtime binary.
Package root provides the foldered CLI command routing layer for the mcp-runtime binary.
cli/sentinel
Package sentinel owns routing for the sentinel top-level command.
Package sentinel owns routing for the sentinel top-level command.
cli/server
Package server owns routing for the server top-level command.
Package server owns routing for the server top-level command.
cli/setup
Package setup owns routing for the setup top-level command.
Package setup owns routing for the setup top-level command.
cli/setup/assetpath
Package assetpath resolves repository-relative asset paths from the current working directory by walking upward until go.mod, services/, and k8s/ match.
Package assetpath resolves repository-relative asset paths from the current working directory by walking upward until go.mod, services/, and k8s/ match.
cli/setup/ingressmanifest
Package ingressmanifest builds YAML for the host-based platform UI Ingress.
Package ingressmanifest builds YAML for the host-based platform UI Ingress.
cli/setup/plan
Package plan contains pure setup planning types and default resolution.
Package plan contains pure setup planning types and default resolution.
cli/setup/platform
Package platform implements the setup workflow for MCP Runtime platform components.
Package platform implements the setup workflow for MCP Runtime platform components.
cli/setup/platform/imagecache
Package imagecache provides content-hash based GHCR reuse for QA E2E and setup platform images.
Package imagecache provides content-hash based GHCR reuse for QA E2E and setup platform images.
cli/status
Package status owns the status top-level command and platform status output.
Package status owns the status top-level command and platform status output.
cli/update
Package update owns the `mcp-runtime update` command, which moves an installed MCP Runtime platform to a release by patching only the images of platform services whose versions changed.
Package update owns the `mcp-runtime update` command, which moves an installed MCP Runtime platform to a release by patching only the images of platform services whose versions changed.
operator
Package operator provides the Kubernetes operator for MCPServer resources.
Package operator provides the Kubernetes operator for MCPServer resources.
platformrelease
Package platformrelease defines the MCP Runtime platform component catalog, the per-release component manifest format, and version/image helpers shared by `mcp-runtime setup` (version stamping) and `mcp-runtime update`.
Package platformrelease defines the MCP Runtime platform component catalog, the per-release component manifest format, and version/image helpers shared by `mcp-runtime setup` (version stamping) and `mcp-runtime update`.
pkg
authfile
Package authfile stores local platform login credentials for the mcp-runtime CLI (API base URL, token, optional registry host).
Package authfile stores local platform login credentials for the mcp-runtime CLI (API base URL, token, optional registry host).
certauth
Package certauth provides shared certificate signing request helpers for session-bound mTLS credentials issued by the platform API and adapter CLI.
Package certauth provides shared certificate signing request helpers for session-bound mTLS credentials issued by the platform API and adapter CLI.
errx
Package errx provides structured, code-based errors for MCP runtime and CLI tooling.
Package errx provides structured, code-based errors for MCP runtime and CLI tooling.
identity
Package identity provides shared SPIFFE session identity parsing and formatting used by the gateway, platform API, and adapter clients.
Package identity provides shared SPIFFE session identity parsing and formatting used by the gateway, platform API, and adapter clients.
internalapi
Package internalapi holds shared request/response DTOs for platform-api /internal/* endpoints.
Package internalapi holds shared request/response DTOs for platform-api /internal/* endpoints.
manifest
Package manifest provides structured YAML manifest mutation utilities.
Package manifest provides structured YAML manifest mutation utilities.
mcpdefaults
Package mcpdefaults defines platform defaults shared across the API, CLI, operator, and runtime services.
Package mcpdefaults defines platform defaults shared across the API, CLI, operator, and runtime services.
oauthresource
Package oauthresource contains dependency-light OAuth resource URL helpers shared by the API and runtime services.
Package oauthresource contains dependency-light OAuth resource URL helpers shared by the API and runtime services.
operatorutil
Package operatorutil provides shared utilities for the MCP operator.
Package operatorutil provides shared utilities for the MCP operator.
platforminventory
Package platforminventory defines component identity, ownership and placement.
Package platforminventory defines component identity, ownership and placement.
platformmode
Package platformmode is the single source of truth for the MCP Runtime platform-mode selector (tenant/org/public) and the catalog namespace rules derived from it.
Package platformmode is the single source of truth for the MCP Runtime platform-mode selector (tenant/org/public) and the catalog namespace rules derived from it.
policy
Package policy provides shared gateway policy types used by both the operator and the MCP proxy.
Package policy provides shared gateway policy types used by both the operator and the MCP proxy.
runtimeconfig
Package runtimeconfig centralizes per-user MCP Runtime configuration paths.
Package runtimeconfig centralizes per-user MCP Runtime configuration paths.
serviceutil
Package serviceutil provides HTTP utilities for MCP services.
Package serviceutil provides HTTP utilities for MCP services.
analytics-api command
ingest command
mcp-gateway command
Package main implements the MCP gateway service.
Package main implements the MCP gateway service.
platform-api command
processor command
runtime-api command
ui command
spiffe-identity
Package spiffe_identity is a Traefik local (Yaegi) middleware that turns a verified client certificate into a trusted identity header for the MCP gateway, and strips configured client-supplied headers before injection.
Package spiffe_identity is a Traefik local (Yaegi) middleware that turns a verified client certificate into a trusted identity header for the MCP gateway, and strips configured client-supplied headers before injection.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL