Home / MCP / MCP Crew AI Server
Lightweight Python MCP server that loads agents and tasks from YAML and runs CrewAI workflows locally
Configuration
View docs{
"mcpServers": {
"mcp_crew_ai": {
"command": "uvx",
"args": [
"mcp-crew-ai",
"--agents",
"path/to/agents.yml",
"--tasks",
"path/to/tasks.yml"
]
}
}
}You can run, manage, and create CrewAI workflows with a lightweight Python-based MCP server. It uses the Model Context Protocol (MCP) to talk to large language models and tools, enabling you to orchestrate multi-agent tasks with minimal setup and flexible configurations.
You interact with the MCP server through an MCP client to run pre-configured workflows and manage agents and tasks. Start by preparing your agents and tasks definitions in YAML files, then launch the server or connect to it from your MCP client to trigger workflows, monitor progress, and retrieve results. You can tailor the workflow topic, processing style, and variables to fit your scenario. The server supports both local development in STDIO mode and remote usage through standard MCP commands.
pip install mcp-crew-ai
```
```
# Option 2: Install from GitHub
pip install git+https://github.com/adam-paterson/mcp-crew-ai.git
```
```
# Option 3: Clone and Install
git clone https://github.com/adam-paterson/mcp-crew-ai.git
cd mcp-crew-ai
pip install -e .Prerequisites you need before installation: Python 3.11 or newer, MCP SDK, CrewAI, and PyYAML. You will install via pip and then run the server with your YAML configuration files.
Configuration files define how the server creates and runs workflows. Create two YAML files:
- agents.yml to describe each agent’s role, goals, and backstory.
- tasks.yml to describe the tasks, their descriptions, expected outputs, and how they are assigned.
Example agents.yml:
``
zookeeper:
role: Zookeeper
goal: Manage zoo operations
backstory: >
You are a seasoned zookeeper with a passion for wildlife conservation...
`
Example tasks.yml:
`
write_stories:
description: >
Write an engaging zoo update capturing the day's highlights.
expected_output: 5 engaging stories
agent: zookeeper
output_file: zoo_report.md
``
To run, point the server at your agents and tasks files and start listening for MCP clients to connect.
Usage patterns you can follow: - Start a session using your YAML files to load agents and tasks automatically. - Run pre-configured workflows via the MCP client’s run_workflow tool and collect results. - Develop locally by running the server in STDIO mode to test interactions before deploying.
Variable substitution lets you tailor templates at runtime. You can pass additional variables to replace placeholders in your YAML files, such as {topic} or {year}, to customize the workflow without editing the source files each time.
If you encounter issues starting the server, verify that Python 3.11+ is installed and that PyYAML is available. Ensure your agents.yml and tasks.yml paths are correct and that the YAML syntax is valid. If you need to customize the runtime topic or processing style, provide the corresponding options at startup.
Execute pre-configured workflows via the MCP run_workflow tool to orchestrate multi-agent tasks.