CrewAI MCP Adapter
A Python library extending CrewAI's adapter ecosystem with Model Context Protocol (MCP) integration support and comprehensive tooling for custom agent and tool development.
Features
- 🔌 Native CrewAI integration and adapter patterns
- 🛠️ MCP protocol support for tool integration
- 🧩 Easy-to-use interface for extending and creating new adapters
- 📝 Type-safe implementation with Pydantic
- 🔍 JSON Schema validation for tool parameters
- 🚀 Async/await support
- 📊 Detailed execution metadata
Installation
You can install the package directly from PyPI:
pip install crewai-adapters
Or install from source:
pip install git+https://github.com/dshivendra/crewai_mcp_adapter.git
Quick Start
from crewai import Agent, Task
from crewai_adapters import CrewAIAdapterClient
from crewai_adapters.types import AdapterConfig
async def main():
async with CrewAIAdapterClient() as client:
# Connect to MCP server
await client.connect_to_mcp_server(
"math",
command="python",
args=["math_server.py"]
)
# Create agent with tools
agent = Agent(
name="Calculator",
goal="Perform calculations",
tools=client.get_tools()
)
# Execute task
task = Task(
description="Calculate (3 + 5) × 12",
agent=agent
)
result = await task.execute()
print(f"Result: {result}")
if __name__ == "__main__":
import asyncio
asyncio.run(main())
Documentation
For detailed documentation, see:
Development
Prerequisites
- Python 3.11 or higher
crewaipackagepydanticpackagemcppackage
Install Development Dependencies
pip install -e ".[test,docs]"
Running Tests
pytest tests/ -v
Publishing
To publish a new version to PyPI:
- Update version in pyproject.toml
- Build the package:
python -m build
- Upload to PyPI:
python -m twine upload dist/*
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for crewai-adapters 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crewai_adapters-0.1.2.tar.gz | 16.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_adapters-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / crewai_adapters-0.1.2.tar.gz
| Download URL | crewai_adapters-0.1.2.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1697f2a9e90bd251d06d14579364ba7f76b6fb9d5d9b17fee0c0c8e491b61d9
|
|
BLAKE2b-256 checksum How to use checksums |
050f62065c5ab1c064dc7fa0850e4eaed93ae91c6ce17bc75e2f15d046bf0e77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 23, 2025.
Transparency logRelease files / crewai_adapters-0.1.2-py3-none-any.whl
| Download URL | crewai_adapters-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d8d8a90944502998d76411a89dc60c28dae411382b34baa2b92da8254f569dc
|
|
BLAKE2b-256 checksum How to use checksums |
e242ddc8f26e1a3084442ef7f183f41b313f4854b3a3aee5d13bbecf70b918a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 23, 2025.
Transparency log