Register a Self-Managed MCP Server
Register your existing MCP server with Redpanda to add authentication and observability without changing your server’s code. This guide covers the self-managed path from Create an MCP Server in depth. Choose this when you already run a server and want Redpanda to proxy it.
After completing this guide, you will be able to:
-
Register a self-managed MCP server in Agentic Data Plane
-
Pick the right transport (SSE vs. Streamable HTTP) and authentication mode
-
Confirm tool discovery completed and the server is reachable through its proxy URL
When to use this
Choose self-managed registration when:
-
The MCP server is already deployed in your environment and you don’t want to migrate it to a managed type.
-
You need custom tool logic that no managed type provides.
-
You want a Redpanda-managed URL for each server, with Inspector, observability, and agent access, without standing up your own gateway.
If you don’t already run a server, use a managed type. See Managed catalog.
Prerequisites
-
An MCP server reachable from the AI Gateway. The AI Gateway doesn’t connect to loopback, cloud metadata, link-local, multicast, IPv6 unique local, or unspecified addresses, or to your environment’s own virtual private cloud (VPC), pod, and service address ranges, except cluster-local services your environment has been enabled to reach.
To reach a server in a VPC you own from a private environment, peer that VPC with the environment. See Peer a VPC with an Environment.
-
The endpoint URL.
http://is allowed except with user-delegated OAuth and service-account OAuth, which requirehttps://. User-delegated OAuth has one exception, for cluster-local servers (see Troubleshooting). -
Knowledge of which transport the server speaks (SSE or Streamable HTTP). If you don’t know, see Transport choice.
-
If the server’s certificate comes from a private certificate authority (CA), or the server signs it itself: the CA certificate, or the server’s own self-signed certificate, in PEM form. See Trusted certificates.
-
If using static-key or service-account OAuth, or a secret header: secrets pre-created in the Redpanda Agentic Data Plane secret store,
UPPER_SNAKE_CASE. -
If using user-delegated OAuth with automatic setup: nothing, when the server accepts a client metadata document or supports dynamic client registration. If it supports neither, register an OAuth app with the upstream vendor and have its client ID ready, plus a client-secret reference in the secret store for a confidential app.
-
If attaching an OAuth provider your organization already manages instead: the provider registered first. See User-delegated OAuth.
Create the server
-
Open MCP servers in the sidebar and click Add MCP server.
-
In the marketplace picker, click Remote (Proxied).
-
In the Identity section, replace the suggested
Nameand optionally add aDescription. The constraints are the same as in Create an MCP Server. -
In the Connection section, enter Server URL and pick Transport. If the server’s certificate doesn’t chain to a public CA, add the CA certificate, or the server’s own certificate, to Trusted certificates. See Trusted certificates.
-
Optionally, add the headers the server expects on every request in Headers. See Custom headers.
-
Configure authentication (see Authentication).
-
Click Create server.
Transport choice
Two transports are available:
-
Streamable HTTP: The current MCP transport, recommended for new servers.
-
SSE: Server-sent events. The older MCP transport, still widely deployed.
Pick whichever your server actually speaks. To probe a server quickly:
# SSE handshake: expect a stream of `event:` lines on success.
curl -N -H "Accept: text/event-stream" https://your-server.example.com/mcp/sse
# Streamable HTTP: expect a JSON-RPC response (JSON or an SSE stream) on success.
curl -X POST -H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"1.0"}}}' \
https://your-server.example.com/mcp
Trusted certificates
The AI Gateway verifies your server’s TLS certificate against the public CAs in its own trust store. A certificate that comes from a private CA, or that the server signs itself, chains to none of them. Every call to the server then fails until you tell the gateway to trust that certificate.
The optional Trusted certificates field appears on both the create and the edit form, with the server URL and the transport. It takes PEM CERTIFICATE blocks. List the CA certificate that signs your server’s certificate, or the server’s own self-signed certificate.
Select Upload file to choose a .pem, .crt, or .cer file or drag one in, or select Paste to paste the blocks in. A loaded file replaces whatever the field holds, and the form reports how many certificates it read. Agentic Data Plane refuses a file that holds no PEM certificate. On a server that already has certificates, those certificates stay until you choose a file.
The gateway trusts these certificates on top of its own trust store, and only for this server. No other MCP server, LLM provider, or OAuth provider trusts them. They cover the calls the gateway proxies to the server and its tool discovery. With service-account OAuth, they also cover the token request to the server’s token URL.
Agentic Data Plane refuses to save text that holds anything other than PEM CERTIFICATE blocks. It also refuses a certificate that has already expired. It rejects text that contains a private key, because it stores and returns this field as plain text.
When the gateway can’t verify the certificate, the server’s Overview tab and the Inspector tools list report the certificate error that tool discovery returned. A tool call an agent makes through the server’s proxy URL fails with a more general message that the gateway couldn’t reach the server.
After a stored certificate expires, the gateway no longer verifies a chain that needs it, and calls to the server fail. You can still edit, disable, and re-enable the server, because Agentic Data Plane checks the field only when you change it. If the list holds another certificate that the server’s chain can use, calls keep working.
Authentication
The authentication modes from Create an MCP Server all apply. Several patterns are particularly common for self-managed servers:
| Pattern | Use when |
|---|---|
Static key with a custom header |
First-party servers that authenticate with a non- |
Service-account OAuth |
The upstream system supports OAuth client credentials and you want one shared identity for all callers. The server URL must use |
Token passthrough |
The upstream server already validates every token it receives, and you trust it with your callers' tokens. Redpanda forwards the caller’s |
For user-delegated OAuth, the URL must be https://, unless it addresses a server inside your own cluster and cluster-local addressing has been enabled for your environment. Redpanda can set up OAuth automatically for the server, or you can attach an OAuth provider you already registered. See User-delegated OAuth.
If the server sits behind Google Identity-Aware Proxy or a Cloud Run service that requires authentication, AI Gateway can send a Google ID token in addition to the server’s own authentication. See Connect to an MCP Server Behind Google Identity-Aware Proxy.
Token passthrough
With token passthrough, the AI Gateway first authenticates the caller with its own credential. It then copies the Authorization header from the caller’s request onto the request it sends to your server, unchanged. If the caller sends no Authorization header, the gateway sends no Authorization header either. The exception is a gateway token sent in X-Redpanda-Cloud-Token.
Which token your server receives depends on how the caller authenticates to the AI Gateway:
-
API key: The gateway removes the key before it forwards the request. The caller sends the key in
X-Redpanda-Api-Keyand a token for your server inAuthorization. See Authenticate with an API key. -
Gateway token in
Authorization: Your server receives that gateway token, a credential that also works against Agentic Data Plane. -
Gateway token in
X-Redpanda-Cloud-Token: If the caller sends noAuthorizationheader, your server receives that gateway token as a bearer token inAuthorization. If the caller also sends a token for your server inAuthorization, your server receives that token, and the gateway token stays with the gateway.
|
Token passthrough departs from the MCP specification. To your agents, the AI Gateway is the MCP server, and the specification says that "the MCP server MUST NOT pass through the token it received from the MCP client." Redpanda keeps this mode as a deliberate exception for servers that already validate their own tokens. The specification’s security best practices list these risks:
See the MCP specification for the requirement. |
Token passthrough is a reasonable choice when your server checks that every token it receives was issued for it, and you trust it with your callers' tokens. Otherwise, use one of the other modes:
-
Use user-delegated OAuth when each caller needs their own identity at your server. Redpanda obtains a token issued for your server and stores it per user. See User-delegated OAuth.
-
Use service-account OAuth or a static key when one shared identity for all callers is enough.
A server that uses token passthrough can’t be a member of a Code MCP server. See Code Mode.
Custom headers
Some servers expect headers that no authentication mode sets. A server might take its API key in a header of its own, together with a profile header. Use Headers to send them on every request, so the server connects directly without a wrapper in front of it. For example, send the key from a secret in X-API-Key and a plain X-MCP-Profile value beside it.
Click Add header, enter the header’s Name, and select a Value type:
-
Plain value: The gateway sends the value as you enter it. Agentic Data Plane stores and shows it as plain text, so use a secret for credentials.
-
Secret: The value comes from a secret in the secret store. Optionally, set a
Prefix, such asToken, to send before the secret, separated by a space. If the secret already starts with the prefix, the gateway doesn’t add it again. LeavePrefixempty to send the secret alone.
A server takes up to 16 headers. The gateway sends them in addition to the server’s authentication, and a caller can’t override them.
Agentic Data Plane refuses to save a header name that appears twice, or that the server’s authentication already sets. It also refuses headers that the gateway or the MCP protocol sets, such as Content-Type, Accept, Origin, and any Mcp- or Sec- header. On a server behind Google Identity-Aware Proxy, it also refuses the headers that carry the Google ID token.
The gateway reads a secret header’s value on every request, so a changed secret applies from the next call. If the secret is missing, the gateway sends the request without that header. Your server then answers as it would for a missing credential, often with a 401. Tool discovery reports an error that names the header and the secret.
When the gateway follows a redirect to another origin, it first drops the headers it set, including the authentication header.
Tool discovery
After create, Redpanda runs a live tools/list against the server and shows the result on the detail page’s Overview tab. The Inspector tab (see Test a server’s tools) exercises individual tools.
If the tools list is empty or stale, open the Inspector tab, click Session details, and then click Refresh to re-run discovery against the server.
Connection errors and retry
| Error | What it means |
|---|---|
|
The user-delegated authentication path has no stored connection for the calling user. The failed tool result carries the authorization URL so the user can complete the consent flow, then call the tool again. See User-delegated OAuth. |
|
The user’s stored token has expired and refresh failed. Have the user reconnect. |
Plain connection error / 502 / 504 |
Redpanda couldn’t reach your server. The Overview tab and the Inspector tools list show the upstream error. |
|
Your server answered a request with a redirect, often to the same address with or without a trailing slash. The gateway doesn’t follow a redirect of a POST request, which carries each MCP message, and it doesn’t pass the redirect on to the caller. Register the exact URL your server serves, including any trailing slash. Agentic Data Plane sends requests to that URL as written. |
Troubleshooting
| Symptom | What to check |
|---|---|
"Transport mismatch" or empty stream |
Your server speaks the other transport. Re-probe with curl per Transport choice and update the |
TLS errors when registering an |
Confirm the server’s certificate chains to a public CA. If it chains to a private CA, or the server signs it itself, add the CA certificate, or the server’s own certificate, to Trusted certificates. See Trusted certificates. |
|
Authentication is misconfigured. For static-key or service-account OAuth, verify the secret content and the |
Tool schema parse errors |
The server returned a |
The URL is refused for targeting a cluster-local host |
A URL whose host ends in |