DC

dshivendra/crewai_mcp_adapter

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

14 stars 6 forks 质量 53 趋势 20MIT

一个Python库扩展了CrewAI的适配器生态系统,并配有模型上下文协议(MCP)集成支持和自定义代理和工具开发的综合工具.

概览

一个Python库扩展了CrewAI的适配器生态系统,并配有模型上下文协议(MCP)集成支持和自定义代理和工具开发的综合工具. - QQ 本地 CrewAI 集成和适配器模式 - QQ 工具集成的 MCP 协议支持 - 用于扩展和创建新适配器的易用接口 - QQ 类型安全执行 Pydantic - QX JSON Schema 校验工具参数 - QQ Async/await 支持 - QQQ 详细执行元数据 您可以直接从 PyPI 安装软件包 : - Python 3.11以上 - 船员包 - pydantic 包 - mcp 包 1. Pyproject.toml 2. 更新版本 构建包: 3.上传到 PyPI: 这个项目根据麻省理工学院许可证获得许可----详情见LICENSE文件。 欢迎捐款! 请随意提交拉力请求.

概述(AI 翻译)

一个Python库扩展了CrewAI的适配器生态系统,并配有模型上下文协议(MCP)集成支持和自定义代理和工具开发的综合工具.

□ 特性

  • 土著CrewAI一体化和适配模式
  • 用于工具集成的 MCP 协议支持
  • 用于扩展和创建新适配器的易用接口
  • 与Pydantic一起实施类型安全
  • JSON Schema 工具参数验证
  • QQ 自动/等待支持
  • 详细执行元数据

□ 安装

您可以直接从 PyPI 安装软件包 :

或者从源头安装 :

□ 快开始

□ 文档

详细文件见:

  • 获得启动指南
  • API 参考
  • 实例

□ 发展

· 先决条件

  • Python 3.11 或更高层
  • crewai包件
  • [[T1] 包件
  • mcp包件

安装开发依赖

QQ 运行测试

□ 出版

要向 PyPI 发布新版本 :

  1. 更新版本 pyproject.toml

  2. 构建软件包:

  3. 上传到 PyPI :

□ 许可证

这个项目根据麻省理工学院许可证获得许可----详情见LICENSE文件。

□ 贡献

本页由 AI 翻译,技术细节请以原文为准。

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.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →