> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptjuggler.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Tool

> Connect to Model Context Protocol servers.

Connects a prompt to a [Model Context Protocol](https://modelcontextprotocol.io/) server, giving the model access to whatever tools that server exposes. MCP is an open standard for extending LLM capabilities through external services – think of it as a universal plug for AI tools.

## Configuration

* **Name** – identifies this MCP connection
* **URL** – the MCP server endpoint. Supports [environment variable](/guides/integration#environment-variables) substitution with `${VAR_NAME}` syntax
* **Auth token** – authentication for the server, also supporting `${VAR_NAME}` substitution
* **Allowed tools** – optionally restrict the model to specific tools from the server by listing their names. Leave empty to allow every tool the server exposes

The MCP connection is passed through to the LLM provider. MCP is available on OpenAI and Anthropic models; Gemini models don't currently support it.

## Correlation

Like the [HTTP Call tool](/tools/http-call#correlation-headers), MCP requests carry the run and thread IDs so your server can correlate them back to a PromptJuggler run:

* **Run ID** – the root run ID, shared across every prompt and workflow in the same run tree, so nested calls all report the same value.
* **Thread ID** – the conversation thread ID.

How they reach your server depends on the provider:

* **OpenAI** sends them as the `PromptJuggler-RunId` and `PromptJuggler-Thread` request headers.
* **Anthropic**'s MCP connector doesn't support custom headers, so they're appended to your server URL as the `promptJugglerRunId` and `promptJugglerThread` query parameters instead.
