Connect
dify logo

Dify

Dify's Tool library accepts remote MCP servers. Add Dock as a custom MCP tool and every Dify app (agents, workflows, chatbots) can call its 63 tools.

Client
Dify
LLM app platform. MCP Tool node in Studio.
HTTP JSON-RPC (streamable-http)
Dock MCP
trydock.ai/api/mcp
37 tools · OAuth 2.1 + DCR · Bearer
Auth path
1
Mint a dk_ key in Dock Settings → API keys.
2
Paste it as Authorization: Bearer dk_… in the client config.
3
Client calls Dock MCP directly on every request.

Prerequisites

  • Dify (cloud or self-hosted).
  • A Dock dk_ key.
UI path
Tools · Add Custom Tool · MCP
MCP tool configjson
{
  "name": "dock",
  "url": "https://trydock.ai/api/mcp",
  "transport": "streamable-http",
  "headers": {
    "Authorization": "Bearer dk_c914f1c6..."
  }
}

Troubleshooting

Symptom
Fix
Tools show in library but app can't call them
Attach the MCP tool to your app's Tool list in Orchestrate. Tools in library aren't auto-attached.

Frequently asked questions

How do I connect Dock to Dify?
Add Dock as a remote MCP server in Dify. Either let Dify's OAuth 2.1 + DCR flow handle auth (recommended; no credential ceremony), or paste a scoped Dock `dk_` API key in Dify's MCP config under the `Authorization: Bearer dk_…` header.
Does Dify work with Dock's MCP server?
Yes. Dock exposes 43 MCP tools at `https://trydock.ai/api/mcp` over HTTP transport with OAuth 2.1 + DCR and Bearer-token auth. Any MCP-spec-compliant client, including Dify, discovers them via the standard `tools/list` handshake. Learn more →
How do I limit which Dock workspaces Dify can write to?
When you mint the `dk_` key for Dify in Settings → API keys, pick the workspace from the dropdown. The key returns 403 on every other workspace regardless of what the prompt asks. To scope across multiple, mint multiple keys or add the agent as an explicit member of each. Learn more →
How do I see what Dify did in my Dock workspace?
Open the workspace in your browser. Every row Dify created or updated is stamped with the agent's identity (orb + name) in the createdBy / updatedBy field. The workspace activity feed shows every action chronologically. Learn more →
How do I undo a row Dify wrote to Dock?
Open the row, click the kebab menu, choose Delete (soft-delete preserves history). For bulk reverts use the activity feed to find the agent's session and delete its rows in batch. To prevent future writes, revoke Dify's `dk_` key in Settings → API keys.
Can multiple Dify sessions share state through Dock?
Yes. Every Dify session reads and writes the same workspace, so handoffs across machines or across long-running multi-session workflows just work. The Dock workspace IS the shared state; no separate message bus required.
Does Dify need OAuth or a dk_ API key for Dock?
Either works. OAuth 2.1 + DCR is the recommended path: Dify hits Dock's discovery endpoint at `/.well-known/oauth-authorization-server` and auto-registers as a client. The `dk_` Bearer token path is fine for owned-code agents and CI scripts; pick whichever fits your stack. Learn more →
How do I add Dock as an MCP server in Dify?
Dify's MCP plugin support (1.5+) lets you register external MCP servers. Add Dock under Workspace Settings → Plugins → MCP, with URL `https://trydock.ai/api/mcp` and your `dk_` Bearer.
Can a Dify Workflow write outputs to a Dock workspace?
Yes. Add an MCP Tool node calling `create_row` or `append_doc_section`. Each workflow run appends to your Dock workspace; team members can comment in-line on the outputs.
How do I trigger a Dify chatflow from a Dock comment?
Register a Dock webhook on `comment.added` events pointing at your Dify chatflow's webhook trigger. Each new comment fires a chatflow run with the comment body as input.

Related

Updated