Spaces:
Sleeping
π IntegraChat
Multi-Tenant Autonomous MCP Platform
Enterprise-grade AI with autonomous agents, secure multi-tenant RAG, real-time web search, red-flag governance, and analytics.
π Table of Contents
- Overview
- Purpose
- Key Features
- Technology Stack
- System Architecture
- Project Structure
- Getting Started
- Why IntegraChat Stands Out
- Submission Metadata
- License
π Overview
IntegraChat is an enterprise-ready, multi-tenant AI platform built to demonstrate the full capabilities of the Model Context Protocol (MCP) in a real production-style environment.
It combines autonomous tool-using agents, RAG retrieval, live web search, and admin governance under strict tenant isolation, powered by Groq's Llama-3.1-8B.
IntegraChat is a complete "MCP in Action" ecosystem β ideal for enterprise demos, research, production scaffolds, and governance-focused AI deployments.
π― Purpose
IntegraChat showcases how MCP can power intelligent, governed, multi-tenant AI systems with real-world requirements:
- π Isolation & Access Control - Strict tenant separation
- π‘οΈ Compliance & Red-Flag Detection - Automated safety monitoring
- π€ Tool-Aware Autonomous Reasoning - Dynamic tool selection
- π RAG + Web Search Hybrid AI - Best of both worlds
- π Analytics & Observability - Full system insights
- βοΈ Admin Governance Workflows - Enterprise-ready controls
π§© Key Features
1. π€ Autonomous MCP Agents
Agents can intelligently:
- β Analyze user intent and context
- β Detect sensitive or unsafe content
- β Dynamically select tools (RAG, Web, Admin, etc.)
- β Retrieve tenant-private knowledge
- β Pull real-time data from the internet
- β Trigger admin alerts when needed
- β Respond using Groq's Llama-3.1-8B
2. π Enterprise RAG System
- MiniLM embeddings for semantic search
- Supabase + pgvector for vector storage
- Strict multi-tenant RLS enforcement for security
- Multiple format support: PDF / DOCX / TXT / URL ingestion
- Intelligent chunking + semantic search
3. π Live Web Search Tool
- Real-time news and information
- General web search capabilities
- Fact-checking & fresh data retrieval
- Multiple provider support (DuckDuckGo, SerpAPI, Bing)
4. π¨ Red-Flag Governance Engine
Admins configure rules to:
- β Block unsafe queries automatically
- π Log violations for audit trails
- π Trigger admin alerts in real-time
Example rules: salary, delete all data, confidential client info
5. π Analytics Dashboard
Comprehensive insights for:
- π Query volume and trends
- π§ Tool usage statistics
- π― RAG performance metrics
- π¨ Red-flag violation tracking
- π§ Agent reasoning traces
- π₯ Tenant activity monitoring
6. π’ Multi-Tenant Isolation
Each tenant gets:
- π Private agents
- π¦ Private knowledge base
- βοΈ Private admin rules
- π Private analytics
Isolation is guaranteed via Supabase Row-Level Security (RLS).
π Technology Stack
Backend
| Technology | Purpose |
|---|---|
| FastAPI | High-performance API framework |
| MCP Client + Servers | Model Context Protocol implementation |
| Supabase | Auth + Storage + pgvector database |
| MiniLM Embeddings | Semantic search embeddings |
| Groq Llama-3.1-8B | LLM inference engine |
| DuckDuckGo Search | Web search provider |
| Slack / Email | Alerting system |
Frontend
| Technology | Purpose |
|---|---|
| React 18 | Modern UI framework |
| TailwindCSS | Utility-first styling |
| Zustand | State management |
| WebSocket | Real-time streaming |
| Admin Dashboard | Analytics & governance UI |
π§± System Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React) β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β Chat UI β β Admin β βAnalytics β βWebSocket β β
β β β β Panel β β Dashboardβ βStreaming β β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β HTTP/WebSocket
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Client (FastAPI) β
β β’ Intent handling β
β β’ Red-flag scanning β
β β’ Tool selection logic β
β β’ Groq Llama-3.1 integration β
β β’ Event logging β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Protocol
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Servers β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β RAG Server β β Web Search β β Admin Server β β
β β (Knowledge) β β (Live) β β (Governance) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Supabase Database β
β β’ Authentication β
β β’ pgvector (embeddings) β
β β’ Row-Level Security (RLS) β
β β’ Storage β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Project Structure
IntegraChat/
βββ backend/
β βββ api/
β β βββ main.py
β β βββ routes/
β β β βββ agent.py
β β β βββ rag.py
β β β βββ web.py
β β β βββ admin.py
β β β βββ analytics.py
β β βββ services/
β β β βββ agent_orchestrator.py
β β β βββ intent_classifier.py
β β β βββ redflag_detector.py
β β β βββ tool_selector.py
β β β βββ prompt_builder.py
β β β βββ llm_client.py
β β βββ mcp_clients/
β β β βββ rag_client.py
β β β βββ web_client.py
β β β βββ admin_client.py
β β βββ models/
β β β βββ requests.py
β β β βββ responses.py
β β β βββ agent_decision.py
β β β βββ embeddings.py
β β βββ utils/
β β β βββ logging.py
β β β βββ supabase_client.py
β β β βββ tenant_context.py
β β β βββ security.py
β β βββ config.py
β β
β βββ mcp_servers/
β β βββ rag_server/
β β β βββ main.py
β β β βββ chunker.py
β β β βββ search.py
β β β βββ embeddings.py
β β β βββ ingestion/
β β β β βββ ingest_pdf.py
β β β β βββ ingest_docx.py
β β β β βββ ingest_txt.py
β β β β βββ ingest_url.py
β β β βββ db/
β β β β βββ documents_repo.py
β β β β βββ embeddings_repo.py
β β β βββ config.py
β β β
β β βββ web_server/
β β β βββ main.py
β β β βββ providers/
β β β β βββ ddg.py
β β β β βββ serpapi.py (optional)
β β β β βββ bing.py (optional)
β β β βββ utils.py
β β β
β β βββ admin_server/
β β βββ main.py
β β βββ redflag_rules.py
β β βββ alerts/
β β β βββ slack.py
β β β βββ email.py
β β β βββ webhook.py
β β βββ audit_logs.py
β β
β βββ workers/
β β βββ ingestion_worker.py
β β βββ analytics_worker.py
β β βββ scheduler.py
β β βββ celeryconfig.py
β β
β βββ tests/
β β βββ test_agent.py
β β βββ test_rag.py
β β βββ test_admin.py
β β βββ test_web.py
β β βββ test_end_to_end.py
β β
β βββ Dockerfile
β
βββ frontend/
β βββ src/
β β βββ components/
β β β βββ chat/
β β β β βββ ChatWindow.jsx
β β β β βββ MessageBubble.jsx
β β β β βββ ToolTraces.jsx
β β β βββ admin/
β β β β βββ RedFlagEditor.jsx
β β β β βββ TenantManager.jsx
β β β βββ analytics/
β β β βββ QueryStats.jsx
β β β βββ ToolUsageChart.jsx
β β β βββ RagEffectiveness.jsx
β β βββ pages/
β β β βββ ChatPage.jsx
β β β βββ AdminPage.jsx
β β β βββ AnalyticsPage.jsx
β β βββ store/
β β β βββ chatStore.js
β β β βββ adminStore.js
β β β βββ analyticsStore.js
β β βββ utils/
β β β βββ websocket.js
β β β βββ api.js
β β β βββ formatters.js
β β βββ App.jsx
β β βββ main.jsx
β βββ public/
β βββ package.json
β
βββ supabase/
β βββ migrations/
β β βββ 001_init.sql
β β βββ 002_embeddings.sql
β β βββ 003_redflag_rules.sql
β β βββ 004_analytics_tables.sql
β βββ seed/
β β βββ default_redflags.sql
β β βββ demo_tenants.sql
β βββ policies/
β β βββ rls_tenant_documents.sql
β β βββ rls_tenant_embeddings.sql
β β βββ rls_admin_rules.sql
β βββ functions/
β β βββ vector_search.sql
β βββ README.md
β
βββ docs/
β βββ architecture-diagram.png
β βββ sequence-mcp-agent.png
β βββ api-spec.md
β βββ mcp-server-protocol.md
β βββ rag-pipeline.md
β
βββ scripts/
β βββ run_dev.sh
β βββ build_all.sh
β βββ reset_db.sh
β βββ run_workers.sh
β
βββ docker-compose.yml
βββ README.md
βββ LICENSE
π Getting Started
Prerequisites
Before you begin, ensure you have the following installed:
- β Python 3.10+
- β Node.js 18+
- β Supabase project (with pgvector extension)
- β Groq API key
- β DuckDuckGo Search key (optional, if configured)
- β Slack/Email webhook for alerts (optional)
Backend Setup
Navigate to backend directory
cd backendInstall dependencies
pip install -r requirements.txtConfigure environment variables
cp .env.example .env # Edit .env and fill in your Supabase + Groq keysRun the development server
uvicorn api.main:app --reload
Frontend Setup
Navigate to frontend directory
cd frontendInstall dependencies
npm installStart the development server
npm run dev
Quick Start with Docker
docker-compose up -d
β¨ Why IntegraChat Stands Out
| Feature | Description |
|---|---|
| π€ True MCP-Native | Autonomous agents (not static prompts) |
| π‘οΈ Enterprise Governance | Regex-based red-flag rules system |
| π Hybrid Intelligence | RAG + web search reasoning |
| π’ Production-Grade | Multi-tenant design with strict Supabase RLS |
| π Full Observability | Logs, analytics, tool events, violations |
| π― Demo-Ready | Perfect for enterprise presentations |
π· Submission Metadata
| Field | Value |
|---|---|
| Track | MCP in Action |
| Category | Enterprise |
| Tag | mcp-in-action-track-enterprise |
| Project Name | IntegraChat |
Short Summary
IntegraChat is a multi-tenant AI platform where autonomous MCP-powered agents retrieve private knowledge using RAG, access live web information, and enforce admin-defined safety rules via a red-flag compliance system. It includes an analytics dashboard, tool-selection engine, and strict tenant isolation.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π¬ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π Acknowledgments
- Built with Model Context Protocol (MCP)
- Powered by Groq for LLM inference
- Database powered by Supabase
Made with β€οΈ for the MCP community