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

# Use MCP Tools

Connect external tools from [MCP servers](https://modelcontextprotocol.io/docs/getting-started/intro) to your Dify apps. Instead of just built-in tools, you can use tools from the growing [MCP ecosystem](https://mcpservers.org/).

<Note>
  This covers using MCP tools in Dify. To publish Dify apps as MCP servers, see [here](/en/use-dify/publish/publish-mcp).
</Note>

<Info>
  Only supports MCP servers with [HTTP transport](https://modelcontextprotocol.io/docs/learn/architecture#transport-layer) right now.
</Info>

## Add MCP servers

Go to **Tools** → **MCP** in your workspace.

<Frame>
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/mcp-server-list.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=80feb5d51410c6cf84a30391313eff73" alt="MCP Server List" width="3048" height="1988" data-path="images/use-dify/workspace/mcp-server-list.png" />
</Frame>

Click **Add MCP Server (HTTP)**:

<Frame>
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/mcp-add-server-dialog.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=5117cacc5a8e819e25d9d6d46403ada2" alt="MCP Add Server Dialog" width="1120" height="912" data-path="images/use-dify/workspace/mcp-add-server-dialog.png" />
</Frame>

**Server URL**: Where the MCP server lives (like `https://api.notion.com/mcp`)

**Name & Icon**: Call it something useful. Dify tries to grab icons automatically.

**Server ID**: Unique identifier (lowercase, numbers, underscores, hyphens, max 24 chars)

<Warning>
  Never change the server ID once you start using it. This will break any apps that use tools from this server.
</Warning>

## What happens next

Dify automatically:

1. Connects to the server
2. Handles any OAuth stuff
3. Gets the list of available tools
4. Makes them available in your app builder

You'll see a server card once it finds tools:

<Frame>
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/mcp-server-card.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=337f8c7c9cfb21024d67ee7ffc15bf0a" alt="MCP Server Card" width="1564" height="550" data-path="images/use-dify/workspace/mcp-server-card.png" />
</Frame>

## Manage servers

Click any server card to:

**Update Tools**: Refresh when the external service adds new tools

<Frame>
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/mcp-server-tools-list.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=2cddd404978e67359bd23b63e193ce10" alt="MCP Server Tools List" width="916" height="942" data-path="images/use-dify/workspace/mcp-server-tools-list.png" />
</Frame>

**Re-authorize**: Fix auth when tokens expire

**Edit Settings**: Change server details (but not the ID!)

**Remove**: Disconnect the server (this breaks apps using its tools)

## Use MCP tools

Once connected, MCP tools show up everywhere you'd expect:

**In agents**: Tools appear grouped by server ("Notion MCP » Create Page")

**In workflows**: MCP tools become available as nodes

**In agent nodes**: Same as regular agents

## Customize tools

When you add an MCP tool, you can customize it:

<Frame>
  <img src="https://mintcdn.com/dify-6c0370d8/gyesM3ime6gTaYSO/images/use-dify/workspace/mcp-tool-settings.png?fit=max&auto=format&n=gyesM3ime6gTaYSO&q=85&s=c4e998fe145225fd14ec2a483c6a1c95" alt="MCP Tool Settings" width="798" height="1020" data-path="images/use-dify/workspace/mcp-tool-settings.png" />
</Frame>

**Description**: Override the default description to be more specific

**Parameters**: For each tool parameter, choose:

* **Auto**: Let the AI decide the value
* **Fixed**: Set a specific value that never changes

**Example**: For a search tool, set `numResults` to 5 (fixed) but keep `query` on auto.

## Share apps

When you export apps that use MCP tools:

* The export includes server IDs
* To use the app elsewhere, add the same servers with identical IDs
* Document which MCP servers your app needs

## Troubleshooting

**"Unconfigured Server"**: Check the URL and re-authorize

**Missing tools**: Hit "Update Tools"

**Broken apps**: You probably changed a server ID. Add it back with the original ID.

## Tips

* Use permanent, descriptive server IDs like `github-prod` or `crm-system`
* Keep the same MCP setup across dev/staging/production
* Set fixed values for config stuff, auto for dynamic inputs
* Test MCP integrations before deploying
