MCP ExplorerExplorer

Crewai Mcp

@plaban1981on a year ago
3 MIT
FreeCommunity
AI Systems
Build an MCP agent using Crewai

Overview

What is Crewai Mcp

Crewai-MCP is a framework for building an MCP agent using Crewai, designed to facilitate research and content generation through various integrated services.

Use cases

Use cases for Crewai-MCP include generating research summaries from web searches, creating AI-generated images for presentations, and compiling search results into structured formats for analysis.

How to use

To use Crewai-MCP, run the Streamlit application, which acts as the user interface. It communicates with the API layer, which processes requests and interacts with the CrewAI core to generate research outputs and summaries.

Key features

Key features of Crewai-MCP include a user-friendly Streamlit interface, integration with external APIs for web search and AI image generation, and the ability to generate and download research summaries and images.

Where to use

Crewai-MCP can be used in fields such as academic research, content creation, and data analysis, where automated information retrieval and summarization are beneficial.

Content

Crewai-MCP

Build an MCP agent using Crewai

Workflow of MCP powered Crewai RStudy Assistant


graph TD
    %% User Interface Layer
    A["🌐 User Interface<br/>Streamlit App<br/>(streamlit_app.py)"] --> B["⚙️ API Layer<br/>main_api.py"]
    
    %% API Processing
    B --> C["🚀 Subprocess Call<br/>python main.py {topic}"]
    
    %% CrewAI Core
    C --> D["🤖 CrewAI Application<br/>(main.py)<br/>Research Agent + Writer Agent"]
    
    %% MCP Protocol Communication
    D --> E["📡 MCP Protocol<br/>Model Context Protocol<br/>Communication Layer"]
    
    %% MCP Servers
    E --> F["🔍 Search MCP Server<br/>(servers/search_server.py)<br/>Python Implementation"]
    E --> G["🎨 Image MCP Server<br/>(servers/image_server.py)<br/>Python Implementation"]
    E --> H["📁 Filesystem MCP Server<br/>(NPX - Disabled)<br/>Node.js v14 Issue"]
    
    %% External APIs
    F --> I["🦁 Brave Search API<br/>Web Search Results"]
    G --> J["🎭 Segmind API<br/>AI Image Generation"]
    
    %% File Output Generation
    D --> K["📄 File Generation"]
    K --> L["📊 search_results.json<br/>Search Data"]
    K --> M["📝 summary.txt<br/>Research Summary"]
    K --> N["🖼️ generated_images/<br/>AI Generated Images"]
    
    %% Result Processing
    B --> O["🔄 Result Extraction<br/>File Detection & Parsing"]
    O --> P["📋 Summary Extraction<br/>Multiple Pattern Recognition"]
    O --> Q["🔍 Search Results Parsing<br/>JSON Processing"]
    O --> R["🖼️ Image Collection<br/>File Listing"]
    
    %% Display Results
    P --> S["📑 Summary Tab<br/>Streamlit Display"]
    Q --> T["🔍 Search Results Tab<br/>Streamlit Cards"]
    R --> U["🎨 Generated Images Tab<br/>Streamlit Gallery"]
    
    %% User Features
    S --> V["💾 Download Summary<br/>Text File"]
    U --> W["💾 Download Images<br/>ZIP Archive"]
    
    %% System Monitoring
    A --> X["📊 System Status<br/>MCP Server Health Check"]
    
    %% Styling for different component types
    classDef streamlit fill:#ff6b6b,stroke:#ff5252,stroke-width:3px,color:#fff
    classDef crewai fill:#4ecdc4,stroke:#26a69a,stroke-width:3px,color:#fff
    classDef mcp fill:#45b7d1,stroke:#039be5,stroke-width:3px,color:#fff
    classDef api fill:#96ceb4,stroke:#66bb6a,stroke-width:3px,color:#fff
    classDef files fill:#feca57,stroke:#ff9800,stroke-width:3px,color:#fff
    
    %% Apply styles
    class A,S,T,U,V,W,X streamlit
    class D crewai
    class E,F,G,H mcp
    class I,J api
    class K,L,M,N,O,P,Q,R files
    class B,C streamlit

image

🏗️ Architecture Breakdown

📱 Frontend Layer

  • streamlit_app.py - Main web interface with beautiful UI
  • streamlit_app_backup.py - Backup version for safety

🔄 API & Integration Layer

  • main_api.py - Bridge between Streamlit and CrewAI
  • app.py - Alternative interface implementation

🤖 AI Core Layer

  • main.py - CrewAI agents (Research + Writer)
  • debug_summary.py - Summary extraction utilities

📡 MCP Server Layer

  • servers/search_server.py - Web search via Brave API
  • servers/image_server.py - Image generation via Segmind API

📊 Data Storage Layer

  • servers/search_results/ - JSON files with search data (40+ topics)
  • servers/images/ - Generated AI images (30+ visuals)

⚙️ Configuration & Utilities

  • requirements.txt - Dependencies management
  • setup_nodejs.py - Environment setup
  • test_python_version.py - Compatibility testing
image

Run the Application without the UI

python main.py

Run the Application using streamlit

# Launch Streamlit app
 streamlit run streamlit_app.py

Streamlit Interface

image image image

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers