Skip to main content
Every deployed application answers the Model Context Protocol (MCP). Each callable blueprint is one tool. Use this when an AI agent or an MCP client, such as Claude Code, Claude Desktop or Cursor, should run your blueprints. The steps check the connection with the MCP Inspector first; the sections after them add the server to a client.

Before you start

  • The application is deployed and has an evaluation key (Deploy a release and call it, Create and revoke an evaluation key).
  • You can sign in to the Admin UI of the runtime cluster. Its address is the cluster address followed by /runtime-management/ui/, for example https://cluster.example.com/runtime-management/ui/.
  • Node.js with npx, to check the connection with the MCP Inspector. The steps were run with MCP Inspector 2.12.0 and Claude Code 2.1.306.

Check the connection

1

Copy the MCP address

Open the Admin UI, click Sign in with Leapter and sign in with the account you use for the Lab. The Admin UI may open on another environment: click the environment’s name at the bottom of the sidebar and choose yours in the list that opens. Then click the application’s name on the Status page. In the card Connect to with the application’s name, click Copy next to Standard endpoint.
The card Connect to pizza-pricing-calculator-180269. Under MCP, Standard endpoint is https://cluster.example.com/runtime/api/v1/playground/pizza-pricing-calculator-180269/mcp and its Copy button has a green ring. Below it is the Server-sent events endpoint ending in /mcp/sse.

The MCP addresses of the application.

2

Store the address and the key

Replace <mcp-address> with the address you copied, and <your-evaluation-key> with your key. Run the next steps in the same terminal, so that both variables are set:
3

List the tools

Check the connection with the MCP Inspector, a command-line client for MCP servers. The key goes in the X-API-Key header. On the first run in a terminal, npx asks before it installs the Inspector: it prints Need to install the following packages:, the package name and Ok to proceed? (y). Type y and press Enter.
You should see one tool per callable blueprint, with the blueprint’s description and the schema of its inputs:
4

Call a tool

The tool answers with the blueprint’s outputs as text:
Every MCP client needs the same two things as the MCP Inspector: the address, and the header X-API-Key with the key. The sections below show where they go in Claude Code, Claude Desktop, Cursor and other clients. When a client does not connect, run the step List the tools again with the address and the key from the client’s settings: if the MCP Inspector lists the tools, the address and the key are right.

Connect Claude Code

The commands use the two variables from the step Store the address and the key, so run them in the same terminal. Run them in the folder of the project that should use the server, here ~/pizza-shop. Claude Code adds the server for this folder only (Local config):
Check that Claude Code reaches the server:
Claude Code prints the whole key here; it is shortened on this page. Do not share this output. To remove the server from Claude Code again:

Connect Claude Desktop

Claude Desktop adds a server with an address as a custom connector. Its configuration file, claude_desktop_config.json, is for MCP servers that run on your own computer, so the runtime cluster does not go there. Claude’s article Get started with custom connectors using remote MCP describes custom connectors: they are available on the Free plan (one connector), Pro, Max, Team and Enterprise. The steps follow that article:
  1. Go to Customize > Connectors, click + Add, then Add custom connector. On a Team or Enterprise plan, an owner adds the connector in Organization settings > Connectors instead, and members then click Connect on it.
  2. Enter a name, for example pizza-pricing, and the address of the Standard endpoint as the remote MCP server URL. Click Continue.
  3. Claude shows the authentication settings it detected. Under Authentication, choose No sign in: calls to the runtime cluster need the key, not a sign-in.
  4. Under Request headers, add the header X-API-Key with your evaluation key as its value. Click Add.
  5. In a chat, click +, choose Connectors and switch the connector on. Claude can then use the tool pizza_pricing in that chat.
Claude connects to custom connectors from Anthropic’s cloud, not from your computer. The runtime cluster’s address must therefore be reachable from the internet. For a cluster in a private network, Claude’s article says to allow Anthropic’s IP addresses in your firewall. If you cannot do that, use Claude Code: it connects from your computer.
On a Team or Enterprise plan, everyone who uses the connector sends the same key. Give the connector its own key, so that you can revoke it without stopping other callers.

Connect Cursor

Cursor reads MCP servers from a file called mcp.json: ~/.cursor/mcp.json in your home folder for all your projects, or .cursor/mcp.json in one project’s folder (Cursor documentation: Model Context Protocol). Add the server with the MCP address as url and the key in headers. If the file already lists servers, add the entry pizza-pricing next to them inside mcpServers:
The file then contains the key, so keep it out of Git. Cursor can also read the key from an environment variable: write ${env:LEAPTER_EVALUATION_KEY} as the value, and set the variable in your shell profile or your system’s environment, as Cursor’s documentation says. To switch the server on or off, open Customize in Cursor’s sidebar. When Cursor does not show the tools, open the Output panel (Cmd+Shift+U on macOS) and choose MCP Logs in its list: it shows connection and authentication errors.

Connect other MCP clients

Any MCP client that can send a header with its requests can connect. Give it:
  • The Standard endpoint as the address. For a client that connects with server-sent events, use the Server-sent events endpoint from the same card instead. It ends in /mcp/sse.
  • The header X-API-Key with your evaluation key.
To check the server-sent events endpoint with the MCP Inspector, run the command from the step List the tools with that address and --transport sse:
It prints the same list of tools as the step List the tools. Look up where your client takes the address and the headers in its own documentation. A client that cannot send the header cannot connect: the cluster refuses its requests, and it tries to sign in with OAuth instead (see Troubleshooting).

Result

Your MCP client lists the blueprint pizza_pricing as a tool and can run it. Each tool call is a run of the release, recorded like any other call (Find a run and read usage).

Troubleshooting

After Sign in with Leapter, you are in the Lab and not in the Admin UI, or the Lab says “This sign-in cannot go on.” and “authorization not found”. Open the Admin UI’s address again and click Sign in with Leapter once more. The Status page opens. The MCP Inspector answers with an error about client registration or OAuth. The X-API-Key header is missing, so the cluster refused the request, and the Inspector tried to sign in with OAuth instead. In a terminal, it prints:
In a script without a terminal, for example in CI, it prints:
Add --header "X-API-Key: $LEAPTER_EVALUATION_KEY" and run the command again.

What to do next