document-integrity-validator-mcp 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ ## [1.0.2] - 2026-05-06
4
+
5
+ ### Improved
6
+
7
+ - Remove redundant UNKNOWN_DOCUMENT_TYPE sentence from check_document description.
8
+
9
+ ## [1.0.1] - 2026-05-06
10
+
11
+ ### Improved
12
+
13
+ - Improve tool descriptions: add exclusivity framing to both check_document and check_document_package.
14
+
15
+ ## [1.0.0] - 2026-05-06
16
+
17
+ ### Initial release
18
+
19
+ - `check_document` tool: assesses any document against its known international standard. Free tier: 10 calls/month per IP.
20
+ - `check_document_package` tool: assesses 2-20 related documents individually and cross-checks for numeric, party, reference, date, commodity, and port conflicts. Paid tier only.
21
+ - Vision support: accepts base64 image or extracted text or both.
22
+ - UNKNOWN_DOCUMENT_TYPE verdict for unrecognised documents -- refusal is correct behaviour.
23
+ - Structured verdict with agent_action, assessed_against, known_issuing_standard, and specific flags.
24
+ - Trial extension endpoint: 10 extra free calls per email address via POST /trial-extension.
25
+ - Stripe webhook for automated API key provisioning.
26
+ - getEffectiveLimit() helper for accurate quota display after trial extension.
27
+ - Free tier warning at 8 calls used (2 remaining).
28
+ - checkAccess() runs only inside tools/call branch -- never on tools/list or initialize.
package/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ UNLICENSED
2
+
3
+ Copyright (c) 2026 Kord Agencies Pte Ltd. All rights reserved.
4
+
5
+ This software is proprietary and confidential. No licence is granted to use,
6
+ copy, modify, merge, publish, distribute, sublicense, or sell copies of this
7
+ software or any portion of it without the prior written permission of
8
+ Kord Agencies Pte Ltd.
package/README.md ADDED
@@ -0,0 +1,147 @@
1
+ # Document Integrity Validator MCP
2
+
3
+ Before your agent accepts, processes, or acts on any document received from an external party -- verify it is internally consistent and matches the known standard for its type. One call. Any document. Machine-readable verdict.
4
+
5
+ ## What it does
6
+
7
+ Checks any document for internal consistency, completeness, and anomalies against the known international standard for that document type. Accepts base64 image or extracted text. Returns a structured verdict with a machine-readable `agent_action` field.
8
+
9
+ Supported standards include: ICAO Document 9303 (passports), Hague-Visby Rules 1968 (bills of lading), UCP 600 (trade finance documents), ISPM 12/IPPC/FAO (phytosanitary certificates), Vienna Convention on Road Traffic 1968 (driving licences), and more.
10
+
11
+ Returns `UNKNOWN_DOCUMENT_TYPE` rather than guessing on unfamiliar documents -- refusal is correct behaviour, not a failure.
12
+
13
+ AI-powered reasoning -- NOT a database lookup.
14
+
15
+ ## Tools
16
+
17
+ ### check_document (Free tier: 10 calls/month)
18
+
19
+ Checks a single document against its international standard.
20
+
21
+ **Input:**
22
+ - `document_text` (string, optional) -- extracted text from the document
23
+ - `document_image` (string, optional) -- base64 encoded image (raw base64 or data URL)
24
+ - `document_type_hint` (string, optional) -- agent belief about document type
25
+ - `issuing_jurisdiction` (string, optional) -- country or issuing body
26
+
27
+ At least one of `document_text` or `document_image` is required.
28
+
29
+ **Response:**
30
+ ```json
31
+ {
32
+ "agent_action": "PROCEED",
33
+ "verdict": "PASS",
34
+ "confidence": "HIGH",
35
+ "document_type_identified": "Bill of Lading",
36
+ "assessed_against": "Hague-Visby Rules 1968",
37
+ "known_issuing_standard": "IMO",
38
+ "flags": [],
39
+ "reason": "Document is internally consistent and compliant with Hague-Visby Rules 1968.",
40
+ "analysis_type": "AI-powered reasoning -- NOT a database lookup",
41
+ "checked_at": "2026-05-06T10:00:00.000Z",
42
+ "_disclaimer": "..."
43
+ }
44
+ ```
45
+
46
+ **agent_action values:**
47
+ - `PROCEED` -- document passed
48
+ - `VERIFY_MANUALLY` -- flags found, agent should flag for human review
49
+ - `HOLD` -- document failed, do not proceed
50
+ - `REFER_TO_HUMAN` -- document type unknown, refer for manual assessment
51
+
52
+ ### check_document_package (Paid tier only)
53
+
54
+ Checks 2-20 related documents individually then cross-checks all for consistency conflicts.
55
+
56
+ **Input:**
57
+ - `documents` (array, min 2, max 20) -- each item has: `label` (required), `document_text`, `document_image`, `document_type_hint`, `issuing_jurisdiction`
58
+
59
+ **Cross-checks performed:** weights/quantities/amounts, party names, reference numbers, dates, commodity descriptions, port references.
60
+
61
+ ## Pricing
62
+
63
+ | Tier | Calls | Price |
64
+ |------|-------|-------|
65
+ | Free | 10/month per IP | No API key required |
66
+ | Trial extension | +10 one-time | POST /trial-extension |
67
+ | Pro | 500/month | $29/month |
68
+ | Enterprise | 5,000/month | $199/month |
69
+
70
+ Overage: $0.05 per call above monthly cap.
71
+
72
+ Subscribe at [kordagencies.com](https://kordagencies.com).
73
+
74
+ ## Harness Integration
75
+
76
+ ### Claude Code / Claude Desktop (.mcp.json)
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "document-integrity-validator": {
81
+ "type": "http",
82
+ "url": "https://document-integrity-validator-mcp-production.up.railway.app/mcp"
83
+ }
84
+ }
85
+ }
86
+ ```
87
+
88
+ ### LangChain / LangGraph (Python)
89
+ ```python
90
+ from langchain_mcp_adapters.client import MultiServerMCPClient
91
+ client = MultiServerMCPClient({
92
+ "document-integrity-validator": {
93
+ "url": "https://document-integrity-validator-mcp-production.up.railway.app/mcp",
94
+ "transport": "http"
95
+ }
96
+ })
97
+ tools = await client.get_tools()
98
+ ```
99
+
100
+ ### OpenAI Agents SDK (Python)
101
+ ```python
102
+ from agents import Agent, HostedMCPTool
103
+ agent = Agent(
104
+ name="Assistant",
105
+ tools=[HostedMCPTool(tool_config={
106
+ "type": "mcp",
107
+ "server_label": "document-integrity-validator",
108
+ "server_url": "https://document-integrity-validator-mcp-production.up.railway.app/mcp",
109
+ "require_approval": "never"
110
+ })]
111
+ )
112
+ ```
113
+
114
+ ## Self-hosted (stdio)
115
+
116
+ ```bash
117
+ npm install -g document-integrity-validator-mcp
118
+ ANTHROPIC_API_KEY=sk-ant-... TRANSPORT=stdio document-integrity-validator-mcp
119
+ ```
120
+
121
+ Add to Claude Desktop `claude_desktop_config.json`:
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "document-integrity-validator": {
126
+ "command": "document-integrity-validator-mcp",
127
+ "env": { "ANTHROPIC_API_KEY": "sk-ant-..." }
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ ## Trial Extension
134
+
135
+ If you have reached the 10 call/month free limit, request 10 extra calls:
136
+
137
+ ```bash
138
+ curl -X POST https://document-integrity-validator-mcp-production.up.railway.app/trial-extension \
139
+ -H "Content-Type: application/json" \
140
+ -d '{"name":"Your Name","email":"you@example.com","use_case":"Brief description"}'
141
+ ```
142
+
143
+ One extension per email address.
144
+
145
+ ## Legal
146
+
147
+ AI-powered document consistency assessment. Results are for informational purposes only and do not constitute legal, compliance, or authentication advice. We do not log or store your document content. Full terms: [kordagencies.com/terms.html](https://kordagencies.com/terms.html)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAC3D,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,gVACkT,CAAC;AAChV,eAAO,MAAM,SAAS,QAAsC,CAAC;AAE7D,wBAAgB,MAAM,IAAI,MAAM,CAE/B"}
@@ -0,0 +1,12 @@
1
+ export const VERSION = '1.0.0';
2
+ export const PERSIST_FILE = '/tmp/docintegrity_stats.json';
3
+ export const FREE_TIER_LIMIT = 10;
4
+ export const FREE_TIER_WARNING = 8;
5
+ export const TRIAL_EXTENSION_CALLS = 10;
6
+ export const PRO_UPGRADE_URL = 'https://kordagencies.com';
7
+ export const LEGAL_DISCLAIMER = 'AI-powered document consistency assessment. Results are for informational purposes only and do not constitute legal, compliance, or authentication advice. We do not log or store your document content. Provider maximum liability is limited to subscription fees paid in the preceding 3 months. Full terms: kordagencies.com/terms.html';
8
+ export const STATS_KEY = process.env.STATS_KEY ?? 'ojas2026';
9
+ export function nowISO() {
10
+ return new Date().toISOString();
11
+ }
12
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,YAAY,GAAG,8BAA8B,CAAC;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AACnC,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAC3B,6UAA6U,CAAC;AAChV,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,UAAU,CAAC;AAE7D,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}