Skip to main content
Glama
contract-sentinel

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.