Metadata-Version: 2.4
Name: autogen-ext-mcp
Version: 0.2.0
Summary: MCP Tools extension for AutoGen >= v0.4
Project-URL: homepage, https://github.com/richard-gyiko/autogen-ext-mcp
Project-URL: Documentation, https://github.com/richard-gyiko/autogen-ext-mcp#readme
Project-URL: Repository, https://github.com/richard-gyiko/autogen-ext-mcp.git
Project-URL: Bug-Tracker, https://github.com/richard-gyiko/autogen-ext-mcp/issues
Author-email: Richard Gyiko <gyiko.richard@outlook.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,autogen,autogen-ext,integration,model-context-protocol,tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: autogen-core==0.4.0.dev13
Requires-Dist: json-schema-to-pydantic>=0.2.0
Requires-Dist: mcp>=1.1.2
Provides-Extra: samples
Requires-Dist: autogen-agentchat==0.4.0.dev13; extra == 'samples'
Requires-Dist: autogen-ext[azure,openai]==0.4.0.dev13; extra == 'samples'
Requires-Dist: python-dotenv>=1.0.1; extra == 'samples'
Requires-Dist: rich>=13.9.4; extra == 'samples'
Description-Content-Type: text/markdown

# AutoGen Extension for MCP Tools

![PyPI - Version](https://img.shields.io/pypi/v/autogen-ext-mcp)

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)

## Requirements

- Python >=3.12
- AutoGen >=0.4.0
- mcp >=1.1.2

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
