CrewAI Adapter

CrewAI Adapter

Contribute to dshivendra/crewai_mcp_adapter development by creating an account on GitHub.

dshivendra

AI Content Generation
Visit Server

README

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
  • crewai package
  • pydantic package
  • mcp package

Install Development Dependencies

pip install -e ".[test,docs]"

Running Tests

pytest tests/ -v

Publishing

To publish a new version to PyPI:

  1. Update version in pyproject.toml
  2. Build the package:
    python -m build
    
  3. 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.

Recommended Servers

React MCP

React MCP

react-mcp integrates with Claude Desktop, enabling the creation and modification of React apps based on user prompts

Featured
Local
AIO-MCP Server

AIO-MCP Server

πŸš€ All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from

Featured
Local
Persistent Knowledge Graph

Persistent Knowledge Graph

An implementation of persistent memory for Claude using a local knowledge graph, allowing the AI to remember information about users across conversations with customizable storage location.

Featured
Local
Search1API MCP Server

Search1API MCP Server

A Model Context Protocol (MCP) server that provides search and crawl functionality using Search1API.

Featured
Fetch MCP Server

Fetch MCP Server

Provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.

Featured
OpenRouter MCP Server

OpenRouter MCP Server

Provides integration with OpenRouter.ai, allowing access to various AI models through a unified interface.

Featured
Any OpenAI Compatible API Integrations

Any OpenAI Compatible API Integrations

Integrate Claude with Any OpenAI SDK Compatible Chat Completion API - OpenAI, Perplexity, Groq, xAI, PyroPrompts and more.

Featured
Exa MCP

Exa MCP

A Model Context Protocol server that enables AI assistants like Claude to perform real-time web searches using the Exa AI Search API in a safe and controlled manner.

Featured
Aindreyway Codex Keeper

Aindreyway Codex Keeper

Serves as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.

Featured
AI ε›Ύεƒη”ŸζˆζœεŠ‘

AI ε›Ύεƒη”ŸζˆζœεŠ‘

ε―η”¨δΊŽcursor ι›†ζˆ mcp server

Featured