ClauseGuard MCP
README.md
# ClauseGuard MCP
> **Procurement Contract Risk Gate, Auto-Renewal Cliff Scanner, Finance Approval SoD Auditor & Native Atlassian `rovo:mcp` Server for Business Teams**

[](https://github.com/ngominhtam1998/clauseguard-mcp)
[](PRIVACY.md)
[-B48A3E?style=flat-square)](manifest.yml)
[](LICENSE)
- **Live Interactive Sandbox (GitHub Pages):** https://ngominhtam1998.github.io/clauseguard-mcp/
- **Atlassian Forge App ID:** `ari:cloud:ecosystem::app/6faa6d99-6fc6-4d58-bd09-30805b9b48ab`
- **Forge Runtime & Storage:** `nodejs22.x` + `@forge/kvs` (zero external network egress, zero third-party API keys)
---
## Why Business Teams Need ClauseGuard MCP
Procurement, Legal, Finance, and Operations teams inside Jira and Confluence routinely approve six-figure vendor contracts across disconnected emails, PDF redlines, and purchase order tickets. Three silent failure modes cost mid-market enterprises hundreds of thousands of dollars per year:
1. **Predatory Legal Clauses Hidden in Vendor Paper** — Uncapped customer indemnification paired with `0.25x ACV` vendor liability caps, perpetual AI model training licenses on Customer Data, `Net 10` upfront non-refundable billing, and unilateral `14%` list-price escalations.
2. **Silent Evergreen Auto-Renewal Cliffs** — 60-to-90-day advance opt-out windows that expire unnoticed, locking Finance into multi-year auto-renewals at elevated uplift rates.
3. **Finance Control & Split-PO Structuring Bypass** — Requesters self-approving purchase orders or splitting a `$64,000` commitment into two sub-`$50k` POs (`$34k` + `$30k`) within 30 days to evade mandatory Legal Counsel + CFO Delegation-of-Authority gates.
**ClauseGuard MCP** embeds a deterministic, zero-egress Business Risk Gate directly inside **Jira Issue Panels**, **Jira Project Control Towers**, and **Atlassian's native `rovo:mcp` Model Context Protocol server** so both human reviewers and AI agents (Rovo Studio, Claude Desktop, Cursor, VS Code) enforce identical financial and legal guardrails.
---
## Architecture — 100% Runs on Atlassian + Native `rovo:mcp`
```
┌────────────────────────────────────────────────────────────────────────────┐
│ ATLASSIAN CLOUD BOUNDARY │
│ │
│ ┌───────────────────────────┐ ┌──────────────────────────────────┐ │
│ │ Jira Issue Panel & │ │ Native Atlassian rovo:mcp │ │
│ │ Jira Project Page │ │ Server: clauseguard-business-mcp│ │
│ │ (Strict-CSP Custom UI) │ │ 4 Typed Forge Action Tools │ │
│ └─────────────┬─────────────┘ └────────────────┬─────────────────┘ │
│ │ @forge/resolver │ Rovo Studio & │
│ ▼ ▼ External MCP │
│ ┌──────────────────────────────────────────────────────────────────────┐ │
│ │ Forge nodejs22.x Backend (src/index.js) + Daily Cliff Trigger │ │
│ │ Shared Deterministic Core Engine (src/core/engine.js) │ │
│ │ • 8-Dimension Contract Auditor • Auto-Renewal Cliff Scanner │ │
│ │ • Finance SoD & Split-PO Auditor • Legal Redline + Jira ADF │ │
│ └──────────────────────────┬───────────────────────────┬───────────────┘ │
│ ▼ ▼ │
│ Jira & Confluence REST APIs @forge/kvs Storage │
│ (read/write jira-work, page:confluence) (Tenant-Isolated Snapshots) │
│ │
│ ZERO EXTERNAL EGRESS · ZERO API KEYS │
└────────────────────────────────────────────────────────────────────────────┘
```
### Exposed Native `rovo:mcp` Tools (`modules.rovo:mcp`)
Declared directly in [`manifest.yml`](manifest.yml) under `clauseguard-business-mcp`:
| MCP Tool (`action` key) | Verb | Deterministic Capability |
|---|---|---|
| `audit-vendor-contract` | `GET` | Audits MSA/DPA/SaaS clauses across 8 dimensions (liability cap vs ACV, auto-renewal cliff, payment terms, DPA/SOC 2/breach SLA, price uplift, AI-training IP trap, termination/data-return, assignment/SLA), returning `0–100` risk score, Grade `A–F`, `$USD` exposure breakdown, and exact `§section` / line citations. |
| `scan-renewal-cliffs` | `GET` | Calculates exact UTC opt-out cutoff dates across the vendor portfolio, buckets contracts into `EXPIRED / CRITICAL (<=14d) / WARNING (<=45d) / SAFE / MANUAL_RENEWAL`, totals locked-in `$USD` auto-renewal exposure, and ranks priority cancellation actions. |
| `check-approval-sod` | `GET` | Audits procurement approval chains for Segregation of Duties (`requester !== approver`), tiered Delegation of Authority (`<$10k` Dept Manager, `$10k–$49,999` VP Finance, `>=$50k` Legal Counsel + CFO), rolling 30-day **Split-PO structuring evasion**, high-risk Legal escalation, and cost-center budget overruns. |
| `draft-redline-brief` | `CREATE` | Generates prioritized (`P0 BLOCKER / P1 HIGH / P2 STANDARD`) drop-in counter-proposal legal clauses, fallback negotiation positions, cross-functional checklists, Markdown export, and Atlassian Document Format (ADF v1) payloads with `@forge/kvs` audit snapshots and optional Jira ticket comment posting. |
---
## Live Application Views
| Contract Clause Auditor (8-Point Risk Gate) | Auto-Renewal Cliff Calendar |
|---|---|
|  |  |
| Finance SoD & Split-PO Structuring Matrix | Native `rovo:mcp` JSON-RPC 2.0 Explorer |
|---|---|
|  |  |
| Legal Redline Memo & Jira ADF Generator |
|---|
|  |
---
## Local Verification & Forge Deployment
Zero heavy bundlers (`< 350 MB` peak RAM). Requires Node.js `>= 20`.
```bash
# 1. Install dependencies
npm install
# 2. Sync Custom UI + GitHub Pages sandbox, validate @forge/manifest, and run all 20 tests
npm run verify
# 3. Validate via Atlassian Forge CLI (0 errors, 0 warnings)
forge lint
# 4. Deploy to production & install on Jira Cloud
forge deploy -e production --non-interactive
forge install --upgrade --non-interactive -e production -p jira -s <your-site>.atlassian.net
```
## Privacy & Security
ClauseGuard MCP is **100% Runs on Atlassian eligible** with zero external domains in `permissions.external`, zero external API keys, and tenant-isolated `@forge/kvs` audit snapshots. See [PRIVACY.md](PRIVACY.md).
## License
Released under the [MIT License](LICENSE). Copyright © 2026 Ngo Minh Tam.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues