Skip to content

Commit

Permalink
doc: Update API doc for MCP tool to include installation instructions (
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhu authored Feb 11, 2025
1 parent f9d4a84 commit a9db384
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ async def mcp_server_tools(
This factory function connects to an MCP server and returns adapters for all available tools.
The adapters can be directly assigned to an AutoGen agent's tools list.
.. note::
To use this function, you need to install `mcp` extra for the `autogen-ext` package.
.. code-block:: bash
pip install -U "autogen-ext[mcp]"
Args:
server_params (McpServerParams): Connection parameters for the MCP server.
Can be either StdioServerParams for command-line tools or
Expand Down
8 changes: 8 additions & 0 deletions python/packages/autogen-ext/src/autogen_ext/tools/mcp/_sse.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ class SseMcpToolAdapter(
with AutoGen agents. Common use cases include integrating with remote MCP services,
cloud-based tools, and web APIs that implement the Model Context Protocol (MCP).
.. note::
To use this class, you need to install `mcp` extra for the `autogen-ext` package.
.. code-block:: bash
pip install -U "autogen-ext[mcp]"
Args:
server_params (SseServerParameters): Parameters for the MCP server connection,
including URL, headers, and timeouts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ class StdioMcpToolAdapter(
with AutoGen agents. Common use cases include wrapping command-line tools and local services
that implement the Model Context Protocol (MCP).
.. note::
To use this class, you need to install `mcp` extra for the `autogen-ext` package.
.. code-block:: bash
pip install -U "autogen-ext[mcp]"
Args:
server_params (StdioServerParams): Parameters for the MCP server connection,
including command to run and its arguments
Expand Down

0 comments on commit a9db384

Please sign in to comment.