Contract Information Extractor
by YanKe1816
README.md
# Contract Information Extractor
App Name: Contract Information Extractor
App Slug: contract-information-extractor
Version: 1.0.0
Support Email: sidcraigau@gmail.com
Contract Information Extractor is a read-only, stateless Cloudflare Workers MCP server for organizing explicitly stated information from user-supplied contract text. It does not store contract text, does not use login, OAuth, a database, external APIs, model APIs, file upload, OCR, PDF parsing, or external write operations.
## MCP Endpoint
Production identity endpoint:
```text
https://contract-information-extractor.sidcraigau.workers.dev/mcp
```
Local development uses:
```text
POST /mcp
```
## Routes
- `GET /` returns the Home review shell page.
- `GET /privacy` returns the Privacy page.
- `GET /terms` returns the Terms page.
- `GET /support` returns the Support page.
- `GET /health` returns stable JSON:
```json
{
"status": "ok",
"app": "contract-information-extractor",
"version": "1.0.0"
}
```
- `POST /mcp` supports JSON-RPC 2.0 MCP methods.
- `GET /.well-known/openai-apps-challenge` returns the configured OpenAI apps challenge value as plain text.
## MCP Methods
- `initialize`
- `tools/list`
- `tools/call`
## Tools
- `extract_contract_metadata`: extracts explicitly stated contract type, parties, effective date, expiration date, contract value, payment terms, and governing law.
- `extract_contract_clauses`: extracts explicitly present payment, termination, confidentiality, liability, intellectual property, and delivery clauses.
- `extract_contract_obligations`: organizes explicitly stated parties, obligations, deliverables, deadlines, and dependencies.
All tools share the same input shape:
```json
{
"contract_text": "The complete or partial contract text supplied by the user.",
"request_intent": "Optional requested action description."
}
```
`contract_text` is required and must be a non-empty string at runtime. `request_intent` is optional and is used only to reject requests outside the extraction scope.
Each tool returns `structuredContent` matching its `outputSchema`. Successful partial extraction is still `status: "success"`; unavailable fields are empty strings or empty arrays and are listed in `missing_fields`.
## Scope Boundaries
This app only extracts information directly supported by the supplied plain text. It does not provide legal advice and does not judge contract legality, validity, enforceability, breach, fairness, risk, or which party has greater responsibility. It does not recommend, modify, rewrite, draft, submit, send, save, or negotiate contract terms.
The current version accepts only plain text in `contract_text`.
## Local Development
Install dependencies:
```bash
npm install
```
Run the Worker locally:
```bash
npm run dev
```
Run type checks:
```bash
npm run typecheck
```
Run all automated tests:
```bash
npm test
```
Run MCP route regression tests:
```bash
npm run test:mcp:local
```
Run production route and MCP regression tests after deployment:
```bash
npm run test:mcp:production
```
This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues