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

# MCP (Model Context Protocol)

> Discover how to integrate and use Model Context Protocol (MCP) servers in Maxim to test prompts with tool-assisted workflows. This page walks you through connecting MCP clients, adding tools, and leveraging agentic or non-agentic modes for prompt evaluation.

export const MaximPlayer = ({url}) => {
  return <iframe className="border-background-highlight-secondary h-full w-full rounded-md border-2 aspect-video" src={url} allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>;
};

<MaximPlayer url="https://www.youtube.com/embed/qsCmvUhAjLI?si=NC8y_0vgKh18RPFB" />

You can use various tools like Composio, Gumloop, etc to set up your MCP server. Please refer to the documentation of the tool you are using for more details.
For the purposes of this example, we will use an MCP server set up on Composio, and hence use the <code>Composio</code> client.

<Steps>
  <Step title="Add a MCP server on Maxim">
    Once you have set up an MCP server, to add it to Maxim, you can go to <code>Settings</code> → <code>MCP Clients</code> and click <code>Add new client</code>.

    <img src="https://mintcdn.com/maximai/VMis-Atkh0jYT8YE/images/docs/offline-evals/via-ui/prompts/mcp/add_mcp_server.png?fit=max&auto=format&n=VMis-Atkh0jYT8YE&q=85&s=d4efe0c58e7ac7d9fbaa886846ae6f9f" alt="Add MCP client" width="2996" height="1718" data-path="images/docs/offline-evals/via-ui/prompts/mcp/add_mcp_server.png" />
  </Step>

  <Step title="Use MCP to test your prompts">
    Once you have added the MCP client, head over to <code>Prompts</code>. You will find all the tools you have set up under <code>Prompt Tools</code>.

    <img src="https://mintcdn.com/maximai/VMis-Atkh0jYT8YE/images/docs/offline-evals/via-ui/prompts/mcp/list_mcp_tools.png?fit=max&auto=format&n=VMis-Atkh0jYT8YE&q=85&s=6ee339ab18a02f652eac35f6f234a7c6" alt="Prompt Tools" width="2990" height="1708" data-path="images/docs/offline-evals/via-ui/prompts/mcp/list_mcp_tools.png" />
  </Step>

  <Step title="Add a new MCP">
    Once you have added the tools, you will see an Agentic Mode switch. On enabling this, the model will keep executing until it generates a text response, automatically handling tool calls in between. This is optional, and you can choose to use the tool in non-agentic mode as well.

    <img src="https://mintcdn.com/maximai/VMis-Atkh0jYT8YE/images/docs/offline-evals/via-ui/prompts/mcp/execute_mcp_tools.png?fit=max&auto=format&n=VMis-Atkh0jYT8YE&q=85&s=1e9004957ff48cf90b7df516cc624234" alt="Execute MCP tools" width="2985" height="1776" data-path="images/docs/offline-evals/via-ui/prompts/mcp/execute_mcp_tools.png" />

    <img src="https://mintcdn.com/maximai/VMis-Atkh0jYT8YE/images/docs/offline-evals/via-ui/prompts/mcp/execute_mcp_tools_response.png?fit=max&auto=format&n=VMis-Atkh0jYT8YE&q=85&s=127bbafa439d9b00d28862fc27ec051b" alt="Execute MCP tools Response" width="2984" height="1782" data-path="images/docs/offline-evals/via-ui/prompts/mcp/execute_mcp_tools_response.png" />
  </Step>
</Steps>
