-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Expand file tree
/
Copy pathserver.py
More file actions
42 lines (34 loc) · 964 Bytes
/
server.py
File metadata and controls
42 lines (34 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import asyncio
from mcp.server.fastmcp import FastMCP
from agents import run_research
# Create FastMCP instance
mcp = FastMCP("crew_research")
@mcp.tool()
async def crew_research(query: str) -> str:
"""Run CrewAI-based research system for given user query. Can do both standard and deep web search.
Args:
query (str): The research query or question.
Returns:
str: The research response from the CrewAI pipeline.
"""
return run_research(query)
# Run the server
if __name__ == "__main__":
mcp.run(transport="stdio")
# add this inside ./.cursor/mcp.json
# {
# "mcpServers": {
# "crew_research": {
# "command": "uv",
# "args": [
# "--directory",
# "/Users/akshay/Eigen/ai-engineering-hub/Multi-Agent-deep-researcher-mcp-windows-linux",
# "run",
# "server.py"
# ],
# "env": {
# "LINKUP_API_KEY": "your_linkup_api_key_here"
# }
# }
# }
# }