From ce72dcedb9c4ea829042afb326688b9a15924bb0 Mon Sep 17 00:00:00 2001 From: Rohit Kushwaha Date: Thu, 19 Mar 2026 18:09:46 +0530 Subject: [PATCH] docs: add MCP and ACP documentation for Deep Agents - Document MCP tool support via .mcp.json file discovery (stdio, SSE, HTTP transports, trust model, Claude Code compat) - Document ACP (Agent Communication Protocol) for IDE integration - Note that MCP is file-based discovery, not programmatic via create_deep_agent() - dashboard MCP config doesn't carry over - Update comparison table to show MCP support --- docs/backends/deep-agents.mdx | 79 ++++++++++++++++++++++++++++++++++- docs/backends/index.mdx | 2 +- 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/docs/backends/deep-agents.mdx b/docs/backends/deep-agents.mdx index 7c7281da..303253e8 100644 --- a/docs/backends/deep-agents.mdx +++ b/docs/backends/deep-agents.mdx @@ -16,7 +16,8 @@ The Deep Agents backend uses LangChain's [Deep Agents SDK](https://docs.langchai - **Status**: Beta - **Provider support**: Anthropic, OpenAI, Google, Ollama, OpenRouter, OpenAI-compatible, LiteLLM - **Built-in tools**: write_todos, read_todos, task (subagents), ls, read_file, write_file -- **MCP support**: No +- **MCP support**: Yes (via `.mcp.json` file discovery, supports stdio/SSE/HTTP transports) +- **ACP support**: Yes (Agent Communication Protocol for IDE integration via `deepagents-acp`) - **Session persistence**: History injection (LangGraph checkpointing planned) ## Configuration @@ -118,6 +119,82 @@ Deep Agents includes its own planning and filesystem tools alongside PocketPaw's PocketPaw's custom tools (web_search, image_gen, memory, etc.) are registered as LangChain `StructuredTool` wrappers via the tool bridge. +## MCP Tools + +Deep Agents supports [MCP (Model Context Protocol)](https://docs.langchain.com/oss/python/deepagents/cli/mcp-tools) servers via `.mcp.json` configuration files. This lets the agent access external tools like file systems, APIs, and databases. + +### Configuration Files + +The SDK discovers `.mcp.json` files at three locations (highest precedence last): + +1. `~/.deepagents/.mcp.json` -- user-level (global defaults) +2. `/.deepagents/.mcp.json` -- project subdirectory +3. `/.mcp.json` -- project root (Claude Code compatible) + +### Supported Transports + +**stdio** (spawns server as child process): +```json +{ + "servers": { + "my-server": { + "command": "/path/to/server", + "args": ["--arg1", "value"], + "env": { "API_KEY": "..." } + } + } +} +``` + +**SSE** (remote server): +```json +{ + "servers": { + "remote-sse": { + "type": "sse", + "url": "https://example.com/sse", + "headers": { "Authorization": "Bearer token" } + } + } +} +``` + +**HTTP** (remote server): +```json +{ + "servers": { + "remote-http": { + "type": "http", + "url": "https://example.com/api", + "headers": { "Authorization": "Bearer token" } + } + } +} +``` + + + The `.mcp.json` format at the project root is compatible with Claude Code's MCP config, so existing MCP server configs carry over automatically. + + +### Trust and Security + +- **Project-level stdio servers**: default-deny policy. The CLI prompts for approval using SHA-256 fingerprinting. In non-interactive mode, use `--trust-project-mcp`. +- **Remote servers** (SSE/HTTP): always allowed since they don't execute local code. + + + MCP support in Deep Agents currently works via file-based discovery (`.mcp.json`), not as a programmatic parameter to `create_deep_agent()`. PocketPaw's MCP servers configured in the dashboard are not automatically passed to the Deep Agents backend. To use MCP with Deep Agents, configure servers in a `.mcp.json` file in your project root. + + +## ACP (Agent Communication Protocol) + +Deep Agents supports [ACP](https://docs.langchain.com/oss/python/deepagents/acp) for IDE integration (Zed, JetBrains, VS Code). ACP standardizes communication between coding agents and editors, allowing editors to provide project context while receiving rich updates. + +```bash +pip install deepagents-acp +``` + +This is separate from PocketPaw's integration and is primarily useful when running Deep Agents directly from an IDE. + ## How It Works 1. PocketPaw calls `create_deep_agent()` with the LLM model, system prompt, and tools diff --git a/docs/backends/index.mdx b/docs/backends/index.mdx index cd759968..8d6d0b04 100644 --- a/docs/backends/index.mdx +++ b/docs/backends/index.mdx @@ -18,7 +18,7 @@ PocketPaw supports **seven agent backends** built on a unified `AgentBackend` pr | Status | Production | Beta | Beta | Beta | Beta | Beta | Beta | | Streaming | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Tools | Yes | Yes | Yes | Yes | Yes | Yes | Yes | -| MCP | Yes | No | Yes | No | Yes | No | No | +| MCP | Yes | No | Yes | .mcp.json | Yes | No | No | | Multi-turn | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Local models | Ollama | Ollama | No | Ollama | No | No | No | | OpenRouter | Partial | Yes | No | Yes | No | No | No |