Aegis MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ก๏ธ Aegis โ Enterprise-Grade AI Agent Platform
Multi-format document RAG ยท Multi-agent collaboration ยท MCP tool invocation ยท Fact-checking with self-correction ยท HITL human approval
Aegis (/หiหdสษชs/, Shield) is an out-of-the-box enterprise-grade AI agent application, designed around two main pillars: "Trustworthy Answers" and "Safe Execution":
Answer side: Multi-agent (Planner โ Retriever โ Auditor โ Answerer) division of labor, every answer goes through Auditor fact-checking; when evidence is insufficient, it states so honestly and never fabricates;
Execution side: Tool invocation is based on the standardized MCP (Model Context Protocol), combined with least-privilege whitelist + human approval for sensitive operations (HITL) to achieve secure isolation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ็จๆท / FastAPI / CLI โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๆ้ฎ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ Orchestrator๏ผๅคๆบ่ฝไฝ็ผๆๅจ๏ผ โ
โ โ
โ โ Planner ่งๅ๏ผๆ่งฃๅญ้ฎ้ข + ๅทฅๅ
ท่ฎกๅ โ
โ โก Retriever ๆฃ็ดข๏ผๆททๅๆฃ็ดข + MCP ๅทฅๅ
ทๆง่ก โ
โ โข Answerer ่ตท่๏ผๅบไบ่ฏๆฎใๅธฆๅผ็จ [C1][C2] โ
โ โฃ Auditor ๆ ธๆฅ๏ผ้ๆกๅฃฐๆ vs ่ฏๆฎ โ
โ โโ revise โโบ ๅธฆๅ้ฆ้ๆฃ/้็ญ๏ผโค3 ่ฝฎ๏ผ โ
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโ
โ ่ฏญไนๆฃ็ดข โ MCP ๅ่ฎฎ
โโโโโโโโโโโโโโผโโโโโโโโโโโโ โโโโโโโโโโโโโผโโโโโโโโโโโโโ
โ ็ฅ่ฏๅบ๏ผRAG๏ผ โ โ MCP ๅทฅๅ
ทๆๅกๅจ โ
โ PDF/DOCX/XLSX/PPTX/TXTโ โ calculator / kb_search โ
โ โ ่งฃๆ โ ๅๅ โ ๅ้ๅ โ โ doc_stats / โฆ โ
โ โ Chroma + BM25 ๆททๅ โ โ ๐ ๆๆๅทฅๅ
ท โ HITL ๅฎกๆน โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโจ Core Capabilities
Requirement | Implementation |
Multi-format document knowledge ingestion and semantic retrieval | PDF / Word / Excel / PPT / TXT parsing (including tables, slides, page-number positioning); recursive chunking; vector + BM25 hybrid retrieval (RRF fusion); local embeddings with no API Key required |
Multi-agent division of labor | Planner (planning) โ Retriever (retrieval + tools) โ Answerer (drafting with citations) โ Auditor (verification); on audit failure, automatically re-retrieves/answers with feedback, up to N rounds |
MCP-based standardized tool invocation with secure isolation | MCP server implemented on the official |
Auditor fact-checking and self-correction | Verifies each claim against evidence (supported/unsupported/contradicted) line by line, outputs confidence scores and revision suggestions; when evidence is insufficient, explicitly states so and refuses to fabricate, and may autonomously supplement retrieval |
HITL human intervention | Sensitive tools (send email/export/delete) trigger approval-request suspension, with execution resuming after approve/reject; three modes: |
Related MCP server: Works With Agents MCP Server
๐ Quick Start
# 1. ๅฎ่ฃ
๏ผPython 3.10+๏ผ
cd enterprise-rag-agent
pip install -e .
# 2.๏ผๅฏ้๏ผ้
็ฝฎ LLM โโ ้ป่ฎค็ฆป็บฟๆจกๅผๆ ้้
็ฝฎ๏ผๆฅๅ
ฅ็ๅฎๆจกๅ่งไธๆ
cp .env.example .env # ๅกซๅ
ฅ OPENAI ๅ
ผๅฎน็ API Key๏ผOpenAI/DeepSeek/Ollama ็ญ๏ผ
# 3. ไธ้ฎ็ซฏๅฐ็ซฏๆผ็คบ๏ผ่ชๅจ็ๆ 5 ็งๆ ผๅผๆ ทไพๆๆกฃ โ ๅ
ฅๅบ โ ้ฎ็ญ โ ๅฎกๆน๏ผๅ
จ้จ่ชๆ ก้ช๏ผ
aegis demo
# 4. ๅฏผๅ
ฅไฝ ่ชๅทฑ็ๆๆกฃ
aegis ingest ./your_docs
# 5. ๆ้ฎ๏ผๅคๆบ่ฝไฝๆตๆฐด็บฟ๏ผ
aegis ask "ไธ็บฟๅๅธๅบๅทฎไฝๅฎฟๆฅ้ไธ้ๆฏๅคๅฐ๏ผ"
# 6. ๅฏๅจ HTTP ๆๅก๏ผSwagger: http://127.0.0.1:8000/docs๏ผ
aegis serveRun the full pipeline with no API Key required: the default embedding model uses a local ONNX
(BAAI/bge-small-zh-v1.5, ~95MB auto-downloaded on first run), and the LLM uses a built-in deterministic
backend for end-to-end verification; to connect a real model, simply configure it in .env.
Connecting a Real LLM
Supports any OpenAI-compatible protocol endpoint:
# OpenAI / DeepSeek / ้ไน / ๆฌๅฐ vLLM
AEGIS_LLM_PROVIDER=openai
AEGIS_LLM_BASE_URL=https://api.deepseek.com/v1
AEGIS_LLM_API_KEY=sk-xxxx
AEGIS_LLM_MODEL=deepseek-chat
# ๆๆฌๅฐ Ollama๏ผๅซๅตๅ
ฅ๏ผๅฎๅ
จ็ฆป็บฟ๏ผ
AEGIS_LLM_PROVIDER=ollama
AEGIS_LLM_MODEL=qwen2.5:3b
AEGIS_EMBED_PROVIDER=ollama
AEGIS_EMBED_MODEL=nomic-embed-text๐ Documentation
Document | Content |
Architecture design, multi-agent collaboration protocol, security model | |
Deployment, configuration, LLM integration, MCP stdio mode | |
End-to-end self-verification report and verification methods |
๐ HTTP API
Method | Path | Description |
POST |
| Upload document for ingestion (multipart) |
POST |
| Batch ingestion by path |
GET |
| Document list |
DELETE |
| Delete document (sensitive โ HITL) |
POST |
| Ask a question (multi-agent pipeline) |
GET |
| Session status |
POST |
| Resume session after approval |
GET |
| Approval-request list |
POST |
| Approve/reject ( |
GET |
| MCP tool catalog / manual tool invocation |
GET |
| Health check |
๐งฉ MCP Tools
Exposed via the standard Model Context Protocol, accessible by any MCP client:
python -m aegis.mcp.server # ๆ ๅ stdio ๆๅกTool | Description | Security Level |
| AST whitelist safe calculation | โ Regular |
| Current time | โ Regular |
| Knowledge base semantic retrieval | โ Regular |
| Knowledge base statistics | โ Regular |
| Simulated email sending | ๐ Sensitive โ HITL |
| Export file (sandbox directory) | ๐ Sensitive โ HITL |
| Delete document | ๐ Sensitive โ HITL |
๐งช Testing and Verification
pip install -e ".[dev]"
pytest -q # ๅๅ
+ ้ๆๆต่ฏ๏ผๅ
จ้จ็ฆป็บฟๅฏ่ท๏ผ
aegis demo # ็ซฏๅฐ็ซฏๆผ็คบ๏ผๅซ 20+ ๆก่ชๆ ก้ชๆญ่จ๏ผ๐ Directory Structure
enterprise-rag-agent/
โโโ aegis/
โ โโโ llm/ # LLM ๆฝ่ฑกๅฑ๏ผOpenAI ๅ
ผๅฎน / Ollama / ็ฆป็บฟ็กฎๅฎๆง๏ผ
โ โโโ embeddings/ # ๅตๅ
ฅๅฑ๏ผfastembed ๆฌๅฐ / OpenAI / Ollama๏ผ
โ โโโ ingestion/ # ่งฃๆ๏ผ5 ๆ ผๅผ๏ผโ ๅๅ โ ๅ
ฅๅบ็ฎก้
โ โโโ retrieval/ # Chroma ๅ้ๅบ + BM25 ๆททๅๆฃ็ดข
โ โโโ mcp/ # MCP ๆๅกๅจ / ๅฎขๆท็ซฏ / ๅฎๅ
จ็ญ็ฅ
โ โโโ agents/ # Planner / Retriever / Answerer / Auditor
โ โโโ hitl/ # ไบบๅทฅๅฎกๆน็ฎก็ๅจ
โ โโโ api/ # FastAPI ๆๅก
โ โโโ orchestrator.py # ๅคๆบ่ฝไฝ็ผๆๅจ๏ผ็ถๆๆบ + ๆ่ตทๆขๅค๏ผ
โ โโโ demo.py # ็ซฏๅฐ็ซฏๆผ็คบ
โ โโโ cli.py # ๅฝไปค่กๅ
ฅๅฃ
โโโ scripts/make_sample_docs.py # ๆ ทไพๆๆกฃ็ๆ
โโโ tests/ # pytest ๅฅไปถ
โโโ docs/ # ๆถๆ / ้จ็ฝฒ / ้ช่ฏๆๆกฃโ ๏ธ Security Notes
Sensitive tools are denied by default (
auto_deny); for production environments, it is recommended to keepinteractivehuman approval;export_fileonly allows writing to theexports/sandbox under the data directory;The calculator uses AST whitelist evaluation, with no
evalinjection surface;The project's
send_emailis a simulated implementation; before connecting a real email gateway, implement it yourself and keep HITL approval in place.
๐ License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
Related MCP Connectors
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Discover, plan and run tools across your connected business systems through one OAuth MCP endpoint
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA secure MCP gateway for enterprise AI tool execution, enabling governed invocation of business tools with authentication, RBAC, audit logging, PII redaction, and async processing.Apache 2.0
- AlicenseAqualityFmaintenanceProvides 14 MCP tools for AI agent infrastructure, enabling knowledge base queries, skill search, handoffs, blueprint validation, trust scoring, identity verification, SLA validation, and compliance checks.2227 PyPIMIT
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to securely call enterprise MCP tools with tenant-scoped RBAC, human approvals, audit logging, and multi-tool workflows across customer, order, document, and ticket data.-
- FlicenseNot gradedqualityCmaintenanceEnables an AI assistant to dynamically discover and invoke MCP tools for document search, employee information lookup, and mathematical calculations, with human-in-the-loop approval for sensitive operations.-