This project implements a Model Control Protocol (MCP) server that enables various Large Language Models like Claude to access and utilize CrewAI tools through a REST API. The server exposes specialized capabilities including custom CrewAI tools, web search functionality, and data analysis features.
Ensure you have Python >=3.10 <3.13 installed on your system before proceeding. This project uses UV for dependency management.
pip install uv
crewai install
.env
file:OPENAI_API_KEY=your-api-key-here
You can start the MCP server using one of these commands:
start_mcp
Or run it directly with Python:
python -m mcp.run_server
By default, the server runs on 0.0.0.0:8000
. You can customize the host and port:
start_mcp --host 127.0.0.1 --port 9000
The MCP server provides access to several powerful tools:
While the MCP server is one component, you can also use the full CrewAI system directly:
To execute a sequence of AI agent tasks:
crewai run
This will generate a report.md
file containing research on LLMs in the root folder.
For more complex scenarios where agents are specialized in specific tools:
hierarchical
or:
run_hierarchical
This will create a hierarchical_result.md
file with the results from the hierarchical process.
You can modify the system to suit your specific needs:
src/crewai/config/agents.yaml
to define custom agentssrc/crewai/config/tasks.yaml
to create specific taskssrc/crewai/crew.py
to add custom logic, tools and specific argumentssrc/crewai/main.py
to add custom inputs for your agents and tasksThere are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.