# aekanun2020/2026-2025-best-mcp architecture

> Architecture diagram of the GitHub repository aekanun2020/2026-2025-best-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aekanun2020/2026-2025-best-mcp
- Repository: https://github.com/aekanun2020/2026-2025-best-mcp

## Overview

This repository is a collection of selected MCP servers for MSSQL querying and retrieval-augmented generation (RAG), with SSE and Streamable HTTP variants. The main user workflows are: ask for MSSQL database context, then execute a query; or submit a RAG search request, with document ingestion and agent-added context supported by the documented RAG variants. The graph emphasizes these product branches and SupaRAG’s documented retrieval capabilities. Some implementation files were not sampled, so uncertain internal links are omitted.

Main entry points: [`rag-mcp-server-streamablehttp/main.py`](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/main.py) (RAG MCP entry), [`rag-mcp-server-streamablehttp/pyragdoc/core/search.py`](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/search.py) (Search orchestrator), [`rag-mcp-server-streamablehttp/app/mcp_server.py`](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/app/mcp_server.py) (RAG tools), [`rag-mcp-server-suparag/archive/authenticRAG.py`](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/archive/authenticRAG.py) (AuthenticRAG retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mssql["MSSQL servers"]
  node_mssql_tools["MSSQL MCP tools<br/>[mcp_server.py]"]
  node_mssql_db["Database utilities<br/>[database.py]"]
  node_sqlserver[("MSSQL database")]
  node_mssql_http["Streamable HTTP entry<br/>[main.py]"]
  node_mssql_http_tools["HTTP MCP tools<br/>[mcp_server.py]"]
end

subgraph group_rag_v3["Hybrid RAG"]
  node_rag_entry["RAG MCP entry<br/>[main.py]"]
  node_rag_tools["RAG tools<br/>[mcp_server.py]"]
  node_rag_services["Service registry<br/>[rag_services.py]"]
  node_processors["Document processors"]
  node_doc_models["Document models<br/>[documents.py]"]
  node_embeddings["Embedding providers<br/>[embedding.py]"]
  node_qdrant[("Qdrant storage<br/>[storage.py]")]
  node_thai_tokenizer["Thai tokenizer<br/>[thai_tokenizer.py]"]
  node_bm25["BM25 retrieval<br/>[bm25.py]"]
  node_rrf["RRF fusion<br/>[rrf.py]"]
  node_search["Search orchestrator<br/>[search.py]"]
end

subgraph group_supa["SupaRAG"]
  node_supa_mcp["SupaRAG MCP tools<br/>[main.py]"]
  node_supa_rag["AuthenticRAG retrieval<br/>[authenticRAG.py]"]
  node_opensearch[("OpenSearch indexes")]
  node_bge_qwen["BGE-M3 and Qwen"]
  node_streamlit["Streamlit interface<br/>[streamlit_app.py]"]
end

node_user(("MCP client"))
node_rag_client(("MCP client"))
node_ollama["Ollama service"]

node_user -->|"requests context or query"| node_mssql_tools
node_mssql_tools -->|"reads context; executes SQL"| node_mssql_db
node_mssql_db -.->|"queries metadata and data"| node_sqlserver
node_user -->|"uses /mcp"| node_mssql_http
node_mssql_http -.->|"serves MCP tools"| node_mssql_http_tools
node_rag_client -->|"searches or adds context"| node_rag_entry
node_rag_entry -.->|"routes MCP requests"| node_rag_tools
node_rag_entry -->|"initializes services"| node_rag_services
node_rag_entry -->|"creates tokenizer"| node_thai_tokenizer
node_rag_entry -->|"creates retriever"| node_bm25
node_rag_entry -->|"creates combiner"| node_rrf
node_rag_entry -->|"creates orchestrator"| node_search
node_rag_entry -->|"reconstructs stored chunks"| node_doc_models
node_rag_tools -.->|"processes submitted documents"| node_processors
node_rag_tools -.->|"requests embeddings"| node_embeddings
node_rag_tools -.->|"stores and retrieves chunks"| node_qdrant
node_search -->|"runs keyword retrieval"| node_bm25
node_search -->|"embeds query"| node_embeddings
node_search -->|"runs semantic search"| node_qdrant
node_search -.->|"fuses hybrid results"| node_rrf
node_bm25 -->|"tokenizes query"| node_thai_tokenizer
node_qdrant -->|"stores and restores chunks"| node_doc_models
node_embeddings -.->|"requests vectors"| node_ollama
node_rag_client -->|"requests RAG"| node_supa_mcp
node_supa_mcp -->|"invokes retrieval"| node_supa_rag
node_supa_rag -->|"searches dual indexes"| node_opensearch
node_supa_rag -->|"uses retrieval and generation models"| node_bge_qwen
node_rag_client -.->|"uses RAG interface"| node_streamlit

click node_mssql_tools "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server/app/mcp_server.py"
click node_mssql_db "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server/app/database.py"
click node_mssql_http "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server-streamablehttp/main.py"
click node_mssql_http_tools "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server-streamablehttp/app/mcp_server.py"
click node_rag_entry "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/main.py"
click node_rag_tools "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/app/mcp_server.py"
click node_rag_services "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/app/rag_services.py"
click node_processors "https://github.com/aekanun2020/2026-2025-best-mcp/tree/main/rag-mcp-server-streamablehttp/pyragdoc/core/processors"
click node_doc_models "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/models/documents.py"
click node_embeddings "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/embedding.py"
click node_qdrant "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/storage.py"
click node_thai_tokenizer "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/utils/thai_tokenizer.py"
click node_bm25 "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/bm25.py"
click node_rrf "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/rrf.py"
click node_search "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/search.py"
click node_supa_mcp "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/mcp-server/main.py"
click node_supa_rag "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/archive/authenticRAG.py"
click node_streamlit "https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/AuthenticRAG-Qwen2.5API/streamlit_app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mssql_tools,node_mssql_db,node_sqlserver,node_mssql_http,node_mssql_http_tools,node_user,node_rag_client toneBlue
class node_rag_entry,node_rag_tools,node_rag_services,node_processors,node_doc_models,node_embeddings,node_qdrant,node_thai_tokenizer,node_bm25,node_rrf,node_search toneAmber
class node_supa_mcp,node_supa_rag,node_opensearch,node_bge_qwen,node_streamlit toneMint
class node_ollama toneIndigo
```

## Components

### MSSQL servers

- [MSSQL MCP tools](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server/app/mcp_server.py): `mssql-mcp-server/app/mcp_server.py`
- [Database utilities](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server/app/database.py): `mssql-mcp-server/app/database.py`
- **MSSQL database**
- [Streamable HTTP entry](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server-streamablehttp/main.py): `mssql-mcp-server-streamablehttp/main.py`
- [HTTP MCP tools](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/mssql-mcp-server-streamablehttp/app/mcp_server.py): `mssql-mcp-server-streamablehttp/app/mcp_server.py`

### Hybrid RAG

- [RAG MCP entry](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/main.py): `rag-mcp-server-streamablehttp/main.py`
- [RAG tools](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/app/mcp_server.py): `rag-mcp-server-streamablehttp/app/mcp_server.py`
- [Service registry](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/app/rag_services.py): `rag-mcp-server-streamablehttp/app/rag_services.py`
- [Document processors](https://github.com/aekanun2020/2026-2025-best-mcp/tree/main/rag-mcp-server-streamablehttp/pyragdoc/core/processors): `rag-mcp-server-streamablehttp/pyragdoc/core/processors`
- [Document models](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/models/documents.py): `rag-mcp-server-streamablehttp/pyragdoc/models/documents.py`
- [Embedding providers](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/embedding.py): `rag-mcp-server-streamablehttp/pyragdoc/core/embedding.py`
- [Qdrant storage](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/storage.py): `rag-mcp-server-streamablehttp/pyragdoc/core/storage.py`
- [Thai tokenizer](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/utils/thai_tokenizer.py): `rag-mcp-server-streamablehttp/pyragdoc/utils/thai_tokenizer.py`
- [BM25 retrieval](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/bm25.py): `rag-mcp-server-streamablehttp/pyragdoc/core/bm25.py`
- [RRF fusion](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/rrf.py): `rag-mcp-server-streamablehttp/pyragdoc/core/rrf.py`
- [Search orchestrator](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-streamablehttp/pyragdoc/core/search.py): `rag-mcp-server-streamablehttp/pyragdoc/core/search.py`

### SupaRAG

- [SupaRAG MCP tools](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/mcp-server/main.py): `rag-mcp-server-suparag/mcp-server/main.py`
- [AuthenticRAG retrieval](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/archive/authenticRAG.py): `rag-mcp-server-suparag/archive/authenticRAG.py`
- **OpenSearch indexes**
- **BGE-M3 and Qwen**
- [Streamlit interface](https://github.com/aekanun2020/2026-2025-best-mcp/blob/main/rag-mcp-server-suparag/AuthenticRAG-Qwen2.5API/streamlit_app.py): `rag-mcp-server-suparag/AuthenticRAG-Qwen2.5API/streamlit_app.py`

### Other components

- **MCP client**
- **MCP client**
- **Ollama service**

## Connections

- MCP client → MSSQL MCP tools: requests context or query (evidence: `README.md`)
- MSSQL MCP tools → Database utilities: reads context; executes SQL (evidence: `mssql-mcp-server/app/mcp_server.py`)
- Database utilities → MSSQL database: queries metadata and data
- MCP client → Streamable HTTP entry: uses /mcp (evidence: `README.md`)
- Streamable HTTP entry → HTTP MCP tools: serves MCP tools
- MCP client → RAG MCP entry: searches or adds context (evidence: `README.md`)
- RAG MCP entry → RAG tools: routes MCP requests
- RAG MCP entry → Service registry: initializes services (evidence: `rag-mcp-server-streamablehttp/main.py`)
- RAG MCP entry → Thai tokenizer: creates tokenizer (evidence: `rag-mcp-server-streamablehttp/main.py`)
- RAG MCP entry → BM25 retrieval: creates retriever (evidence: `rag-mcp-server-streamablehttp/main.py`)
- RAG MCP entry → RRF fusion: creates combiner (evidence: `rag-mcp-server-streamablehttp/main.py`)
- RAG MCP entry → Search orchestrator: creates orchestrator (evidence: `rag-mcp-server-streamablehttp/main.py`)
- RAG MCP entry → Document models: reconstructs stored chunks (evidence: `rag-mcp-server-streamablehttp/main.py`)
- RAG tools → Document processors: processes submitted documents
- RAG tools → Embedding providers: requests embeddings
- RAG tools → Qdrant storage: stores and retrieves chunks
- Search orchestrator → BM25 retrieval: runs keyword retrieval (evidence: `rag-mcp-server-streamablehttp/pyragdoc/core/search.py`)
- Search orchestrator → Embedding providers: embeds query
- Search orchestrator → Qdrant storage: runs semantic search
- Search orchestrator → RRF fusion: fuses hybrid results (evidence: `rag-mcp-server-streamablehttp/pyragdoc/core/search.py`)
- BM25 retrieval → Thai tokenizer: tokenizes query
- Qdrant storage → Document models: stores and restores chunks (evidence: `rag-mcp-server-streamablehttp/pyragdoc/core/storage.py`)
- Embedding providers → Ollama service: requests vectors
- MCP client → SupaRAG MCP tools: requests RAG (evidence: `README.md`)
- SupaRAG MCP tools → AuthenticRAG retrieval: invokes retrieval (evidence: `rag-mcp-server-suparag/mcp-server/main.py`)
- AuthenticRAG retrieval → OpenSearch indexes: searches dual indexes (evidence: `README.md`)
- AuthenticRAG retrieval → BGE-M3 and Qwen: uses retrieval and generation models (evidence: `README.md`)
- MCP client → Streamlit interface: uses RAG interface (evidence: `README.md`)
