mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-26 08:38:15 +00:00
Fix #2698: Implement MCP SSE server connection for tools
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
20
README.md
20
README.md
@@ -688,6 +688,26 @@ A: Yes, CrewAI can integrate with custom-trained or fine-tuned models, allowing
|
||||
### Q: Can CrewAI agents interact with external tools and APIs?
|
||||
A: Absolutely! CrewAI agents can easily integrate with external tools, APIs, and databases, empowering them to leverage real-world data and resources.
|
||||
|
||||
CrewAI also supports connecting your tools to the Management Control Plane (MCP) via Server-Sent Events (SSE), enabling real-time tool execution from the Crew Control Plane:
|
||||
|
||||
```python
|
||||
from crewai.tools import MCPToolConnector, Tool
|
||||
|
||||
# Define your tools
|
||||
search_tool = Tool(
|
||||
name="search",
|
||||
description="Search for information",
|
||||
func=lambda query: f"Results for {query}"
|
||||
)
|
||||
|
||||
# Connect tools to MCP
|
||||
connector = MCPToolConnector(tools=[search_tool])
|
||||
connector.connect()
|
||||
|
||||
# Listen for tool events from MCP
|
||||
connector.listen() # This will block until interrupted
|
||||
```
|
||||
|
||||
### Q: Is CrewAI suitable for production environments?
|
||||
A: Yes, CrewAI is explicitly designed with production-grade standards, ensuring reliability, stability, and scalability for enterprise deployments.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user