Skip to main 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_plaban1981_crewai_search-0.1.0.tar.gz (40.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_plaban1981_crewai_search-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_plaban1981_crewai_search-0.1.0.tar.gz
  • Upload date:
  • Size: 40.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_plaban1981_crewai_search-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c82f15c5fc7e98f5354b0792c28af500f1fb39da94668a59a09a2c42d2ee88e
MD5 c77689eeeb406c073c26a30b6aca9691
BLAKE2b-256 758af4c55339cbb2bf0f8de35d1352e53a5c1db92cbc4019dbe57265d8bd2992

See more details on using hashes here.

File details

Details for the file iflow_mcp_plaban1981_crewai_search-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_plaban1981_crewai_search-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_plaban1981_crewai_search-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d4fe13f202545ad5c9956a3be5931afd073b99b79da48a4defa2c792a11719ac
MD5 661fb856144c7b4b78405bd24a94d4ca
BLAKE2b-256 dd09e7e365df5a63818eb9565e40a53f85565b802485a6772556f3133383969a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page