Create an MCP server
- Open Settings.
- Under Workspace, select MCP Servers.
- Click New MCP Server.
- Enter a name, optional description, and the HTTPS URL exposed by the MCP server.
- Add any authentication headers the server requires.
- Click Test Connection to discover the available tools.
- Optionally choose which discovered tools prompts can use.
- Save the server.

Configure authentication securely
Header values must reference encrypted workspace environment variables. This keeps credentials out of prompt definitions and prevents users from accidentally saving raw tokens in an MCP configuration. Create the required secret under Settings → Environment Variables, then map each header to its environment variable when configuring the MCP server. For example, anAuthorization header can reference an environment variable whose value includes the complete authorization value expected by the server.

Test the connection
Test Connection connects to the server and lists the tools it exposes. Use this before saving to confirm that:- The server URL is reachable.
- Authentication headers are correct.
- Tool names, descriptions, and input schemas are available.
- The server exposes the tools you expect.

Add an MCP server to a prompt
- Open a chat prompt in the Playground.
- Open the Tool & Output Editor.
- Click Add Tool → MCP Server.
- Search for the saved server.
- Select it to add the reference to the prompt.

How saved references work
A prompt stores a lightweight reference to the saved MCP server:MCP server configurations use live, mutable references. This differs from versioned Tool Registry references and prompt versions.
Run with different providers
PromptLayer discovers each MCP capability and translates it into the function-tool format required by the selected provider. When the model calls one of those tools, PromptLayer executes it against the MCP server, sends the result back to the model, and continues the tool-calling loop. This managed path works independently of whether the provider offers its own native MCP tool type.PromptLayer-managed versus provider-native MCP
PromptLayer-managed MCP and provider-native MCP are separate options:
Existing OpenAI-native MCP tools remain available under Built-In Tool. They are not converted into PromptLayer-managed MCP server references.

