Aller au contenu
login
arrow_backRetour aux issues
agentdecksdk/agentdeck #364

docs: add an agent-with-mcp example and guide

ecoDébutant documentation good first issue area:docs

descriptionDescription

## Context AgentDeck supports Model Context Protocol (MCP) tool integration through `agentdeck.mcp` and `Deck(mcp=...)`. MCP tools allow agents to interact with external tools and resources over stdio and SSE transports without custom tool wrappers. ## Current state - `agentdeck/mcp.py` implements the MCP client adapter and tool registration. - `docs/reference/deck.mdx` mentions the `mcp` parameter on `Deck`. - There is no shipped runnable example under `examples/` demonstrating how to connect an agent to an MCP server. ## What is missing A minimal worked example under `examples/agent-with-mcp/` (`run.py`, `.agentdeck/`, `README.md`) and a corresponding guide page in `docs-site/content/guides/mcp-tools.mdx` showing an agent discovering and invoking tools from a local MCP server. ## Expected contribution 1. `examples/agent-with-mcp/run.py` running a Deck agent connected to a stdio MCP server (e.g. SQLite or filesystem MCP server). 2. `examples/agent-with-mcp/README.md` explaining setup prerequisites, environment variables, and sample output. 3. `docs-site/content/guides/mcp-tools.mdx` walking through the integration and cleanup lifecycle. ## Relevant APIs and source files - `agentdeck/mcp.py` - MCP client configuration and session lifecycle - `agentdeck/deck.py` - `Deck(mcp=...)` and `Deck.aclose()` - `docs-site/content/reference/deck.mdx` - reference docs for Deck constructor ## Files to change - `examples/agent-with-mcp/` (new directory) - `docs-site/content/guides/mcp-tools.mdx` (new guide page) ## Acceptance criteria - [ ] Uses only public APIs from `agentdeck` - [ ] Any code shown runs against the current release - [ ] Example runs via `python run.py` - [ ] Demonstrates clean server shutdown with `Deck.aclose()` or async context manager - [ ] Includes expected terminal output in `README.md` - [ ] Does not duplicate the Quickstart - [ ] Links the related reference page - [ ] `make check` passes - [ ] `docs-site` builds ## Out of scope - No API redesign - No new runtime behavior - No changes to MCP client internals ## How to verify locally ```bash make install make check cd examples/agent-with-mcp && python run.py cd docs-site npm install npm run dev ``` ## Difficulty medium
codeOuvre sur GitHub