AmritaGPT 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.
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 Management Dashboard: http://localhost:8000/dashboard
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"
}
}
}
}Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
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.
Search and manage your team's knowledge from MCP clients.
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.15 npm653MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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 MCP-capable AI assistants to browse, search, and retrieve cited, trust-aware answers from enterprise documents by converting them into a searchable knowledge base with provenance.Apache 2.0