How crewaiinc/enterprise-mcp-server works
Project type and purpose
• This is a small Python-based MCP (Model Context Protocol) server implementation. It acts as an adapter or gateway layer (“microservice”) that exposes two endpoints—kickoff_crew and get_crew_status—to any MCP-capable client (e.g., Claude Desktop) and forwards requests to the CrewAI Enterprise API.
File structure
• Top-level files:
• crewai_enterprise_server.py → the single entry-point defining the MCP handlers and HTTP server
• pyproject.toml, uv.lock → package and dependency definitions (uses mcp[cli], uvicorn)
• assets/ → screenshots only, no runtime code
• README.md → usage, env-vars, architecture hints
• No database or multiple services—this is one process, launched via the mcp CLI/uvicorn.
README for additional insights
• Exposes two MCP tool commands: kickoff_crew, get_crew_status
• Relies on two environment variables pointing at app.crewai.com (URL + token)
• Integrates with Claude Desktop by registering this server under Developer Settings
Main components and their interactions
a. Claude Desktop (MCP client)
b. mcp CLI + uvicorn runner
c. CrewAI Enterprise MCP Server (crewai_enterprise_server.py)
• Endpoint: POST /kickoff_crew
• Endpoint: GET /get_crew_status
• Uses the mcp Python library to implement the protocol
d. External CrewAI Enterprise API (app.crewai.com)
• Invoked by the MCP server using the bearer token
Data flows:
1) User triggers a tool in Claude Desktop →
2) Claude sends an MCP-formatted HTTP request to localhost (mcp server) →
3) The server handler parses the request, uses the stored URL/Token →
4) It issues an HTTP call to the external CrewAI API →
5) Receives the response, wraps it in MCP response format →
6) Sends back to Claude Desktop
Architectural patterns and design principles
• Microservice/Adapter pattern: single-responsibility for MCP protocol translation
• Layer separation:
• Transport layer (uvicorn HTTP server)
• Protocol layer (mcp library handlers)
• Integration layer (HTTP client to external API)
• Configuration by environment (URL + token), no hard-coded secrets