Skip to main content

MCP servers guide

How to register upstream MCP servers and discover their tools.

Overview

MCP Servers are upstream Model Context Protocol servers that Cortega exposes through the gateway. Registering a server tells Cortega where the server is, how to authenticate to it, and whether it should be rendered into gateway config.

MCP Servers do not assign caller teams. Teams come from Identities and MCP Authorization.

Add an MCP server

Navigate to AI Border Gateway → MCP.

  1. Click Add Server.
  2. Enter a server name.
  3. Select the transport.
  4. Enter the endpoint or command details.
  5. Select upstream auth, if the upstream server requires it.
  6. Save.

Transport choices

TransportUse when
Streamable HTTPThe MCP server exposes the streamable HTTP transport
HTTP SSEThe MCP server uses Server-Sent Events
StdioYou want to store a local command-based MCP server definition

Enabled HTTP servers are rendered into gateway config. Stdio server records are stored, but the current gateway target render path only includes HTTP transports.

Enable or disable a server

Use the Enabled toggle on the MCP Servers table.

StateResult
EnabledRendered into gateway config if it uses an HTTP transport
DisabledRemoved from gateway config

The legacy approval field is informational. Rendering is controlled by Enabled.

Upstream auth

Choose upstream auth based on how Cortega should authenticate when it forwards calls to the server.

Common options:

Auth typeUse when
NoneThe upstream server needs no auth
API keyCortega should attach a stored key to upstream calls
Client-supplied upstream credentialThe client sends its own credential for this server in a request header; Cortega never stores it
CopilotThe upstream is GitHub Copilot MCP
GCP / AWS / Azure implicitThe gateway environment supplies cloud identity

API keys are encrypted at rest and rendered as secret references.

Choose Client-supplied upstream credential when the client brings its own credential for the upstream server. The client still authenticates to Cortega with an MCP identity; it sends the server credential in the upstream-credential header, and Cortega forwards that value as the upstream Authorization and strips the header before the call. See Pass-through routing for the safety rules and the stored-credential override.

Discover tools

Tool discovery reads the upstream server's current tool list and stores it in Cortega.

Use discovery when:

  • you first register a server
  • an upstream server adds or removes tools
  • MCP Authorization needs current tool checkboxes

You can discover tools for one server, or use Get All Tools where available.

Discovery updates existing tools and removes tools that no longer exist on that server. Existing MCP Authorization selections are preserved when the same tool remains present.

SSE servers

For HTTP SSE servers, Cortega initializes the SSE connection first and posts JSON-RPC messages to the server-provided message endpoint. Directly posting initialize to an SSE URL can return 404.

Troubleshooting

SymptomLikely causeWhat to check
Server does not appear in gateway configDisabled, non-HTTP transport, or global MCP toggle offCheck server Enabled state and transport
Tool discovery returns 404SSE endpoint was treated as direct POST endpointConfirm server transport is HTTP SSE
No tools appear under MCP AuthorizationTools have not been discovered yetRun discovery for the server
Upstream call fails authWrong upstream auth type or missing credentialEdit server upstream auth settings