> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-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/3.10.x/use/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-4171f9f9/UBmmoVHERrjglfCJ/images/use-dify/workspace/mcp-server-list.png?fit=max&auto=format&n=UBmmoVHERrjglfCJ&q=85&s=4acdc2dacd230c4b9b427bb289762064" 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-4171f9f9/UBmmoVHERrjglfCJ/images/use-dify/workspace/mcp-add-server-dialog.png?fit=max&auto=format&n=UBmmoVHERrjglfCJ&q=85&s=6c860f6050922b6bfb5d7b92b3fbd75f" 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-4171f9f9/UBmmoVHERrjglfCJ/images/use-dify/workspace/mcp-server-card.png?fit=max&auto=format&n=UBmmoVHERrjglfCJ&q=85&s=f87d09ca887687a9a8e1397c215b2daf" 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-4171f9f9/UBmmoVHERrjglfCJ/images/use-dify/workspace/mcp-server-tools-list.png?fit=max&auto=format&n=UBmmoVHERrjglfCJ&q=85&s=8b3ec3a060e5d0891a9ce584fbbcb82f" 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-4171f9f9/UBmmoVHERrjglfCJ/images/use-dify/workspace/mcp-tool-settings.png?fit=max&auto=format&n=UBmmoVHERrjglfCJ&q=85&s=7df42055157abdffbd44c385ab622336" 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
