# AutoGen Extension for MCP Tools

This package provides integration between [Microsoft AutoGen](https://microsoft.github.io/autogen/) and the [Model Context Protocol (MCP)](https://modelcontextprotocol.io), 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.
## Installation
```bash
pip install autogen-ext-mcp
```
## Features
- Seamless integration of MCP tools with AutoGen agents
- Connect to any MCP-compatible data source or tool
- Automatic conversion of MCP tool schemas to AutoGen-compatible formats
## Quick Start
```python
from autogen_ext_mcp.tools import get_tools_from_mcp_server
from mcp import StdioServerParameters
from pathlib import Path
# Get desktop path cross-platform
desktop_path = str(Path.home() / "Desktop")
# Connect to FileSystem MCP server
server_params = StdioServerParameters(
command="npx",
args=[
"-y",
"@modelcontextprotocol/server-filesystem",
desktop_path, # Allow access to Desktop directory
]
)
# Get tools
tools = await get_tools_from_mcp_server(server_params)
# Use tools with AutoGen agents
# The tools can be passed to any AutoGen agent that supports tool use
```
## Samples
Check out the [samples directory](samples/) for example code and detailed instructions on getting started with the AutoGen MCP Extension. The samples demonstrate common use cases and best practices for integrating MCP tools with AutoGen agents.
## Resources
- [AutoGen Documentation](https://microsoft.github.io/autogen/0.4.0.dev11/index.html)
- [Model Context Protocol Documentation](https://modelcontextprotocol.io)
- [MCP Quickstart Guide](https://modelcontextprotocol.io/quickstart)
- [Pre-built MCP Servers](https://github.com/modelcontextprotocol/servers)
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Raw data
{
"_id": null,
"home_page": null,
"name": "autogen-ext-mcp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, autogen, autogen-ext, integration, model-context-protocol, tools",
"author": null,
"author_email": "Richard Gyiko <gyiko.richard@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/43/98/54b88c34c3b64031d797ba4586b12f6e918aab242d6ea66631910ca4ccc0/autogen_ext_mcp-0.2.2.tar.gz",
"platform": null,
"description": "# AutoGen Extension for MCP Tools\n\n\n\nThis package provides integration between [Microsoft AutoGen](https://microsoft.github.io/autogen/) and the [Model Context Protocol (MCP)](https://modelcontextprotocol.io), enabling AutoGen agents to seamlessly connect with various data sources and tools.\n\nMCP 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.\n\n## Installation\n\n```bash\npip install autogen-ext-mcp\n```\n\n## Features\n\n- Seamless integration of MCP tools with AutoGen agents\n- Connect to any MCP-compatible data source or tool\n- Automatic conversion of MCP tool schemas to AutoGen-compatible formats\n\n## Quick Start\n\n```python\nfrom autogen_ext_mcp.tools import get_tools_from_mcp_server\nfrom mcp import StdioServerParameters\nfrom pathlib import Path\n\n# Get desktop path cross-platform\ndesktop_path = str(Path.home() / \"Desktop\")\n\n# Connect to FileSystem MCP server\nserver_params = StdioServerParameters(\n command=\"npx\",\n args=[\n \"-y\",\n \"@modelcontextprotocol/server-filesystem\",\n desktop_path, # Allow access to Desktop directory\n ]\n)\n\n# Get tools\ntools = await get_tools_from_mcp_server(server_params)\n\n# Use tools with AutoGen agents\n# The tools can be passed to any AutoGen agent that supports tool use\n```\n\n## Samples\n\nCheck out the [samples directory](samples/) for example code and detailed instructions on getting started with the AutoGen MCP Extension. The samples demonstrate common use cases and best practices for integrating MCP tools with AutoGen agents.\n\n## Resources\n\n- [AutoGen Documentation](https://microsoft.github.io/autogen/0.4.0.dev11/index.html)\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io)\n- [MCP Quickstart Guide](https://modelcontextprotocol.io/quickstart)\n- [Pre-built MCP Servers](https://github.com/modelcontextprotocol/servers)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
"bugtrack_url": null,
"license": null,
"summary": "MCP Tools extension for AutoGen >= v0.4",
"version": "0.2.2",
"project_urls": {
"Bug-Tracker": "https://github.com/richard-gyiko/autogen-ext-mcp/issues",
"Documentation": "https://github.com/richard-gyiko/autogen-ext-mcp#readme",
"Repository": "https://github.com/richard-gyiko/autogen-ext-mcp.git",
"homepage": "https://github.com/richard-gyiko/autogen-ext-mcp"
},
"split_keywords": [
"ai",
" autogen",
" autogen-ext",
" integration",
" model-context-protocol",
" tools"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7ed5ac0c031ec515e7608eb4741598ac1c57bc5c3460601e9a837316507a1bb5",
"md5": "f6f7e832f46cb72db924a0ebfd1c3aae",
"sha256": "bca66889b6f1da775480b31d24fd12f380f6f7f46385ac1820036539d8ebf733"
},
"downloads": -1,
"filename": "autogen_ext_mcp-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f6f7e832f46cb72db924a0ebfd1c3aae",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5007,
"upload_time": "2025-01-25T04:37:44",
"upload_time_iso_8601": "2025-01-25T04:37:44.043872Z",
"url": "https://files.pythonhosted.org/packages/7e/d5/ac0c031ec515e7608eb4741598ac1c57bc5c3460601e9a837316507a1bb5/autogen_ext_mcp-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "439854b88c34c3b64031d797ba4586b12f6e918aab242d6ea66631910ca4ccc0",
"md5": "782034681b288303e83d819eae9bb60c",
"sha256": "1e8a62b3f47bea83e0af24f441712ffc8a229d68f269bd661ffdb4c5e040e846"
},
"downloads": -1,
"filename": "autogen_ext_mcp-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "782034681b288303e83d819eae9bb60c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 66614,
"upload_time": "2025-01-25T04:37:46",
"upload_time_iso_8601": "2025-01-25T04:37:46.073237Z",
"url": "https://files.pythonhosted.org/packages/43/98/54b88c34c3b64031d797ba4586b12f6e918aab242d6ea66631910ca4ccc0/autogen_ext_mcp-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-25 04:37:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "richard-gyiko",
"github_project": "autogen-ext-mcp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "autogen-ext-mcp"
}