contract-sentinel
README.md
# π‘οΈ C Sentinel β Autonomous AI Contract Sentinel
> **An enterprise-grade, MCP-powered AI agent system for automated contract ingestion, clause extraction, continuous risk monitoring, and real-time LLM integration.**
---
## π Live Demos
- **Frontend Dashboard (Vercel):** [https://contract-sentinel-seven.vercel.app](https://contract-sentinel-seven.vercel.app)
- **MCP Backend Endpoint (NitroCloud):** `https://c-sentinel-6a6ca7d2-dcoders-srmist.app.nitrocloud.ai`
---
## π Overview
**C Sentinel** is an autonomous risk-analysis agent built to solve enterprise legal bottlenecks. Powered by the **Model Context Protocol (MCP)**, C Sentinel continuously monitors, ingests, and analyzes legal agreements (MSAs, NDAs, SLAs) to extract critical risk factors, uncapped liabilities, and dangerous SLA terms.
It provides both a modern, interactive web dashboard for human operators and a standardized MCP server interface that seamlessly integrates with external LLMs like ChatGPT and Claude.
---
## β¨ Key Features
- **π Automated Contract Ingestion:** Ingest vendor agreements and instantly calculate overall risk scores (0β100%).
- **π§ Continuous Sentinel Analysis Cycle:** Autonomous background cycle that audits all stored agreements for non-compliant clauses.
- **β‘ Model Context Protocol (MCP) Native:** Exposed as a streamable MCP server, allowing LLMs (like ChatGPT or Claude Desktop) to invoke tool actions (`ingest`, `fetch_contracts`, `run_analysis`) natively.
- **π Real-Time Operations Dashboard:** Built with React, Vite, and Tailwind CSS to display contract velocity, risk breakdown charts, and active alerts.
---
## ποΈ Architecture & Deployment
```
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ChatGPT / LLM Connectors β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β (MCP Protocol)
βΌ
ββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ
β Vercel Frontend ββββΆβ NitroCloud Backend β
β (React / Vite) β β (NitroStack MCP Server) β
ββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββ
```
| Component | Tech Stack | Hosting Platform |
| :--- | :--- | :--- |
| **Frontend UI** | React, TypeScript, Vite, Tailwind CSS | **Vercel** |
| **Agent Backend** | Node.js, TypeScript, NitroStack MCP SDK | **NitroCloud** |
| **Repository** | Monorepo Structure (`/ui` & `/server`) | **GitHub** |
---
## βοΈ Environment Variables
### Frontend (`/ui`)
Configure the backend connection URL in your `.env` file or deployment settings:
```env
VITE_API_BASE_URL=https://c-sentinel-6a6ca7d2-dcoders-srmist.app.nitrocloud.ai
```
---
## π οΈ Local Development Quickstart
### Prerequisites
- Node.js (v18+)
- npm / pnpm
### 1. Clone the Repository
```bash
git clone https://github.com/sachin0610-srm/contract-sentinel.git
cd contract-sentinel
```
### 2. Run Backend (MCP Server)
```bash
cd server
npm install
npm run dev
```
### 3. Run Frontend UI
```bash
cd ../ui
npm install
npm run dev
```
Open `http://localhost:5173` to access the local dashboard.
---
## π Connecting to ChatGPT / External MCP Clients
1. Open **ChatGPT** $\rightarrow$ **Settings** $\rightarrow$ **Developer Mode / Apps**.
2. Add a new **MCP Connector / Server**.
3. Set **Server URL** to:
```text
https://c-sentinel-6a6ca7d2-dcoders-srmist.app.nitrocloud.ai/mcp
```
4. Set **Authentication** to `No Auth` and save!
---
## π₯ Authors & Credits
Developed with β€οΈ for the Hackathon by **Sachin K** ([@sachin0610-srm](https://github.com/sachin0610-srm)).
TDQS
A4.4/5.0
Scored across 4 tools
Disambiguation5/5
Each tool serves a distinct role: profile setup, contract ingestion, automated analysis, and portfolio review. There is no functional overlap between them.
Naming Consistency5/5
All tool names follow a clear verb-noun pattern using hyphens (set-, ingest-, run-, review-), making the naming predictable and consistent.
Tool Count5/5
With four tools, the set is well-scoped for a contract monitoring workflow: setup, input, processing, and output. No redundancy or excessive expansion.
Completeness4/5
The core lifecycle (profile setup, contract ingestion, analysis, and review) is covered. Minor gaps like deleting or manually updating contracts are not essential for the sentinel's autonomous monitoring purpose.