> For the complete documentation index, see [llms.txt](https://www.cakewalk.security/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-platforms/dify-ai.md).

# Dify.AI

Add Cakewalk's MCP Gateway to Dify from the Tools page. Dify validates the connection before registration.

Dify reads remote MCP servers from the Tools page. Add Cakewalk's gateway as an HTTP-based MCP server and Dify validates the connection before registering it.

## Install Method

Custom form on Dify's Tools page. Available from Dify v1.6.0 onwards.

## Step 1: Open the Tools Page

1. Open Dify and sign in.
2. Go to the **Tools** page.
3. Select **MCP**.

## Step 2: Add the Cakewalk Gateway

1. Click **Add MCP Server (HTTP)**.
2. Fill the form:
   * **Display Name:** Cakewalk
   * **Server URL:** `https://mcp-gateway.getcakewalk.io/mcp`
   * **Unique Identifier:** `cakewalk` (or your chosen slug).
   * **Description:** optional.
3. Submit the form. Dify validates that it can reach Cakewalk's gateway before completing registration.

## Step 3: Authenticate

After registration, Dify initiates the OAuth flow on first tool use. Sign in with your Cakewalk account and approve the Connection in your browser.

## Verifying It Works

In a Dify app, ask the agent to list its available tools. The tools surfaced through the Cakewalk gateway appear in the response. In Cakewalk, the Dify card on **My Agents** flips to **Connected** after the first agent call.

## Troubleshooting

* **Form does not submit (validation error):** Dify probes the MCP server URL before completing registration. Confirm `mcp-gateway.getcakewalk.io` is reachable from Dify's servers (or from your self-hosted Dify network).
* **OAuth flow does not start:** Cakewalk's gateway expects OAuth-aware clients. If Dify falls back to anonymous access, the tool list returns empty. Confirm the Server URL points to `/mcp` (no trailing slash, no extra path).

## Learn more

* [Dify v1.6.0: Built-in Two-Way MCP Support](https://dify.ai/blog/v1-6-0-built-in-two-way-mcp-support) from Dify.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-platforms/dify-ai.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
