CrewAI Claude MCP server

Integrates CrewAI's multi-agent system with Claude through a hierarchical structure where specialized agents use tools like web search and data analysis, all exposed via a RESTful API for complex tasks.
Back to servers
Provider
miudinho420
Release date
Apr 20, 2025
Language
Python
Stats
1 star

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.

Installation

Ensure you have Python >=3.10 <3.13 installed on your system before proceeding. This project uses UV for dependency management.

Setting Up the Environment

  1. Install UV if you haven't already:
pip install uv
  1. Install the project dependencies:
crewai install
  1. Configure your API key by adding your OpenAI API key to the .env file:
OPENAI_API_KEY=your-api-key-here

Starting the MCP Server

You can start the MCP server using one of these commands:

start_mcp

Or run it directly with Python:

python -m mcp.run_server

Customizing Server Settings

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

Available MCP Tools

The MCP server provides access to several powerful tools:

  • Custom CrewAI tools: Access specialized agent capabilities defined in the CrewAI configuration
  • Web search functionality: Perform internet searches directly through the API
  • Data analysis capabilities: Analyze datasets and extract insights

Using the CrewAI System

While the MCP server is one component, you can also use the full CrewAI system directly:

Running a Sequential Crew

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.

Running a Hierarchical Crew

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.

Customizing Your Crew

You can modify the system to suit your specific needs:

  • Edit src/crewai/config/agents.yaml to define custom agents
  • Modify src/crewai/config/tasks.yaml to create specific tasks
  • Update src/crewai/crew.py to add custom logic, tools and specific arguments
  • Change src/crewai/main.py to add custom inputs for your agents and tasks

How to add this MCP server to Cursor

There 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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later