An OpenAPI backend provides tools only, not prompts or resources. Other MCP servers on
the same consumer still contribute theirs.
Before you start
You need two things:
TrustGate has to be able to reach both the document and the API itself. If they live on a
private network, use Hybrid so the data plane runs where
they are reachable.
Add your API
1
Start a custom server
Go to TrustGate → Registry → MCP → Add custom, and set Source to
OpenAPI document.
2
Paste the document URL
Put the link to your OpenAPI file in OpenAPI spec URL.Leave API base URL empty. TrustGate reads the address of your API from the
document. Fill it in only when the document omits the API address or when you
need to override it, for example to replace a public URL with an internal one.
3
Choose how TrustGate signs in to your API
See Connecting to your API below.
4
Validate
Select Validate OpenAPI. TrustGate downloads the document and previews the
tools it would create. The registry cannot be connected until validation succeeds.
5
Connect
Save, then bind the server to an MCP consumer like any
other. Use a toolkit to choose which operations that consumer may actually use.
Reading the validation result
A successful validation shows the number of tools, your API’s title, the address requests will go to, and one line per tool: the method, the path, and the name your agents will see. It may also show a warning count you can expand. Warnings do not prevent validation. They identify incomplete or potentially unwieldy definitions:Connecting to your API
This is how TrustGate signs in to your REST API. It is separate from how your agents sign in to TrustGate, which is set on the consumer.
TrustGate uses one service credential for every call, so your API sees the gateway, not
the individual end user. Per-user sign-in to your API is not part of this integration; see
What it does not do.
What it does not do
OpenAPI conversion has the following limitations. Only OpenAPI 3. Swagger 2.0 documents are rejected: convert one first (with a tool such asswagger2openapi) and publish the result. If your API serves Swagger UI at /docs,
that page is not the document. Use the raw file behind it.
No per-user login to your API. TrustGate authenticates with one service credential, so
your API cannot tell which person is behind a call. When you need each user to authorize
individually, use a real MCP server with forwarded OAuth instead of an OpenAPI backend.
Lists come back one page at a time. If an operation takes page, cursor, or limit,
those become tool arguments and the agent asks for the next page itself. TrustGate never
walks a whole collection on its own. One tool call is one HTTP request. If an agent
needs the complete collection in one call, add an endpoint that returns it.
JSON only. Operations that send file uploads, form posts, or XML are skipped with a
warning; the rest of the document still compiles. The same applies to a document that
splits itself across several files: TrustGate does not follow references to other URLs, so
publish it as a single file.
Size limits. The document may be up to 5 MB and 500 operations, and a single
tool response up to 10 MB. Above 80 tools you get a warning, because long tool lists crowd
out the model’s context.
Troubleshooting
Validation identifies which phase failed: fetching the document, reading it, or building the tools.
If validation succeeds but later tool calls fail, check the API credential. The
tool result includes the upstream status and response body.
Example: the TrustGate Admin API
The TrustGate Admin API can be used as a test target because it publishes an OpenAPI 3 document.- Use your Admin address plus
/docs/openapi.jsonas the document URL, for examplehttps://admin.example/docs/openapi.json. - Leave API base URL empty.
- Choose Static header with
AuthorizationandBearer <your admin token>. - Validate. The preview lists health checks, gateway operations, and registry operations. It also warns if the document does not name its operations.
Related
- MCP Gateway: consumers, toolkits, and upstream authentication
- Registries: connect MCP and LLM backends
- Connect from Cursor