Connect
autogen logo

AutoGen

AutoGen's MCP extension gives any AutoGen agent the full Dock tool catalog. Wire it once and use in conversable agents, group chats, and swarms.

Client
AutoGen
Microsoft multi-agent framework. MCP via autogen-ext-mcp.
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

  • Python 3.10+.
  • autogen-agentchat, autogen-ext[mcp] installed.
  • A Dock dk_ key.
agent.pypython
import os
from autogen_ext.tools.mcp import StreamableHttpServerParams, mcp_server_tools
from autogen_agentchat.agents import AssistantAgent
from autogen_ext.models.anthropic import AnthropicChatCompletionClient

server = StreamableHttpServerParams(
    url="https://trydock.ai/api/mcp",
    headers={"Authorization": f"Bearer {os.environ['DOCK_API_KEY']}"},
)

tools = await mcp_server_tools(server)

agent = AssistantAgent(
    name="dock_agent",
    tools=tools,
    # any autogen chat-completion client, Anthropic / OpenAI / Azure / ...
    model_client=model_client,
)

Troubleshooting

Symptom
Fix
mcp_server_tools returns empty
Check the auth header is actually being sent, some AutoGen versions drop headers silently if nested wrong.

Frequently asked questions

How do I connect Dock to AutoGen?
Add Dock as a remote MCP server in AutoGen. Either let AutoGen's OAuth 2.1 + DCR flow handle auth (recommended; no credential ceremony), or paste a scoped Dock `dk_` API key in AutoGen's MCP config under the `Authorization: Bearer dk_…` header.
Does AutoGen 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 AutoGen, discovers them via the standard `tools/list` handshake. Learn more →
How do I limit which Dock workspaces AutoGen can write to?
When you mint the `dk_` key for AutoGen 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 AutoGen did in my Dock workspace?
Open the workspace in your browser. Every row AutoGen 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 AutoGen 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 AutoGen's `dk_` key in Settings → API keys.
Can multiple AutoGen sessions share state through Dock?
Yes. Every AutoGen 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 AutoGen need OAuth or a dk_ API key for Dock?
Either works. OAuth 2.1 + DCR is the recommended path: AutoGen 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 use Dock with Microsoft AutoGen?
AutoGen 0.4+ supports MCP servers via the `MCPServerStdioParams` / `MCPServerSseParams` adapters. Configure with `https://trydock.ai/api/mcp` and your `dk_` Bearer; Dock's tools auto-register as AutoGen Tools.
Can multi-agent AutoGen conversations all write to the same Dock workspace?
Yes. Each AutoGen agent gets its own `dk_` key and signed-agent identity in Dock. The GroupChat transcript can be appended to a Dock doc surface as it streams, giving you a durable conversation log.
How is Dock different from AutoGen's built-in Memory module?
AutoGen Memory is conversation-scoped agent context. Dock is the durable, team-visible workspace where AutoGen's outputs land. Use both: Memory for in-conversation context, Dock for the artifacts (rows, docs) the conversation produces.

Related

Updated