DEV Community

Franck Mercado
Franck Mercado

Posted on

Functional MCP AI System Diagram

Try it out at: https://mermaid.live

Mermaid Graph image

Mermaid Graph code

graph TD

    %% Node Definitions
    U[User]
    MT(MCP Tools / Host Application)
    MS(MCP Server / Capability Provider)
    LLM(Large Language Models)
    RAG(Retrieval-Augmented Generation)
    NLP(Natural Language Processing)
    GenAI[Generative AI]
    ET[External Tools & Resources]
    TD["Training Data (Corpus)"]
    VDB[Vector Database]

    %% 1. User Application Subgraph (The Host)
    subgraph User Interface ["(Host)"]
        U -- submits query/intent to --> MT
        MT -- renders final response to --> U
    end

    %% 2. Core AI & Orchestration Subgraph
    subgraph AI Processing & Orchestration
        LLM -- uses foundational capability of --> NLP
        LLM -- is a specific instance of --> GenAI
        RAG -- provides augmented context/prompt to --> LLM
    end

    %% 3. Capabilities and Context Subgraph (The Server's Role)
    subgraph External Capabilities ["(Data Resources)"]
        MS -- provides access to --> ET
        RAG -- executes retrieval query on --> VDB
        VDB -- stores vectorized embeddings for --> RAG
        TD -- pre-trains base model --> LLM
        ET -- includes external knowledge via --> TD
    end

    %% 4. Cross-Subgraph Functional Flow
    MT -- sends protocol request via Client to --> MS
    MS -- coordinates and invokes --> LLM
    MS -- implements retrieval logic via --> RAG

    LLM -- generates final output and returns to --> MS
    MS -- returns protocol response/result to --> MT
Enter fullscreen mode Exit fullscreen mode

Suggest any improvements.

Top comments (0)