mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 07:13:00 +00:00
* WIP transport support mcp * refactor: streamline MCP tool loading and error handling * linted * Self type from typing with typing_extensions in MCP transport modules * added tests for mcp setup * added tests for mcp setup * docs: enhance MCP overview with detailed integration examples and structured configurations * feat: implement MCP event handling and logging in event listener and client - Added MCP event types and handlers for connection and tool execution events. - Enhanced MCPClient to emit events on connection status and tool execution. - Updated ConsoleFormatter to handle MCP event logging. - Introduced new MCP event types for better integration and monitoring.
38 lines
893 B
Python
38 lines
893 B
Python
"""MCP (Model Context Protocol) client support for CrewAI agents.
|
|
|
|
This module provides native MCP client functionality, allowing CrewAI agents
|
|
to connect to any MCP-compliant server using various transport types.
|
|
"""
|
|
|
|
from crewai.mcp.client import MCPClient
|
|
from crewai.mcp.config import (
|
|
MCPServerConfig,
|
|
MCPServerHTTP,
|
|
MCPServerSSE,
|
|
MCPServerStdio,
|
|
)
|
|
from crewai.mcp.filters import (
|
|
StaticToolFilter,
|
|
ToolFilter,
|
|
ToolFilterContext,
|
|
create_dynamic_tool_filter,
|
|
create_static_tool_filter,
|
|
)
|
|
from crewai.mcp.transports.base import BaseTransport, TransportType
|
|
|
|
|
|
__all__ = [
|
|
"BaseTransport",
|
|
"MCPClient",
|
|
"MCPServerConfig",
|
|
"MCPServerHTTP",
|
|
"MCPServerSSE",
|
|
"MCPServerStdio",
|
|
"StaticToolFilter",
|
|
"ToolFilter",
|
|
"ToolFilterContext",
|
|
"TransportType",
|
|
"create_dynamic_tool_filter",
|
|
"create_static_tool_filter",
|
|
]
|