-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I'm reading the docs in https://docs.crewai.com/en/mcp/overview, and was trying to run the code snippet
from https://docs.crewai.com/en/mcp/overview#quick-start-with-structured-configurations, but I'm getting this error:
uv run python test.py
Traceback (most recent call last):
File "/Users/jsalvasoler/Desktop/repos/agentic-frameworks/test.py", line 2, in <module>
from crewai.mcp import MCPServerStdio, MCPServerHTTP, MCPServerSSE
ModuleNotFoundError: No module named 'crewai.mcp'
Looking into the library source code, there is indeed no module named crewai.mcp.
Version details:
Python 3.13.3
"crewai[tools]==1.3.0"
"crewai-tools[mcp]==1.3.0",
"mcp==1.20.0"
I have also tried with the same library versions but Python 3.12, got the same error
Steps to Reproduce
-
Set up the py environment with
Python 3.13.3 "crewai[tools]==1.3.0" "crewai-tools[mcp]==1.3.0", "mcp==1.20.0" -
Run the snippet from https://docs.crewai.com/en/mcp/overview#quick-start-with-structured-configurations
from crewai.mcp import MCPServerStdio, MCPServerHTTP, MCPServerSSE
# Create agent with structured MCP configurations
research_agent = Agent(
role="Research Analyst",
goal="Find and analyze information using advanced search tools",
backstory="Expert researcher with access to multiple data sources",
mcps=[
# Local stdio server
MCPServerStdio(
command="python",
args=["local_server.py"],
env={"API_KEY": "your_key"},
),
# Remote HTTP server
MCPServerHTTP(
url="https://api.research.com/mcp",
headers={"Authorization": "Bearer your_token"},
),
]
)
# Create task
research_task = Task(
description="Research the latest developments in AI agent frameworks",
expected_output="Comprehensive research report with citations",
agent=research_agent
)
# Create and run crew
crew = Crew(agents=[research_agent], tasks=[research_task])
result = crew.kickoff()
```
3. You should get the error from above
### Expected behavior
We shouldn't get the error from above.
### Screenshots/Code snippets
[test.py](https://github.com/user-attachments/files/23420786/test.py)
### Operating System
Other (specify in additional context)
### Python Version
3.12
### crewAI Version
1.3.0
### crewAI Tools Version
1.3.0
### Virtual Environment
Venv
### Evidence
Already included above
### Possible Solution
I'm very confused, is it possible that some dependencies / extra modules are missing?
Are the docs outdated?
### Additional context
macOS Sequoia 15.6.1 (24G90)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working