Context Mesh sources

Sources are the individual assets you add to Context Mesh before you create an MCP server. They are the APIs and remote MCP servers that agents end up calling. After you add a source, you can combine them into a single Context Mesh MCP server.

Source types

There are two types of sources you can add to Context Mesh:

  • API sources: Import an API from the Catalog, or upload an OpenAPI spec file.
  • MCP server sources: Add the URL of an existing remote MCP server.

You can configure each source with the following fields:

Field

Description

Required

Display name Source name in the UI. Yes
Name Machine name. Must be unique within the org. Auto-populated from the Display name. Yes
Description Auto-populated from the Catalog description or API spec where possible. No
Labels Key-value tags for filtering/searching across . Optional in the UI. The API requires this field, so send {} if you don’t want to add any labels. No
Base URL Overrides the base URL defined in the OpenAPI spec. No
Custom headers Extra HTTP headers injected onto every request that Context Mesh forwards to the source’s backing service, for example to identify the caller. Stored unencrypted, so don’t use them for secrets or sensitive information. No

You can update these fields at any time to change a Context Mesh source’s configuration.

By default, a Context Mesh MCP server inherits everything a source can do. To restrict specific paths, methods, or tools without changing the source, see Blocked capabilities.

Custom headers

When an agent calls a tool through a Context Mesh MCP server, that call turns into a network request: an HTTP call to an API, or a proxied call to a remote MCP server. Custom headers let you add the same HTTP headers to every one of those requests, for example to identify the caller or route the request on the backing service. They work as follows:

  1. You configure the custom headers once on the Context Mesh source.
  2. Context Mesh attaches the custom headers to every request it sends to that source’s backing service. The agent never sees them.

Context Mesh stores custom headers unencrypted. Don’t use them for secrets or sensitive information, such as API keys, bearer tokens, or passwords.

Custom headers on Context Mesh sources have these properties:

  • You set them per source, not per Context Mesh MCP server. If three Context Mesh MCP servers use the same source, all three send the same headers. There’s no Context Mesh MCP server override for this.
  • They’re plain-text key-value pairs. The schema is: headers: { additionalProperties: string }.
  • They work the same way for both source types. API sources and MCP server sources both support them, with the same shape.
  • They’re optional: The MCP server sources require the headers field in API calls, but accept an empty string.

Add a source

Repeat these steps for each source you want an MCP server to expose. You can create a source from an API spec file or from a remote MCP server. To use an API from the Catalog instead, see Import an API from the Catalog.

The Context Mesh API calls sources context-sources, so the endpoints use /v1/context-sources.

The following examples use Kong Air as an example. Replace the fields with your own values.

Upload an API spec

Add a remote MCP server

Import an API from the Catalog

FAQs

No. When you add a source from the Konnect Catalog, Context Mesh creates a forked copy of the item. There is no sync between Context Mesh and the Catalog.

No. You can’t change a source’s type, for example changing an API into an MCP server, and you can’t update the spec or the MCP server endpoint. To update a source, create a new source and delete the outdated one.

No. Context Mesh inherits the tools that an MCP server source already exposes. You can’t define additional tools on the source from Context Mesh, only proxy them.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!