AmritaGPT MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AmritaGPT MCP ServerWhat is the attendance policy for B.Tech 2023 regulations?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AmritaGPT: Institutional Intelligence Infrastructure for the AI-Native University
"One intelligence layer for every document, department, workflow, and AI agent."
AmritaGPT is an enterprise-grade institutional intelligence infrastructure built for Amrita Vishwa Vidyapeetham. It converts the university's heterogeneous, distributed document ecosystem into a governed, searchable, reasoning-ready knowledge layer and exposes it universally through the Model Context Protocol (MCP).
šļø System Architecture
AmritaGPT is structured across 6 core pillars:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā AI USERS & AGENTS ā
ā Students ⢠Faculty ⢠Admin ⢠Research ā
āāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāā
ā AMRITAGPT MCP SERVER ā
ā Tools ⢠Resources ⢠Prompts ⢠Auth ā
āāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāā
ā HYBRID RETRIEVAL ENGINE ā
ā ā
ā Dense Vector (BGE) + BM25 Lexical ā
ā Reciprocal Rank Fusion (RRF k=60) ā
ā Cross-Feature Precision Reranking ā
ā Role-Based Pre-Retrieval ACL ā
āāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāā
ā¼ ā¼
āāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāā
ā VECTOR STORE ā ā METADATA DB ā
ā FastEmbed ONNX 384 ā ā SQLite Relational ā
ā Cosine Similarity ā ā ACLs & Lineage ā
āāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāā
ā²
ā
āāāāāāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāā
ā CONTINUOUS INGESTION PIPELINE ā
ā ā
ā PDF (PDFium) ⢠DOCX ⢠XLSX ⢠PPTX ā
ā Structure-Aware Semantic Chunking ā
ā Contextual Enrichment (Hierarchy/Meta) ā
ā Checksum Deduplication (Idempotency) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāRelated MCP server: mcp-rag-bridge
š Key Architectural Innovations
1. Structure-Aware Semantic Chunking & Contextual Enrichment
Unlike naive fixed-token chunking, AmritaGPT preserves document hierarchy:
Contextual Prefixes: Every chunk is prefixed with the institutional path:
[Institution: Amrita Vishwa Vidyapeetham] | Dept: Academic Admin Office | Doc: btech-regulations-2023 | Section: R.4 Attendance | Page: 4Semantic Boundaries: Splits occur cleanly on regulation rules, sub-sections, paragraphs, or tabular lines, avoiding split meanings.
Neighbor Linking: Chunks maintain
prev_chunk_idandnext_chunk_idpointers for dynamic context expansion during retrieval.
2. Multi-Stage Hybrid Retrieval
Dense Vector Search: Powered by
BAAI/bge-small-en-v1.5running on local ONNX runtime for conceptual matching.Sparse Lexical Search: Powered by
rank_bm25for exact regulation codes (e.g.R.4,R.14), course numbers (e.g.23CSE101), and faculty names.Reciprocal Rank Fusion (RRF): $$RRF(d) = \sum_{m \in {dense, bm25}} \frac{1}{k + rank_m(d)} \quad (k=60)$$
Precision Cross-Feature Reranking: Evaluates query-passage cross-alignment, heading bonuses, exact identifier matches, and temporal freshness.
3. Institutional Access Control (RBAC) & Security
Pre-Retrieval Filtering: Enforces role boundaries (
public<student<faculty<admin) before candidates are searched, preventing unauthorized information leakage.Prompt Injection Defense: All retrieved documents are sanitized and treated strictly as untrusted data, preventing adversarial instruction override.
4. Grounded Generation & Citation Engine
Evidence-Bound Policy: If sufficient evidence exists, answers are constructed with inline citations
[Document, Section, Page, Year]. If evidence is insufficient, the system safely returns:"I couldn't find sufficient evidence in the institutional knowledge base."
Grounding Verifier: Automatically audits generated claims against retrieved evidence, computing a factual grounding score.
š ļø MCP Capabilities
AmritaGPT implements the official Model Context Protocol specification:
MCP Tools (Actions)
Tool | Description |
| Multi-stage hybrid search across institutional knowledge with access filtering. |
| Search the document catalog by title, department, or category. |
| Read full metadata, section list, and content of an institutional document. |
| Read a specific section, regulation clause, or table from a document. |
| Dedicated search for university policies, disciplinary rules, and guidelines. |
| Search official B.Tech/M.Tech/PhD ordinances and attendance rules. |
| Retrieve recent notifications, circulars, and calendar dates. |
| Compare two document versions to audit curriculum or policy changes. |
| Discover companion files within the same department or academic program. |
| End-to-end grounded RAG answer generation with verified citations. |
| Real-time observability: total documents, chunks, queries, and latency. |
| Run automated benchmark suite measuring Recall@1, Recall@5, and MRR. |
MCP Resources (Knowledge Objects)
amritagpt://system/stats: Live system health, document count, and index status.amritagpt://policies/current: Summary of currently active university regulations.amritagpt://departments/list: Catalog of university departments and repository sizes.
MCP Prompts (Reusable Agent Workflows)
academic_advising: Guide students through curriculum, prerequisites, and graduation requirements.policy_compliance_check: Audit scenarios against institutional and examination rules.
š OpenAPI 3.1 REST API Gateway
AmritaGPT is 100% OpenAPI 3.1 compliant and exposes an interactive REST API alongside its MCP capabilities:
Interactive Swagger UI:
http://localhost:8000/docsReDoc Interactive Documentation:
http://localhost:8000/redocOpenAPI 3.1 JSON Specification:
http://localhost:8000/openapi.json(also exported toopenapi.json)OpenAPI YAML Specification:
openapi.yamlIntegrated MCP SSE Endpoint:
http://localhost:8000/mcp/sse
REST Endpoints Reference
Method | Path | Description |
|
| API identity, documentation links, and MCP SSE endpoint. |
|
| Index health check (documents, chunks, vector/BM25 status). |
|
| Hybrid search (Dense Vector + BM25 + RRF + Reranker) with access filtering. |
|
| End-to-end grounded generation with citations and grounding confidence. |
|
| Search university policies, disciplinary rules, and guidelines. |
|
| Search official B.Tech/M.Tech/PhD ordinances & attendance rules. |
|
| Search the document catalog by title, department, or keywords. |
|
| Retrieve full metadata and sections of an institutional document. |
|
| Compare two document versions to detect policy/curriculum revisions. |
|
| Observability metrics (total documents, chunks, query latency). |
|
| Run automated RAG evaluation benchmark suite. |
š Project Structure
C:\Users\Suz Machine Tech\RAG\
āāā amritagpt/
ā āāā __init__.py
ā āāā config.py # System configurations and paths
ā āāā api/
ā ā āāā __init__.py
ā ā āāā app.py # FastAPI OpenAPI REST Gateway with mounted MCP
ā ā āāā schemas.py # Pydantic schemas for all requests/responses
ā āāā ingestion/
ā ā āāā parser.py # Format-agnostic parser (PDF, DOCX, XLSX, PPTX)
ā ā āāā chunker.py # Structure-aware semantic chunker
ā ā āāā pipeline.py # Ingestion bus with checksum deduplication
ā āāā indexing/
ā ā āāā vector_store.py # Dense vector index (FastEmbed ONNX 384-dim)
ā ā āāā bm25_store.py # BM25 sparse lexical index
ā ā āāā metadata_store.py # SQLite relational metadata database
ā āāā retrieval/
ā ā āāā query_analyzer.py # Intent detection, entity extraction, temporal logic
ā ā āāā hybrid_search.py # Hybrid Dense + BM25 search with RRF
ā ā āāā reranker.py # Precision cross-feature reranker
ā ā āāā context_assembler.py # Evidence packager and neighbor expansion
ā āāā generator/
ā ā āāā grounded_engine.py # Grounded response synthesis
ā ā āāā citation_engine.py # Provenance and citation formatting
ā ā āāā verifier.py # Grounding and hallucination auditor
ā āāā security/
ā ā āāā access_control.py # Role-based ACL & prompt injection guard
ā āāā observability/
ā ā āāā telemetry.py # Metrics, query audit logs, evaluation framework
ā āāā mcp/
ā āāā server.py # MCPServer exposing tools, resources, prompts
āāā data/ # Institutional documents directory (316 files)
āāā storage/ # SQLite DB, vector embeddings, BM25 indices
āāā scripts/
ā āāā ingest_all.py # CLI runner for document ingestion
ā āāā export_openapi.py # Export openapi.json and openapi.yaml
ā āāā test_mcp_client.py # End-to-end MCP verification suite
ā āāā test_openapi_client.py # End-to-end OpenAPI REST verification suite
āāā openapi.json # Exported OpenAPI 3.1 JSON Specification
āāā openapi.yaml # Exported OpenAPI 3.1 YAML Specification
āāā mcp_config.json # MCP client configuration template
āāā run_server.py # Unified server entry point (MCP & OpenAPI)
āāā README.mdā” Quick Start
1. Ingest Institutional Documents
python scripts/ingest_all.py2. Run Verification Suites
# Run MCP Verification Suite
python scripts/test_mcp_client.py
# Run OpenAPI REST API Verification Suite
python scripts/test_openapi_client.py3. Start AmritaGPT Server
Option A: OpenAPI REST Gateway & Swagger UI (Port 8000)
python run_server.py --mode api --port 8000Then visit:
Interactive Swagger UI: http://localhost:8000/docs
ReDoc: http://localhost:8000/redoc
OpenAPI Spec: http://localhost:8000/openapi.json
MCP SSE: http://localhost:8000/mcp/sse
Option B: Standard MCP Stdio Server (for Claude Desktop / Cursor / Antigravity)
python run_server.py --mode mcp --transport stdio4. Configure in Claude Desktop / Cursor / Antigravity
Add the following to your claude_desktop_config.json or MCP settings:
{
"mcpServers": {
"amritagpt": {
"command": "python",
"args": [
"path/to/run_server.py",
"--mode",
"mcp",
"--transport",
"stdio"
],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}This server cannot be deployed
Maintenance
Related MCP Connectors
Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, deep-read, and build knowledge bases from Markdown, PDF, DOCX, and PPTX documents via MCP tools for retrieval, document navigation, and ingestion.16 npm631MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely search and ingest corporate documents via MCP, offering hybrid retrieval, PII sanitization, role-based access control, and citation validation.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search 580,000+ open-access papers, standards, textbooks, and legal documents, resolve identifiers such as RFCs, DOIs, and legal citations, download PDFs, and retrieve citations and metadata through MCP tools.MIT