Skip to main content

Connect an MCP server to an agent

Model Context Protocol (MCP) is an open standard that provides a protocol for LLM applications (clients) to call tools from a remote system (server).

To pull pre-built third-party integrations into your agent as tools from external data sources (such as GitHub, Slack, Cloudflare, Stripe, Docker, etc.), select Connect to MCP Server. You can select Add new resource from the Select MCP Server dropdown if you have not already created an MCP resource. You can configure the Tool Timeout for up to 2 minutes maximum.

note

Retool currently only supports remote-hosted MCPs.

An MCP server dynamically provides a list of tools. It is not a one-time static import from the server into Retool. The tool list is fetched whenever Retool connects to the MCP server.

MCP Server is a resource type configured with a URL, but you cannot write queries directly to these resources.

Key features:

  • Add an MCP server to an agent.
  • An agent can retrieve and select tools.
  • Agents can invoke one or more of those tools.
Create the MCP resource first

Connecting an MCP server to an agent uses the same MCP resource as the rest of Retool. For full configuration details, including supported authentication methods, protocol versions, and how to connect a local stdio server through an HTTP gateway, refer to Connect to an external MCP server.

Limitations​

Retool's MCP implementation has the following limitations:

Transport protocols​

  • Retool only supports remote-hosted MCP servers accessible via HTTP/HTTPS.
  • Retool supports the following transport types: Streamable HTTP and Server-Sent Events (SSE).
  • Local stdio-based MCP servers are not directly supported and must be exposed via an HTTP gateway. Refer to Connect to a local MCP server.

Timeouts​

  • The tool execution timeout is up to 2 minutes maximum.
  • The tool listing timeout is 5 seconds.

Connect an MCP server to an agent​

To connect an MCP server to an agent:

  1. Open an existing agent or create a new one.
  2. On the Configuration tab, click Add new tool.
  3. Click Connect to MCP Server.
  4. Select a previously created resource from the Select MCP Server dropdown, or choose Add new resource.
  5. Give the new resource a Name.
  6. Paste in the URL of your MCP server in the Server URL field, and optionally add your authentication credentials.
  7. Click Create resource.

If your MCP server requires authentication, click Authenticate MCP Server from the Connect to MCP server page, the Configuration tab, or click Authenticate in the Chats tab. Follow the prompts to Authenticate and Approve the tool.

Tool authentication required.

The tools exposed by the MCP server will be available as tools on your Retool Agent.