Connect
semantic-kernel logo

Semantic Kernel

Semantic Kernel (.NET and Python) imports MCP servers as Kernel plugins. Dock becomes a callable plugin for any skill function the kernel runs.

Client
Semantic Kernel
Microsoft's .NET + Python orchestrator. MCP via plugin.
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

  • .NET 8+ or Python 3.10+ with semantic-kernel and its MCP extra installed.
  • A Dock dk_ key.
Pythonpython
from semantic_kernel import Kernel
from semantic_kernel.connectors.mcp import MCPStreamableHttpPlugin

kernel = Kernel()

dock = MCPStreamableHttpPlugin(
    name="dock",
    url="https://trydock.ai/api/mcp",
    headers={"Authorization": f"Bearer {os.environ['DOCK_API_KEY']}"},
)
await dock.connect()
kernel.add_plugin(dock, plugin_name="dock")
.NETcsharp
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Connectors.MCP;

var kernel = Kernel.CreateBuilder().Build();

await kernel.Plugins.AddFromMcpStreamableHttpServer(
    "dock",
    new Uri("https://trydock.ai/api/mcp"),
    new Dictionary<string, string>
    {
        ["Authorization"] = $"Bearer {Environment.GetEnvironmentVariable("DOCK_API_KEY")}"
    }
);

Troubleshooting

Symptom
Fix
Plugin name collisions
SK scopes functions by plugin name. Keep Dock's plugin name as dock so tool calls are unambiguous.

Frequently asked questions

How do I connect Dock to Semantic Kernel?
Add Dock as a remote MCP server in Semantic Kernel. Either let Semantic Kernel's OAuth 2.1 + DCR flow handle auth (recommended; no credential ceremony), or paste a scoped Dock `dk_` API key in Semantic Kernel's MCP config under the `Authorization: Bearer dk_…` header.
Does Semantic Kernel 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 Semantic Kernel, discovers them via the standard `tools/list` handshake. Learn more →
How do I limit which Dock workspaces Semantic Kernel can write to?
When you mint the `dk_` key for Semantic Kernel 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 Semantic Kernel did in my Dock workspace?
Open the workspace in your browser. Every row Semantic Kernel 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 Semantic Kernel 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 Semantic Kernel's `dk_` key in Settings → API keys.
Can multiple Semantic Kernel sessions share state through Dock?
Yes. Every Semantic Kernel 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 Semantic Kernel need OAuth or a dk_ API key for Dock?
Either works. OAuth 2.1 + DCR is the recommended path: Semantic Kernel 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 to a Semantic Kernel agent?
Use Semantic Kernel's MCP plugin support: `kernel.add_mcp_server(name='dock', url='https://trydock.ai/api/mcp', auth_header='Bearer dk_...')`. The 43 Dock tools become callable as Semantic Functions.
Can Semantic Kernel's planner use Dock tools?
Yes. Once added via `add_mcp_server`, Dock's tools surface as plannable Functions. The planner can chain `list_workspaces` → `list_rows` → `create_row` based on your prompt.
How do Semantic Kernel agents share state through Dock?
Each agent in a multi-agent SK setup uses its own `dk_` key. Writes propagate via Dock's SSE stream within ~400ms, and SK agents can poll Dock state via `list_rows` / `get_doc` for the latest workspace snapshot.

Related

Updated