Documentation Index
Fetch the complete documentation index at: https://tyk.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
From Tyk Operator v1.4.0, you can manage Model Context Protocol (MCP) servers declaratively using theTykMcpProxyDefinition custom resource. The Operator reconciles the resource into a Tyk-managed MCP proxy, so the same GitOps workflow you use for ApiDefinition and TykOasApiDefinition resources also applies to MCP servers.
A TykMcpProxyDefinition points at a ConfigMap that holds the MCP OAS document. The Operator reads the document from the ConfigMap and synchronizes it to Tyk. Access to tools, resources, prompts, and the underlying JSON-RPC methods is controlled through the existing SecurityPolicy resource, extended with MCP-specific fields.
Prerequisites
- Tyk Operator v1.4.0 or later installed in the cluster.
- A Tyk Gateway / Dashboard with MCP proxy support enabled.
- A
ConfigMapcontaining the MCP OAS document under a known key (for examplemcp.json).
Custom Resource Reference
Kind:TykMcpProxyDefinition
Group / Version: tyk.tyk.io/v1alpha1
Scope: Namespaced
Short name: tykmcp (usable as kubectl get tykmcp)
Spec
| Field | Type | Description |
|---|---|---|
contextRef | object (optional) | Reference (name, namespace) to an OperatorContext used when reconciling this resource. Use this for multi-tenant setups. |
tykMCP.configmapRef.name | string | Name of the ConfigMap that holds the MCP OAS document. |
tykMCP.configmapRef.namespace | string (optional) | Namespace of the ConfigMap. Defaults to the resource’s namespace. |
tykMCP.configmapRef.keyName | string | Key inside the ConfigMap’s data map that contains the OAS document. |
Status
| Field | Description |
|---|---|
id | Tyk-side API identifier. |
name | API name as registered in Tyk. |
listenPath | Base path on Tyk where the MCP proxy is served. |
domain | Custom domain, if configured in the OAS document. |
enabled | Whether the API is active. |
latestTransaction.status | Result of the last reconciliation. |
linkedByPolicies | Security policies that reference this MCP proxy. |
kubectl get tykmcp -o wide surfaces Domain, ListenPath, Enabled, and SyncStatus as printed columns.
Quick Start
The example below proxies a mock MCP server reachable athttp://mock-mcp-server.default.svc.cluster.local:7878.
1. Store the MCP OAS document in a ConfigMap
2. Create the TykMcpProxyDefinition
ConfigMap, the Operator detects the change (via latestConfigMapHash) and pushes the new OAS document to Tyk on the next reconciliation.
Securing an MCP Proxy with a SecurityPolicy
The SecurityPolicy resource is extended with two MCP-aware blocks inside each entry of access_rights_array:
mcp_access_rights— allow/block lists for MCP tools, resources, and prompts.json_rpc_methods_access_rights— allow/deny lists keyed by JSON-RPC method.mcp_primitives— per-primitive rate limits.json_rpc_methods— rate limits keyed by JSON-RPC method (tools/call,tools/list,resources/read,prompts/get, …).
kind: TykMcpProxyDefinition on the access entry.
Allow / block lists
Per-primitive and JSON-RPC rate limits
rate and per are declared as Float64 strings in the CRD schema — quote the values in YAML or kubectl apply will reject the manifest.type in mcp_primitives accepts tool, resource, or prompt.
Verifying
Status block reports the reconciled listenPath, domain, enabled flag, and latestTransaction.status. Failed reconciliations also surface as Kubernetes events on the resource.