Skip to main content

Use MCP to build apps

You can connect to Retool's MCP server directly from your coding environment. Retool's MCP enables you to build apps from your chosen development environment, import React apps into Retool, and manage your organization's settings and users.

note

The MCP server provides access to Retool functionality in an external environment. This functionality is distinct from the MCP resource, which lets you connect third-party tools and services as a native integration in classic apps, workflows, and agents.

Refer to the MCP tool reference for the full list of tools.

Use cases​

The following use cases are examples of what can be accomplished using the MCP server:

Use the MCP server to build apps from your chosen development environment:

For a full list of available tools, refer to the MCP tools reference, or install the MCP server and run tools/list.

Connect MCP server​

You can connect Retool's MCP server to an MCP-compatible client using the following details:

  • URL: https://<your-retool-instance>/mcp (e.g. https://example.retool.com/mcp)
  • Transport: HTTP
  • Authentication: OAuth 2.0

Once you authenticate your MCP server with OAuth 2.0, you may have to restart your coding agent.

Common coding agents​

The following examples show how to connect to the MCP server with common coding agents.

To configure the MCP server as a tool for use in Retool Agents, complete the following steps:

  1. Navigate to the Resources tab in Retool. Click Create new > Resource, and select MCP Server.
  2. Configure the resource:
    1. Title: Retool MCP
    2. Description: An MCP server for interacting with Retool.
    3. Server URL: https://example.retool.com/mcp
    4. Click Auto-configure authentication.
    5. Scroll down and click Connect with OAuth.
  3. Navigate to a new or existing agent and add a new tool.
    1. Click Add new tool.
    2. Select Connect to MCP server.
    3. From the dropdown, select the MCP server you created in the previous step.
    4. Click Save.
  4. Test out your agent from the Chat tab.
VS Code

To configure the MCP server in VS Code, complete the following steps:

note

MCP support requires VS Code 1.102 or later with GitHub Copilot Chat. If MCP servers do not start, make sure the chat.mcp.access setting is not set to none. Your organization can turn this setting off for managed installs.

  1. Create a .vscode/mcp.json file in your project root if one does not already exist.
  2. Click Add Server....
  3. Select HTTP.
  4. Enter your MCP server URL, https://example.retool.com/mcp.
  5. Name your MCP server.
  6. A browser window opens and asks you to select the desired scopes.
  7. Authenticate, and return to VS Code. The MCP server is ready to use.

MCP server for self-hosted instances​

Retool's MCP server is available for self-hosted instances that use version 4.0.0 and later. The MCP server has the same requirements as the new app building experience.

Refer to the tutorials in order to set up self-hosted infrastructure for the first time, or the upgrade guides in order to configure your instance for the latest version.

Credit usage​

For app-building tasks, the MCP server engages two agentic services:

  • Your local development agent decides what to build, and passes your prompt to Retool.
  • Retool's app building agent works to create or update your app.

Each of these services charges separately for their portion of the work. In Retool, if you utilize Retool-managed keys, any app building consumes AI credits. If your organization is on the Enterprise plan and you bring your own key, app building does not consume AI credits. Refer to the AI credits billing and usage page for more information.

No Retool credits are consumed for admin or resource exploration tasks.