richard-gyiko/autogen-ext-mcp
Turns Model Context Protocol server tools available in AutoGen >= v0.4
[](https://codecov.io/gh/richard-gyiko/autogen-ext-mcp)
The functionality of this project has been integrated directly into the official `autogen-ext` package and is available from `version v0.4.6`. You can now use it directly in autogen-ext without needing this separate package.
For further updates and improvements, please refer to the official `autogen` repository.
This package provides integration between Microsoft AutoGen and the Model Context Protocol (MCP), enabling AutoGen agents to seamlessly connect with various data sources and tools.
MCP is an open standard that enables secure, two-way connections between AI systems and data sources, replacing fragmented integrations with a single universal protocol. This allows AI assistants to maintain context as they move between different tools and datasets.
pip install autogen-ext-mcpfrom autogen_ext_mcp.tools import mcp_server_tools, StdioServerParams
from pathlib import Path
# Get desktop path cross-platform
desktop_path = str(Path.home() / "Desktop")
# Connect to FileSystem MCP server
server_params = StdioServerParams(
command="npx",
args=[
"-y",
"@modelcontextprotocol/server-filesystem",
desktop_path, # Allow access to Desktop directory
]
)
# Get toolsLoading reviews...