{"_id":"ocr-provenance-mcp","_rev":"356-09fdabf910f232d8e4ab2e7272467049","name":"ocr-provenance-mcp","dist-tags":{"latest":"1.6.9"},"versions":{"1.6.3":{"name":"ocr-provenance-mcp","version":"1.6.3","keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"author":{"name":"Chris Royse"},"license":"SEE LICENSE IN LICENSE","_id":"ocr-provenance-mcp@1.6.3","maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"bin":{"ocr-provenance-mcp":"dist/bin.js","ocr-provenance-mcp-http":"dist/bin-http.js"},"dist":{"shasum":"59ac2b24c980062d1156ea56f21ecbb797e3b76e","tarball":"https://registry.npmjs.org/ocr-provenance-mcp/-/ocr-provenance-mcp-1.6.3.tgz","fileCount":762,"integrity":"sha512-zHHLHuAklkDgDqfefSrk45HVZA6ZoPUJZW+Hvuz0YziymA6RhTI6eafXI3sPeO3b8xofW2/SRnLEwmDyvftkmw==","signatures":[{"sig":"MEUCIAQI6UIAVKMcoW98Sh5Hlo/Bu+h6nfOSml4Rm179sm/5AiEAnuon8PYkZ/j253PB0ussl5Qo/MwRY2V9xblbhyoIdYg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129894326},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js"},"gitHead":"ea65ef88ba595e7ad3cbea6bbfe74160e1b2faa2","scripts":{"lint":"eslint src/ tests/","test":"vitest run","build":"tsc","check":"npm run typecheck && npm run lint:all && npm run test","start":"node --max-semi-space-size=64 dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","lint:py":"cd python && ruff check . && ruff format --check .","lint:all":"npm run lint && npm run format:check && npm run lint:py","lint:fix":"eslint src/ tests/ --fix","test:all":"vitest run --config vitest.config.all.ts","test:gpu":"vitest run tests/unit/embedding tests/gpu","test:unit":"vitest run tests/unit","typecheck":"tsc --noEmit --skipLibCheck","build:fast":"tsc --noCheck","start:http":"MCP_TRANSPORT=http node --max-semi-space-size=64 dist/bin-http.js","test:watch":"vitest","lint:py:fix":"cd python && ruff check --fix . && ruff format .","test:manual":"vitest run --config vitest.config.all.ts tests/manual/","docker:build":"./scripts/docker-release.sh --dry-run","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","lint:all:fix":"npm run lint:fix && npm run format && npm run lint:py:fix","start:docker":"node --max-semi-space-size=64 dist/bin-http.js","docker:release":"./scripts/docker-release.sh","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"cabdru","email":"chrisroyseai@gmail.com"},"deprecated":"Upgrade to 1.6.4 — fixes Mac OCR pipeline","repository":{"url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git","type":"git"},"_npmVersion":"11.10.1","description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.25.0","diff":"^8.0.3","uuid":"^10.0.0","busboy":"^1.6.0","dotenv":"^17.2.3","sqlite-vec":"0.1.7-alpha.2","python-shell":"^5.0.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^4.1.0","globals":"^15.0.0","prettier":"^3.3.0","@eslint/js":"^9.0.0","typescript":"^5.5.0","@types/node":"^20.0.0","@types/uuid":"^10.0.0","@types/busboy":"^1.5.4","typescript-eslint":"^8.0.0","@vitest/coverage-v8":"^4.1.0","@types/better-sqlite3":"^7.0.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ocr-provenance-mcp_1.6.3_1775657822036_0.5610920255002818","host":"s3://npm-registry-packages-npm-production"}},"1.6.4":{"name":"ocr-provenance-mcp","version":"1.6.4","keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"author":{"name":"Chris Royse"},"license":"SEE LICENSE IN LICENSE","_id":"ocr-provenance-mcp@1.6.4","maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"bin":{"ocr-provenance-mcp":"dist/bin.js","ocr-provenance-mcp-http":"dist/bin-http.js"},"dist":{"shasum":"5d10b04a0b6de852bda9f3b20188c71ce0ae12b8","tarball":"https://registry.npmjs.org/ocr-provenance-mcp/-/ocr-provenance-mcp-1.6.4.tgz","fileCount":766,"integrity":"sha512-CbVDZgA7iWr01gmm210WR0sWlo1JPSpSIBc9aoLI6gpvQqpg2Ejcw2jGFe0Nr6DuQKbXwMKkmouQHpsXWKf6Pw==","signatures":[{"sig":"MEYCIQC8NtyKshqIXlnMPN1u//d612Cb13YZjuKj/O38pg5i1wIhALBSlF1V0pCMubLmx7t3/3fXs/bBx9qotkMLLm+alQ+n","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129912878},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js"},"gitHead":"61ffa59bdc151301c00cac3c27f15b441182bedf","scripts":{"lint":"eslint src/ tests/","test":"vitest run","build":"tsc","check":"npm run typecheck && npm run lint:all && npm run test","start":"node --max-semi-space-size=64 dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","lint:py":"cd python && ruff check . && ruff format --check .","lint:all":"npm run lint && npm run format:check && npm run lint:py","lint:fix":"eslint src/ tests/ --fix","test:all":"vitest run --config vitest.config.all.ts","test:gpu":"vitest run tests/unit/embedding tests/gpu","test:unit":"vitest run tests/unit","typecheck":"tsc --noEmit --skipLibCheck","build:fast":"tsc --noCheck","start:http":"MCP_TRANSPORT=http node --max-semi-space-size=64 dist/bin-http.js","test:watch":"vitest","lint:py:fix":"cd python && ruff check --fix . && ruff format .","test:manual":"vitest run --config vitest.config.all.ts tests/manual/","docker:build":"./scripts/docker-release.sh --dry-run","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","lint:all:fix":"npm run lint:fix && npm run format && npm run lint:py:fix","start:docker":"node --max-semi-space-size=64 dist/bin-http.js","docker:release":"./scripts/docker-release.sh","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"cabdru","email":"chrisroyseai@gmail.com"},"deprecated":"Upgrade to 1.6.6 — redaction + Mac bare-metal fixes","repository":{"url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git","type":"git"},"_npmVersion":"11.10.1","description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.25.0","diff":"^8.0.3","uuid":"^10.0.0","busboy":"^1.6.0","dotenv":"^17.2.3","sqlite-vec":"0.1.7-alpha.2","python-shell":"^5.0.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^4.1.0","globals":"^15.0.0","prettier":"^3.3.0","@eslint/js":"^9.0.0","typescript":"^5.5.0","@types/node":"^20.0.0","@types/uuid":"^10.0.0","@types/busboy":"^1.5.4","typescript-eslint":"^8.0.0","@vitest/coverage-v8":"^4.1.0","@types/better-sqlite3":"^7.0.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ocr-provenance-mcp_1.6.4_1775676042273_0.2930757083237565","host":"s3://npm-registry-packages-npm-production"}},"1.6.6":{"name":"ocr-provenance-mcp","version":"1.6.6","keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"author":{"name":"Chris Royse"},"license":"SEE LICENSE IN LICENSE","_id":"ocr-provenance-mcp@1.6.6","maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"bin":{"ocr-provenance-mcp":"dist/bin.js","ocr-provenance-mcp-http":"dist/bin-http.js"},"dist":{"shasum":"81ad36bcc98311348286dd0fe63205ff5d3f880e","tarball":"https://registry.npmjs.org/ocr-provenance-mcp/-/ocr-provenance-mcp-1.6.6.tgz","fileCount":779,"integrity":"sha512-HeMpaqMznigWQdbababkA7pLlsijbbQzRdhK161XqO1rtAy5dolx/ZVD+23B9rBtxizUyggpDlsVAJg5t8ujhA==","signatures":[{"sig":"MEUCIQDEczffEe0iX1TsSCyilCobNk0YfvRwxGSh8cYfWer7nQIgCGHi0sdUwOw2V/rsEBryRCpce8KGjq8RfN2OL0njR88=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130047523},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js"},"gitHead":"d2057735ccfc1414aec93e522e122124cf4c02ef","scripts":{"lint":"eslint src/ tests/","test":"vitest run","build":"tsc","check":"npm run typecheck && npm run lint:all && npm run test","start":"node --max-semi-space-size=64 dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","lint:py":"cd python && ruff check . && ruff format --check .","lint:all":"npm run lint && npm run format:check && npm run lint:py","lint:fix":"eslint src/ tests/ --fix","test:all":"vitest run --config vitest.config.all.ts","test:gpu":"vitest run tests/unit/embedding tests/gpu","test:unit":"vitest run tests/unit","typecheck":"tsc --noEmit --skipLibCheck","build:fast":"tsc --noCheck","start:http":"MCP_TRANSPORT=http node --max-semi-space-size=64 dist/bin-http.js","test:watch":"vitest","lint:py:fix":"cd python && ruff check --fix . && ruff format .","test:manual":"vitest run --config vitest.config.all.ts tests/manual/","docker:build":"./scripts/docker-release.sh --dry-run","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","lint:all:fix":"npm run lint:fix && npm run format && npm run lint:py:fix","start:docker":"node --max-semi-space-size=64 dist/bin-http.js","docker:release":"./scripts/docker-release.sh","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"cabdru","email":"chrisroyseai@gmail.com"},"repository":{"url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git","type":"git"},"_npmVersion":"11.10.1","description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.25.0","diff":"^8.0.3","uuid":"^10.0.0","busboy":"^1.6.0","dotenv":"^17.2.3","sqlite-vec":"0.1.7-alpha.2","python-shell":"^5.0.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^4.1.0","globals":"^15.0.0","prettier":"^3.3.0","@eslint/js":"^9.0.0","typescript":"^5.5.0","@types/node":"^20.0.0","@types/uuid":"^10.0.0","@types/busboy":"^1.5.4","typescript-eslint":"^8.0.0","@vitest/coverage-v8":"^4.1.0","@types/better-sqlite3":"^7.0.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ocr-provenance-mcp_1.6.6_1775745927250_0.5086949748075935","host":"s3://npm-registry-packages-npm-production"}},"1.6.7":{"name":"ocr-provenance-mcp","version":"1.6.7","keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"author":{"name":"Chris Royse"},"license":"SEE LICENSE IN LICENSE","_id":"ocr-provenance-mcp@1.6.7","maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"bin":{"ocr-provenance-mcp":"dist/bin.js","ocr-provenance-mcp-http":"dist/bin-http.js"},"dist":{"shasum":"dd4d098f6412f2c959820ed3b50508a41440fe18","tarball":"https://registry.npmjs.org/ocr-provenance-mcp/-/ocr-provenance-mcp-1.6.7.tgz","fileCount":779,"integrity":"sha512-9l5KPEbVGAbK36wnYyyfY+cs2L8So498VS3LxKCCYTZW9to6IWiZr4YhtstwuYizUfFOGWusYoOcF29WslZhhg==","signatures":[{"sig":"MEYCIQCEnG3u1mfn94HMWbI7XCTNQvkmetYlIa2GFYWVdwqViAIhAIMj/YAqFWbG/fOfhhHQlr3OwwGl3WR+PTHtltm8XkYe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130055459},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js"},"gitHead":"9bf99169b4640e0588eff4d32c5dd5aa452cfd09","scripts":{"lint":"eslint src/ tests/","test":"vitest run","build":"tsc","check":"npm run typecheck && npm run lint:all && npm run test","start":"node --max-semi-space-size=64 dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","lint:py":"cd python && ruff check . && ruff format --check .","lint:all":"npm run lint && npm run format:check && npm run lint:py","lint:fix":"eslint src/ tests/ --fix","test:all":"vitest run --config vitest.config.all.ts","test:gpu":"vitest run tests/unit/embedding tests/gpu","test:unit":"vitest run tests/unit","typecheck":"tsc --noEmit --skipLibCheck","build:fast":"tsc --noCheck","start:http":"MCP_TRANSPORT=http node --max-semi-space-size=64 dist/bin-http.js","test:watch":"vitest","lint:py:fix":"cd python && ruff check --fix . && ruff format .","test:manual":"vitest run --config vitest.config.all.ts tests/manual/","docker:build":"./scripts/docker-release.sh --dry-run","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","lint:all:fix":"npm run lint:fix && npm run format && npm run lint:py:fix","start:docker":"node --max-semi-space-size=64 dist/bin-http.js","docker:release":"./scripts/docker-release.sh","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"cabdru","email":"chrisroyseai@gmail.com"},"repository":{"url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git","type":"git"},"_npmVersion":"11.10.1","description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.25.0","diff":"^8.0.3","uuid":"^10.0.0","busboy":"^1.6.0","dotenv":"^17.2.3","sqlite-vec":"0.1.7-alpha.2","python-shell":"^5.0.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^4.1.0","globals":"^15.0.0","prettier":"^3.3.0","@eslint/js":"^9.0.0","typescript":"^5.5.0","@types/node":"^20.0.0","@types/uuid":"^10.0.0","@types/busboy":"^1.5.4","typescript-eslint":"^8.0.0","@vitest/coverage-v8":"^4.1.0","@types/better-sqlite3":"^7.0.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ocr-provenance-mcp_1.6.7_1776093870764_0.3432617530961306","host":"s3://npm-registry-packages-npm-production"}},"1.6.8":{"name":"ocr-provenance-mcp","version":"1.6.8","keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"author":{"name":"Chris Royse"},"license":"SEE LICENSE IN LICENSE","_id":"ocr-provenance-mcp@1.6.8","maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"bin":{"ocr-provenance-mcp":"dist/bin.js","ocr-provenance-mcp-http":"dist/bin-http.js"},"dist":{"shasum":"ab0b9a412a257ade902e3b119e0e398026b7fac8","tarball":"https://registry.npmjs.org/ocr-provenance-mcp/-/ocr-provenance-mcp-1.6.8.tgz","fileCount":779,"integrity":"sha512-7lH6lNQb1Mqq6dgbHfJQYqNdABGzA/ux8PdXraDharksgaJRJJzYuhEHC0hh1FWLNtd8I9CraBnNKEmUSx0jAA==","signatures":[{"sig":"MEYCIQCCkkYSRuOl8gEiyMtYzoqrbfTvln5KcsEgrph81Nif2gIhAKp2NRiOKXeYAmyrz719V/+SUhoMTbO2vcE8Fe837zgJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":130055459},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js"},"gitHead":"9bf99169b4640e0588eff4d32c5dd5aa452cfd09","scripts":{"lint":"eslint src/ tests/","test":"vitest run","build":"tsc","check":"npm run typecheck && npm run lint:all && npm run test","start":"node --max-semi-space-size=64 dist/index.js","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","lint:py":"cd python && ruff check . && ruff format --check .","lint:all":"npm run lint && npm run format:check && npm run lint:py","lint:fix":"eslint src/ tests/ --fix","test:all":"vitest run --config vitest.config.all.ts","test:gpu":"vitest run tests/unit/embedding tests/gpu","test:unit":"vitest run tests/unit","typecheck":"tsc --noEmit --skipLibCheck","build:fast":"tsc --noCheck","start:http":"MCP_TRANSPORT=http node --max-semi-space-size=64 dist/bin-http.js","test:watch":"vitest","lint:py:fix":"cd python && ruff check --fix . && ruff format .","test:manual":"vitest run --config vitest.config.all.ts tests/manual/","docker:build":"./scripts/docker-release.sh --dry-run","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","lint:all:fix":"npm run lint:fix && npm run format && npm run lint:py:fix","start:docker":"node --max-semi-space-size=64 dist/bin-http.js","docker:release":"./scripts/docker-release.sh","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration"},"_npmUser":{"name":"cabdru","email":"chrisroyseai@gmail.com"},"repository":{"url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git","type":"git"},"_npmVersion":"11.10.1","description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.25.0","diff":"^8.0.3","uuid":"^10.0.0","busboy":"^1.6.0","dotenv":"^17.2.3","sqlite-vec":"0.1.7-alpha.2","python-shell":"^5.0.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.0.0","vitest":"^4.1.0","globals":"^15.0.0","prettier":"^3.3.0","@eslint/js":"^9.0.0","typescript":"^5.5.0","@types/node":"^20.0.0","@types/uuid":"^10.0.0","@types/busboy":"^1.5.4","typescript-eslint":"^8.0.0","@vitest/coverage-v8":"^4.1.0","@types/better-sqlite3":"^7.0.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ocr-provenance-mcp_1.6.8_1776096544213_0.04231543984271546","host":"s3://npm-registry-packages-npm-production"}},"1.6.9":{"name":"ocr-provenance-mcp","version":"1.6.9","description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","type":"module","main":"dist/index.js","exports":{".":"./dist/index.js"},"bin":{"ocr-provenance-mcp":"dist/bin.js","ocr-provenance-mcp-http":"dist/bin-http.js"},"license":"SEE LICENSE IN LICENSE","author":{"name":"Chris Royse"},"homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","repository":{"type":"git","url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git"},"bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"scripts":{"build":"tsc","build:fast":"tsc --noCheck","start":"node --max-semi-space-size=64 dist/index.js","start:http":"MCP_TRANSPORT=http node --max-semi-space-size=64 dist/bin-http.js","start:docker":"node --max-semi-space-size=64 dist/bin-http.js","test":"vitest run","test:watch":"vitest","test:unit":"vitest run tests/unit","test:integration":"vitest run tests/integration","test:manual":"vitest run --config vitest.config.all.ts tests/manual/","test:gpu":"vitest run tests/unit/embedding tests/gpu","test:all":"vitest run --config vitest.config.all.ts","lint":"eslint src/ tests/","lint:fix":"eslint src/ tests/ --fix","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\"","typecheck":"tsc --noEmit --skipLibCheck","lint:py":"cd python && ruff check . && ruff format --check .","lint:py:fix":"cd python && ruff check --fix . && ruff format .","lint:all":"npm run lint && npm run format:check && npm run lint:py","lint:all:fix":"npm run lint:fix && npm run format && npm run lint:py:fix","check":"npm run typecheck && npm run lint:all && npm run test","docker:build":"./scripts/docker-release.sh --dry-run","docker:release":"./scripts/docker-release.sh","prepublishOnly":"npm run build"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","better-sqlite3":"^11.0.0","busboy":"^1.6.0","diff":"^8.0.3","dotenv":"^17.2.3","python-shell":"^5.0.0","sqlite-vec":"0.1.7-alpha.2","uuid":"^10.0.0","zod":"^3.25.0"},"devDependencies":{"@eslint/js":"^9.0.0","@types/better-sqlite3":"^7.0.0","@types/busboy":"^1.5.4","@types/node":"^20.0.0","@types/uuid":"^10.0.0","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","@vitest/coverage-v8":"^4.1.0","eslint":"^9.0.0","globals":"^15.0.0","prettier":"^3.3.0","typescript":"^5.5.0","typescript-eslint":"^8.0.0","vitest":"^4.1.0"},"engines":{"node":">=20.0.0"},"gitHead":"58630e7b7170b03f5e95aeed1dc6b6eeb0b67007","types":"./dist/index.d.ts","_id":"ocr-provenance-mcp@1.6.9","_nodeVersion":"20.19.6","_npmVersion":"11.10.1","dist":{"integrity":"sha512-osCIBA6WKZG8es+NYWIeLQHKivJODoLU4I6z6cWjjYWdS3xKf1AV0AyLGYG9trDDVKh21dw8wE88hsOsuBBsoQ==","shasum":"a10fbe3b732dbf3940dc32d0e937b0b6968b98e0","tarball":"https://registry.npmjs.org/ocr-provenance-mcp/-/ocr-provenance-mcp-1.6.9.tgz","fileCount":779,"unpackedSize":130059709,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCbFXAV3IecAgjZDaIxgUo/X4bZfFmXD4UHsI396P+6hgIgE3svlPTbNGNss5+6q3QAYvS8GZWBmh9gKI1VWDgVQJo="}]},"_npmUser":{"name":"cabdru","email":"chrisroyseai@gmail.com"},"directories":{},"maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ocr-provenance-mcp_1.6.9_1776108554645_0.8608612146774877"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-25T06:08:39.359Z","modified":"2026-04-13T19:29:17.886Z","1.0.0":"2026-02-25T06:08:39.748Z","1.0.1":"2026-02-25T08:09:21.916Z","1.0.2":"2026-02-25T16:50:22.767Z","1.0.3":"2026-02-26T00:53:30.602Z","1.0.4":"2026-02-26T04:21:24.092Z","1.0.5":"2026-02-26T06:15:33.290Z","1.0.6":"2026-02-26T14:46:26.815Z","1.0.7":"2026-02-26T20:24:43.540Z","1.0.8":"2026-02-26T22:17:20.892Z","1.0.9":"2026-02-28T04:41:50.440Z","1.0.10":"2026-02-28T10:59:34.264Z","1.0.11":"2026-02-28T17:32:45.001Z","1.0.12":"2026-03-01T17:59:36.838Z","1.0.13":"2026-03-01T19:31:57.712Z","1.0.14":"2026-03-02T05:40:56.798Z","1.0.15":"2026-03-02T07:10:07.547Z","1.0.16":"2026-03-02T18:26:21.299Z","1.0.17":"2026-03-04T12:38:51.295Z","1.0.18":"2026-03-04T16:00:18.704Z","1.1.0":"2026-03-13T08:06:04.184Z","1.1.1":"2026-03-13T09:18:14.780Z","1.1.2":"2026-03-13T09:23:23.458Z","1.1.3":"2026-03-13T18:19:04.543Z","1.1.4":"2026-03-14T00:10:20.833Z","1.1.5":"2026-03-14T00:17:32.584Z","1.2.0":"2026-03-14T04:08:35.664Z","1.2.1":"2026-03-14T21:45:48.668Z","1.2.14":"2026-03-15T15:44:51.868Z","1.2.15":"2026-03-15T16:03:16.428Z","1.2.16":"2026-03-15T16:04:32.547Z","1.2.17":"2026-03-15T16:05:44.217Z","1.2.18":"2026-03-15T16:06:36.705Z","1.2.19":"2026-03-15T17:13:28.973Z","1.2.20":"2026-03-15T23:18:20.139Z","1.2.21":"2026-03-16T03:07:08.530Z","1.2.22":"2026-03-16T04:08:08.585Z","1.2.23":"2026-03-16T05:23:26.772Z","1.2.24":"2026-03-16T13:07:41.177Z","1.2.25":"2026-03-16T13:19:48.086Z","1.2.26":"2026-03-16T15:25:23.286Z","1.2.27":"2026-03-16T16:41:51.181Z","1.2.28":"2026-03-16T17:04:21.703Z","1.2.29":"2026-03-16T17:30:07.921Z","1.2.30":"2026-03-16T18:01:34.226Z","1.2.31":"2026-03-16T18:51:21.247Z","1.2.32":"2026-03-16T20:00:36.420Z","1.2.33":"2026-03-16T21:09:53.383Z","1.2.34":"2026-03-16T21:51:50.687Z","1.2.35":"2026-03-16T22:53:09.937Z","1.2.36":"2026-03-16T23:07:46.513Z","1.2.37":"2026-03-16T23:50:46.691Z","1.2.38":"2026-03-17T14:52:24.059Z","1.2.39":"2026-03-17T16:04:36.896Z","1.2.40":"2026-03-17T16:28:13.004Z","1.2.41":"2026-03-17T18:54:05.641Z","1.2.42":"2026-03-17T21:15:44.960Z","1.2.43":"2026-03-17T22:44:55.353Z","1.2.44":"2026-03-18T01:26:08.393Z","1.2.45":"2026-03-18T02:35:36.458Z","1.2.46":"2026-03-18T02:55:04.679Z","1.2.48":"2026-03-18T03:13:19.893Z","1.2.49":"2026-03-18T03:34:28.263Z","1.2.50":"2026-03-18T04:20:01.307Z","1.2.51":"2026-03-18T06:50:06.052Z","1.2.52":"2026-03-18T09:37:15.920Z","1.2.53":"2026-03-18T09:49:11.411Z","1.2.54":"2026-03-18T10:35:14.498Z","1.2.55":"2026-03-18T10:37:23.349Z","1.2.56":"2026-03-18T11:07:21.631Z","1.2.57":"2026-03-18T12:04:06.125Z","1.2.58":"2026-03-18T19:01:16.956Z","1.2.59":"2026-03-19T15:26:57.097Z","1.2.60":"2026-03-19T16:54:13.389Z","1.2.61":"2026-03-19T21:44:12.556Z","1.2.62":"2026-03-19T22:55:01.851Z","1.2.64":"2026-03-20T15:21:55.320Z","1.2.65":"2026-03-20T17:17:30.936Z","1.2.66":"2026-03-20T21:46:35.598Z","1.2.67":"2026-03-20T23:32:39.579Z","1.2.68":"2026-03-20T23:40:33.841Z","1.2.70":"2026-03-21T05:06:54.998Z","1.2.71":"2026-03-21T06:25:46.371Z","1.2.72":"2026-03-21T15:00:27.400Z","1.2.73":"2026-03-21T15:18:36.792Z","1.2.74":"2026-03-21T17:04:57.132Z","1.2.75":"2026-03-21T20:29:28.641Z","1.2.76":"2026-03-21T21:13:48.874Z","1.2.77":"2026-03-21T21:48:57.619Z","1.2.78":"2026-03-21T22:45:52.025Z","1.2.79":"2026-03-21T22:59:17.625Z","1.2.80":"2026-03-21T23:17:16.458Z","1.2.81":"2026-03-22T00:40:20.093Z","1.2.82":"2026-03-22T02:18:30.158Z","1.2.83":"2026-03-22T02:49:19.270Z","1.2.84":"2026-03-22T03:01:37.717Z","1.2.85":"2026-03-22T03:35:17.160Z","1.2.86":"2026-03-22T06:28:33.165Z","1.2.87":"2026-03-22T06:42:08.899Z","1.2.88":"2026-03-22T18:07:35.173Z","1.2.89":"2026-03-23T00:13:50.295Z","1.2.90":"2026-03-23T05:56:30.602Z","1.2.93":"2026-03-24T03:01:25.504Z","1.2.94":"2026-03-24T04:37:52.466Z","1.2.95":"2026-03-24T04:48:26.184Z","1.2.96":"2026-03-24T05:35:18.138Z","1.2.97":"2026-03-24T06:11:18.697Z","1.2.98":"2026-03-24T06:28:01.819Z","1.2.99":"2026-03-24T06:40:46.816Z","1.2.100":"2026-03-24T06:52:55.832Z","1.2.101":"2026-03-24T06:58:41.760Z","1.2.102":"2026-03-24T07:09:16.422Z","1.2.103":"2026-03-24T07:59:14.533Z","1.3.0":"2026-03-24T08:10:24.718Z","1.3.1":"2026-03-24T08:57:36.122Z","1.3.2":"2026-03-24T09:07:58.264Z","1.3.3":"2026-03-24T09:16:25.098Z","1.3.4":"2026-03-24T09:50:20.691Z","1.3.5":"2026-03-24T14:44:54.691Z","1.3.6":"2026-03-24T15:14:02.027Z","1.3.8":"2026-03-26T20:05:55.050Z","1.3.9":"2026-03-26T20:23:04.005Z","1.4.0":"2026-03-28T19:52:14.713Z","1.5.0":"2026-04-01T23:25:51.151Z","1.5.1":"2026-04-01T23:46:09.457Z","1.5.2":"2026-04-02T00:22:34.972Z","1.5.3":"2026-04-03T01:57:53.677Z","1.5.4":"2026-04-03T03:45:26.933Z","1.5.5":"2026-04-07T19:18:11.118Z","1.5.6":"2026-04-07T20:59:51.486Z","1.5.7":"2026-04-07T22:38:16.792Z","1.5.8":"2026-04-07T22:47:26.944Z","1.5.9":"2026-04-07T22:53:42.738Z","1.6.0":"2026-04-07T23:10:17.423Z","1.6.1":"2026-04-07T23:26:40.893Z","1.6.2":"2026-04-08T03:16:32.588Z","1.6.3":"2026-04-08T14:17:05.093Z","1.6.4":"2026-04-08T19:20:45.437Z","1.6.6":"2026-04-09T14:45:30.523Z","1.6.7":"2026-04-13T15:24:33.811Z","1.6.8":"2026-04-13T16:09:07.380Z","1.6.9":"2026-04-13T19:29:17.758Z"},"bugs":{"url":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp/issues"},"author":{"name":"Chris Royse"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/ChrisRoyse/ocrprovenancelocalmcp#readme","keywords":["mcp","ocr","provenance","semantic-search","document-clustering","sqlite","vector-search","claude","model-context-protocol"],"repository":{"type":"git","url":"git+https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git"},"description":"MCP server for document OCR processing, semantic search, document comparison, clustering, and provenance tracking","maintainers":[{"name":"cabdru","email":"chrisroyseai@gmail.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/ocr-provenance-mcp\"><img src=\"https://img.shields.io/npm/v/ocr-provenance-mcp?style=flat-square&color=0366d6\" alt=\"npm version\" /></a>\n  <a href=\"https://www.npmjs.com/package/ocr-provenance-mcp\"><img src=\"https://img.shields.io/npm/dm/ocr-provenance-mcp?style=flat-square&color=0366d6\" alt=\"npm downloads\" /></a>\n  <img src=\"https://img.shields.io/node/v/ocr-provenance-mcp?style=flat-square\" alt=\"node version\" />\n  <img src=\"https://img.shields.io/badge/MCP_Tools-153-blue?style=flat-square\" alt=\"153 MCP tools\" />\n  <img src=\"https://img.shields.io/badge/Processing-100%25_Local-brightgreen?style=flat-square\" alt=\"100% local\" />\n  <img src=\"https://img.shields.io/badge/GPU-Accelerated-orange?style=flat-square\" alt=\"GPU accelerated\" />\n  <img src=\"https://img.shields.io/badge/license-dual-green?style=flat-square\" alt=\"license\" />\n</p>\n\n# OCR Provenance MCP\n\n<p align=\"center\">\n  <a href=\"https://youtu.be/nT09tfs3NEs\">\n    <img src=\"https://raw.githubusercontent.com/ChrisRoyse/ocrassets/main/ocr_provenance_logo_compressed.jpg\" alt=\"OCR Provenance MCP\" width=\"720\" />\n  </a>\n  <br />\n  <a href=\"https://youtu.be/nT09tfs3NEs\"><strong>Watch the full demo and walkthrough</strong></a>\n</p>\n\n**Your AI can't read documents. This fixes that. One command. Zero configuration.**\n\nOCR Provenance MCP gives your AI complete document intelligence — 153 tools for OCR, semantic search, vision AI, compliance, and provenance tracking — all running on local GPU. No cloud APIs. No data leaves your machine. Ever.\n\n```bash\nnpx -y ocr-provenance-mcp install          # Docker (Linux/WSL + NVIDIA GPU)\nnpx -y ocr-provenance-mcp install --mac    # macOS (Apple Silicon, no Docker)\n```\n\nWorks with Claude Code, Claude Desktop, Cursor, and Windsurf. No GPU? [Deploy on a cloud GPU in 4 steps.](#cloud-deploy-no-local-gpu-required)\n\n> **After installing, tell your AI: \"Open the OCR Provenance dashboard.\"** The dashboard is your command center — view documents, manage databases, add funds, and monitor processing in real time at `http://localhost:3367`.\n\n### NEW: Legal-Domain Embedding Model\n\nGeneral-purpose AI search struggles with legal language. \"Consideration\" in a contract means contractual value, not thought. Case citations, statutory references, and legal terminology need a model trained on that vocabulary.\n\nOCR Provenance now ships with a **legal-domain embedding model** ([FreeLawProject ModernBERT](https://huggingface.co/freelawproject/modernbert-embed-base_finetune_8192)) fine-tuned on court opinions from CourtListener and RECAP. Choose it when creating a database for legal documents:\n\n```\nocr_db_create { name: \"vendor-contracts-2025\", embedding_model: \"legal\" }\n```\n\nAfter that, all search, RAG, and embedding operations on that database automatically use the legal model. No extra configuration. [See details below.](#legal-document-intelligence)\n\n---\n\n## Install\n\n### Docker (Linux / WSL2 + NVIDIA GPU)\n\nRequirements: [Docker Desktop](https://www.docker.com/products/docker-desktop/), [Node.js](https://nodejs.org/) 20+, NVIDIA GPU recommended (CPU works, just slower).\n\n```bash\nnpx -y ocr-provenance-mcp install\n```\n\nThat's it. The installer:\n1. Pulls the AI models image (~14 GB, cached after first install)\n2. Pulls the application image (~500 MB)\n3. Starts the container with automatic GPU detection\n4. Provisions your license key\n5. Registers with any detected AI client (Claude Code, Claude Desktop, Cursor, Windsurf)\n\nRestart your AI client. Then tell your AI: **\"Open the OCR Provenance dashboard\"** — this opens the web UI where you can view documents, manage databases, add funds, and monitor everything.\n\n### macOS (Apple Silicon — No Docker Required)\n\n**Requirements:**\n- [Node.js](https://nodejs.org/) 20+ (`brew install node`)\n- Python 3.11+ (`brew install python@3.12`)\n- Apple Silicon Mac (M1/M2/M3/M4) with 12GB+ unified memory\n- ~15 GB free disk space (for AI models, one-time download)\n\n```bash\nnpx -y ocr-provenance-mcp install --mac\n```\n\nThe installer:\n1. Creates a Python virtual environment at `~/.ocr-provenance-mcp/venv/`\n2. Installs PyTorch with MPS (Metal Performance Shaders) GPU acceleration\n3. Installs Marker OCR, Chandra OCR 2, nomic embeddings, and all dependencies\n4. Downloads model weights (~14 GB total, one-time, cached at `~/.cache/huggingface/hub/`)\n5. Installs the dashboard web UI for account management and billing\n6. Registers with any detected AI client (Claude Code, Claude Desktop, Cursor, Windsurf)\n\nRestart your AI client. The first OCR run downloads the Marker/Surya models (~3.3 GB, one-time).\n\n**What runs on Mac:** When your AI client connects, three services start automatically:\n- **MCP Server** — 153 tools via stdio (direct connection to your AI client)\n- **License Server** — billing, auth, Stripe payments (port 3000)\n- **Dashboard** — web UI at `http://localhost:3367` for account management, document viewing, and adding funds\n\nAll three start together when your AI connects and stop together when it disconnects.\n\n**Optional:** Install [LibreOffice](https://www.libreoffice.org/) for Office-to-PDF conversion in the document viewer:\n```bash\nbrew install --cask libreoffice\n```\n\n**GPU memory guide:**\n\n| Mac | Unified Memory | What Works |\n|-----|---------------|------------|\n| M1/M2 (8 GB) | 8 GB | OCR + embeddings + search (VLM skipped automatically) |\n| M1/M2 Pro (16 GB) | 16 GB | Full pipeline. VLM may be skipped on large documents — close other apps for best results |\n| M3/M4 Pro (18-24 GB) | 18-24 GB | Full pipeline, comfortable headroom |\n| M4 Max/Ultra (48-192 GB) | 48-192 GB | Full pipeline, fast processing |\n\n**Where data is stored on Mac:**\n```\n~/.ocr-provenance-mcp/\n├── venv/              # Python virtual environment\n├── databases/         # SQLite databases (your documents, chunks, embeddings)\n├── dashboard/         # Dashboard web UI\n└── wrapper.json       # Configuration (license key, settings)\n\n~/.cache/huggingface/hub/\n├── models--datalab-to--chandra-ocr-2/     # VLM model (~10 GB)\n└── models--nomic-ai--nomic-embed-text-v1.5/  # Embedding model (~500 MB)\n```\n\n**Mac troubleshooting:**\n\n| Issue | Fix |\n|-------|-----|\n| `Python 3.11+ required` | `brew install python@3.12` |\n| `No module named torch` | Re-run `npx -y ocr-provenance-mcp install --mac` |\n| VLM skipped (8 GB Mac) | Normal — OCR and search still work, just no image descriptions |\n| First OCR run is slow | Marker models downloading (~3.3 GB), subsequent runs are fast |\n| Dashboard not opening | Visit `http://localhost:3367` manually in your browser |\n\n### Linux Bare-Metal (No Docker)\n\nSame as macOS but for Linux machines without Docker. Auto-detects NVIDIA CUDA GPUs and falls back to CPU.\n\n**Requirements:** [Node.js](https://nodejs.org/) 20+, Python 3.11+, ~15 GB free disk space.\n\n```bash\nnpx -y ocr-provenance-mcp install --bare\n```\n\n### Cloud Deploy (No Local GPU Required)\n\nNo GPU? No problem. Deploy on [RunPod](https://runpod.io) with a cloud GPU in 4 steps.\n\n#### Step 1: Create a Template\n\nGo to [RunPod](https://runpod.io) → **My Templates** → **New Template**. Fill in:\n\n- **Compute type:** Nvidia GPU\n- **Container image:** `ocrprovenance/ocr-provenance-mcp:latest`\n- **Container disk:** 20 GB\n- **Volume disk:** 100 GB\n- **Volume mount path:** `/data`\n- **HTTP ports:** `3000` (License Server), `3366` (MCP Server API), `3367` (Dashboard)\n- **Environment variables:** `MCP_TRANSPORT=http`, `TORCH_DEVICE=auto`, `MCP_HTTP_PORT=3366`, `PORT=3367`\n\nClick **Save Template**.\n\n<p align=\"center\">\n  <img src=\"docs/images/runpod/01-create-template.png\" alt=\"RunPod Create Template\" width=\"500\" />\n  <br />\n  <em>Template settings with container image, ports, and environment variables</em>\n</p>\n\n#### Step 2: Deploy a Pod\n\nGo to **Pods** → **Deploy**. Select your template and pick a GPU:\n\n| GPU | VRAM | On-Demand | Spot | Best For |\n|-----|------|-----------|------|----------|\n| RTX 3090 | 24 GB | ~$0.34/hr | ~$0.20/hr | Budget processing |\n| RTX 4090 | 24 GB | ~$0.44/hr | ~$0.28/hr | Fast processing |\n| RTX 5090 | 32 GB | ~$0.89/hr | ~$0.53/hr | Large docs + full VLM |\n\nSet **GPU count** to 1. Click **Deploy**.\n\n<p align=\"center\">\n  <img src=\"docs/images/runpod/02-configure-deployment.png\" alt=\"RunPod Configure Deployment\" width=\"700\" />\n  <br />\n  <em>GPU selection, pricing, and storage configuration</em>\n</p>\n\n#### Step 3: Access Your Dashboard\n\nWait ~2-3 minutes for startup. Click the **3367** port link to open the dashboard. All 153 MCP tools are available via the **3366** port.\n\n<p align=\"center\">\n  <img src=\"docs/images/runpod/03-template-settings.png\" alt=\"RunPod Template Settings\" width=\"500\" />\n  <br />\n  <em>Final template with ports and environment variables configured</em>\n</p>\n\nYour data persists on the volume across pod stop/start. **Stop** (don't delete) the pod when not using it — you only pay while the GPU is running.\n\n<details>\n<summary><strong>AI-Assisted Setup</strong> — Give this prompt to any AI agent with browser access to set it up for you</summary>\n\n```\nGo to https://runpod.io and set up a GPU pod:\n\n1. Go to My Templates → New Template with these settings:\n   - Template Name: OCR Provenance MCP\n   - Compute type: Nvidia GPU\n   - Container Image: ocrprovenance/ocr-provenance-mcp:latest\n   - Container Disk: 20 GB\n   - Volume Disk: 100 GB\n   - Volume Mount Path: /data\n   - HTTP Ports: 3000 (License Server), 3366 (MCP Server API), 3367 (Dashboard)\n   - Environment Variables: MCP_TRANSPORT=http, TORCH_DEVICE=auto, MCP_HTTP_PORT=3366, PORT=3367\n   - Save the template\n\n2. Go to Pods → Deploy:\n   - Select the \"OCR Provenance MCP\" template\n   - Choose RTX 5090 (32 GB) GPU, GPU count 1, On-Demand\n   - Click Deploy\n\n3. Wait for \"Running\" status, then click the 3367 port link to verify\n   the dashboard loads. Click the 3366 port link and append /health\n   to verify {\"status\":\"ok\"}.\n```\n\n</details>\n\n<details>\n<summary><strong>Budget alternative: Vast.ai</strong> — RTX 3090 from ~$0.16/hr</summary>\n\n1. Create a [Vast.ai](https://vast.ai) account, add $5 credits\n2. Create a template: image `ocrprovenance/ocr-provenance-mcp:latest`, ports `3000 3366 3367`, 50GB+ disk\n3. Search for machines with 12GB+ VRAM, select one, click Rent\n4. Access dashboard via the Instance Portal port links\n\n</details>\n\n---\n\n## Update\n\nUpdates are safe — **your data is never deleted**. All databases, processed documents, embeddings, and settings live on a persistent Docker volume that is untouched during updates.\n\n### Local Docker\n\n```bash\nnpx -y ocr-provenance-mcp update\n```\n\nThis pulls the latest application image (~700 MB), recreates the container with the new code, and reconnects your existing data volume. Your databases, license key, and processed documents remain exactly as they were.\n\n### macOS / Linux Bare-Metal\n\n```bash\npkill -f \"ocr-provenance-mcp\"              # Stop running server\nnpm install -g ocr-provenance-mcp@latest    # Update the package\n```\n\nThat's it. Your balance, license key, databases, and processed documents persist automatically. Never delete `~/.ocr-provenance-mcp/.machine_id` — this file ties your machine to your account and balance.\n\n### Cloud (RunPod / Vast.ai)\n\n1. Stop your pod\n2. Edit the pod → change Container Image to `leapable/ocr-provenance-mcp:latest`\n3. Start the pod\n\nYour `/data` volume with all databases and documents is preserved across image updates.\n\n### What gets updated vs. what stays\n\n| Updated (new image) | Preserved (data volume) |\n|---------------------|------------------------|\n| MCP server code | All SQLite databases |\n| License server | Processed documents and chunks |\n| Dashboard UI | Embeddings and vectors |\n| Python workers | License key and secrets |\n| LibreOffice | Machine ID and settings |\n| Bug fixes and features | Provenance chains |\n\n---\n\n## What You Get\n\n### 153 MCP Tools Across 18 Categories\n\n| Category | Tools | What It Does |\n|---|---|---|\n| **Document Ingestion** | 7 | Ingest files and directories. Process pending documents, retry failures, reprocess with new settings |\n| **Search** | 7 | Keyword (BM25), semantic (vector), and hybrid search with cross-encoder reranking. Cross-database, saved searches, RAG context |\n| **Document Management** | 10 | List, view, delete, find similar, detect duplicates, version history, structural analysis |\n| **Provenance Tracking** | 6 | Full chain-of-custody: get, verify, export (W3C PROV), query, timeline — all SHA-256 backed |\n| **Vision AI (VLM)** | 3 | Describe images, charts, diagrams, and figures using local Chandra VLM |\n| **Image Processing** | 8 | List, view, search, delete, reanalyze images. Status monitoring and statistics |\n| **Embeddings** | 4 | Generate, list, inspect, rebuild 768-dim vector embeddings. Domain-specific models: general (nomic) or legal (ModernBERT) |\n| **Document Comparison** | 6 | Side-by-side diff, comparison history, auto-discover similar pairs, batch compare, similarity matrix |\n| **Clustering** | 7 | Auto-cluster documents by similarity, inspect clusters, assign, reassign, merge |\n| **Contract Lifecycle** | 9 | Extract clauses, track obligations, calendar view, playbook creation, summarization |\n| **Compliance & Audit** | 5 | SOC 2, HIPAA, SOX reports. Compliance exports. Full audit trail |\n| **Collaboration** | 11 | Annotations, document locking, search alerts, review workflows |\n| **Workflow & Approvals** | 8 | Multi-step approval chains, assignment, queue management, state machine |\n| **Database Management** | 24 | Multi-database support, backup/restore, clone, merge, snapshot, archive, share, transfer, workspace |\n| **Tags & Organization** | 6 | Create, apply, search, remove tags across documents, chunks, images |\n| **Reports & Analytics** | 7 | Quality evaluation, cost tracking, performance metrics, error analytics, trend analysis |\n| **Intelligence** | 5 | Interactive guide, table extraction, smart recommendations |\n| **System** | 20 | Health checks, config, maintenance, license management, live dashboard, webhooks |\n\n### Document Viewer\n\nClick any document in the dashboard to open a full-screen viewer with three tabs:\n\n- **View** — Renders the original file in your browser. PDFs, Office docs, spreadsheets, images, text, markdown — all 18 file types\n- **Chunks** — See exactly what the OCR engine extracted. Every chunk, searchable, expandable\n- **Info** — Full metadata, OCR quality scores, processing timeline, provenance chain verification\n\nSpreadsheets render in landscape with all columns visible. Files auto-cache for 24 hours and clean up automatically.\n\n### 6 AI Models. All Local.\n\n| Model | Purpose | What It Does |\n|---|---|---|\n| **Marker-pdf** v1.10.2 | Document OCR | Converts PDF, DOCX, images to structured text with full layout preservation |\n| **Chandra OCR 2** v0.2.0 | Vision AI | Describes images, charts, diagrams extracted from your documents |\n| **nomic-embed-text-v1.5** | General Embeddings | 768-dimensional vectors for general-purpose semantic search |\n| **ModernBERT Legal** | Legal Embeddings | 768-dimensional vectors fine-tuned on court opinions for legal document search |\n| **HDBSCAN** | Document Clustering | Auto-discovers document groups by semantic similarity |\n| **ms-marco-MiniLM-L-12-v2** | Search Reranking | Cross-encoder that re-scores results for maximum relevance |\n\nModels load into GPU VRAM at the start of each processing job and unload when done. The embedding model is selected per-database — general for everyday documents, legal for contracts and court opinions. Reranker falls back to CPU when GPU is unavailable.\n\n---\n\n## How People Use It\n\n### \"Search my contracts for indemnification clauses that cap liability\"\nCreate a legal database, ingest your contracts, and search with a legal embedding model that understands contractual language. Results ranked by relevance with exact source attribution and page numbers.\n\n### \"Compare the draft and executed versions of this agreement\"\nStructured diff showing every addition, deletion, and modification between two document versions. Side-by-side with similarity scores.\n\n### \"Extract all obligations from this vendor agreement and show me the deadlines\"\nContract metadata, financial terms, obligations, renewal dates, termination provisions. Calendar view of upcoming deadlines across all contracts.\n\n### \"Process the entire /litigation/discovery/ folder\"\nOne command ingests hundreds of documents. OCR, chunking, embeddings, image extraction, VLM descriptions — the full pipeline runs automatically. Legal embedding model handles all the domain-specific semantics.\n\n### \"What does the chart on page 5 show?\"\nChandra VLM analyzes the extracted image and provides a detailed natural-language description.\n\n### \"Prove this text came from the original PDF\"\nCryptographic provenance chain: source document → OCR result → chunk → embedding. SHA-256 verification at every step. Export in W3C PROV format. Admissible chain of custody.\n\n### \"Generate a HIPAA compliance report\"\nStructured compliance reports covering access controls, audit trails, and data handling verification. SOC 2, HIPAA, SOX built in.\n\n---\n\n## Legal Document Intelligence\n\nOCR Provenance includes purpose-built tooling for legal professionals. Every feature works with contracts, court opinions, briefs, statutes, and regulatory filings — with domain-specific search that understands legal language.\n\n### Why Legal-Specific Embeddings Matter\n\nGeneral-purpose search models (like the ones in ChatGPT, Copilot, and most AI tools) treat legal terms as ordinary English. This causes real problems:\n\n| Term | General AI Interpretation | Legal Meaning |\n|------|--------------------------|---------------|\n| \"Consideration\" | Thinking about something | Value exchanged in a contract |\n| \"Party\" | A social event | A person or entity in an agreement |\n| \"Action\" | Doing something | A lawsuit or legal proceeding |\n| \"Interest\" | Curiosity | A legal right, share, or stake |\n| \"Relief\" | Comfort | A court-ordered remedy |\n\nThe legal embedding model ([FreeLawProject ModernBERT](https://huggingface.co/freelawproject/modernbert-embed-base_finetune_8192)) is fine-tuned on millions of court opinions from the [Free Law Project](https://free.law/) (CourtListener, RECAP). It understands legal vocabulary, case citation patterns, and statutory references natively.\n\n### How to Use It\n\n**Step 1: Create a legal database**\n```\nTell your AI: \"Create a database called vendor-contracts with the legal embedding model\"\n```\nOr via MCP tool:\n```json\n{ \"name\": \"vendor-contracts\", \"embedding_model\": \"legal\", \"description\": \"2025 vendor agreements\" }\n```\n\n**Step 2: Ingest your documents**\n```\nTell your AI: \"Ingest all files from /contracts/2025/\"\n```\n\n**Step 3: Search with legal precision**\n```\nTell your AI: \"Search for indemnification clauses that limit liability to direct damages\"\n```\n\nThe search engine embeds your query using the legal model, so it understands what \"indemnification\" and \"direct damages\" mean in a contractual context — not just as English words.\n\n### What Legal Professionals Can Do\n\n| Task | How |\n|------|-----|\n| **Find specific clauses** | \"Search for non-compete provisions with geographic restrictions\" |\n| **Compare contract versions** | \"Compare the draft and executed versions of the Smith agreement\" |\n| **Track obligations** | \"List all payment obligations due in Q2 2025 with deadlines\" |\n| **Extract terms** | \"Extract the termination provisions from this vendor agreement\" |\n| **Compliance review** | \"Generate a HIPAA compliance report for the medical records database\" |\n| **Prove chain of custody** | \"Verify the provenance chain for this extracted clause\" |\n| **Batch processing** | \"Process all 200 contracts in the /litigation/discovery/ folder\" |\n| **Cross-database search** | \"Search across all my contract databases for force majeure clauses\" |\n\n### Model Details\n\n| Property | General Model | Legal Model |\n|----------|--------------|-------------|\n| **Name** | nomic-embed-text-v1.5 | FreeLawProject ModernBERT |\n| **Dimensions** | 768 | 768 |\n| **Max tokens** | 8,192 | 8,192 |\n| **VRAM** | ~1 GB | ~1.5 GB |\n| **License** | Apache 2.0 | Apache 2.0 |\n| **Best for** | General content, transcripts, research | Contracts, court opinions, statutes, briefs |\n| **Trained on** | Web text, Wikipedia, books | Court opinions (CourtListener, RECAP) |\n\nBoth models run 100% locally on your GPU. Both are 768-dimensional, so existing databases and the vector search infrastructure work without any changes. You choose the model per database at creation time.\n\n### Data Privacy for Legal Work\n\nThis system was designed for sensitive documents:\n\n- **100% local processing** — OCR, search, and AI analysis run entirely on your hardware\n- **Zero cloud APIs** — no document content is ever transmitted externally\n- **Cryptographic provenance** — every extracted clause traces back to its source via SHA-256 hash chains\n- **HIPAA/SOC 2/SOX compliance exports** — built-in audit trail reporting\n- **Air-gap capable** — can run with `--network=none` for mathematically provable zero egress\n- **Non-root container** — Docker runs as unprivileged user with `--cap-drop=ALL`\n\nYour client's documents never leave the machine. Period.\n\n---\n\n## Supported File Formats\n\n| Format | Extensions | Viewer Rendering |\n|---|---|---|\n| **PDF** | `.pdf` | Native browser PDF viewer |\n| **Microsoft Office** | `.docx`, `.doc`, `.pptx`, `.ppt`, `.xlsx`, `.xls` | Converted to PDF via LibreOffice |\n| **Spreadsheets** | `.xlsx`, `.xls`, `.csv` | Landscape PDF with fit-to-width (all columns visible) |\n| **Images** | `.png`, `.jpg`, `.jpeg`, `.tiff`, `.tif`, `.bmp`, `.gif`, `.webp` | Direct image display with zoom controls |\n| **Text** | `.txt` | Monospace text viewer |\n| **Markdown** | `.md` | Rendered as styled HTML |\n\n18 file types. Documents are OCR'd with layout preservation. Images get OCR + VLM analysis. All files viewable in the dashboard's built-in document viewer.\n\n---\n\n## Client Registration\n\nIf auto-detection missed your AI client during install:\n\n<details>\n<summary><strong>Claude Code</strong></summary>\n\n```bash\nclaude mcp add ocr-provenance-mcp -s user -- npx -y ocr-provenance-mcp\n```\n</details>\n\n<details>\n<summary><strong>Claude Desktop</strong></summary>\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"ocr-provenance-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ocr-provenance-mcp\"]\n    }\n  }\n}\n```\n\nConfig location:\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- Linux: `~/.config/Claude/claude_desktop_config.json`\n</details>\n\n<details>\n<summary><strong>Cursor</strong></summary>\n\nAdd to `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"ocr-provenance-mcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"ocr-provenance-mcp\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Windsurf / Any MCP Client</strong></summary>\n\n```json\n{\n  \"command\": \"npx\",\n  \"args\": [\"-y\", \"ocr-provenance-mcp\"]\n}\n```\n</details>\n\n---\n\n## CLI Commands\n\n```bash\nnpx ocr-provenance-mcp install           # Full setup: models + app + register\nnpx ocr-provenance-mcp update            # Pull latest image, preserve all data\nnpx ocr-provenance-mcp start             # Start the container\nnpx ocr-provenance-mcp stop              # Stop the container (data preserved)\nnpx ocr-provenance-mcp restart           # Restart with latest config\nnpx ocr-provenance-mcp status            # Health check + endpoints\nnpx ocr-provenance-mcp logs [N]          # View last N lines of logs\nnpx ocr-provenance-mcp config show       # Show all configuration\nnpx ocr-provenance-mcp config set K=V    # Set a config value\nnpx ocr-provenance-mcp uninstall         # Remove container (data volume kept)\n```\n\n### Endpoints\n\n| Endpoint | URL | Description |\n|---|---|---|\n| MCP | `http://localhost:3366/mcp` | MCP protocol endpoint (SSE) |\n| Health | `http://localhost:3366/health` | Service health + tool count |\n| File Upload | `http://localhost:3366/api/upload` | Multipart file upload with dedup |\n| Document Viewer | `http://localhost:3366/api/viewer/*` | Prepare, serve, and cache documents |\n| Dashboard | `http://localhost:3367` | Web UI with document viewer and account management |\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                    Your AI Client                        │\n│         (Claude Code / Desktop / Cursor / Windsurf)      │\n└────────────────────────┬────────────────────────────────┘\n                         │ MCP Protocol (stdio)\n┌────────────────────────▼────────────────────────────────┐\n│              NPX Wrapper (npm package)                   │\n│   stdio ↔ HTTP bridge · Ingest intercept (auto-upload)   │\n│   AI client auto-registration · WSL auto-detection       │\n└────────────────────────┬────────────────────────────────┘\n                         │ HTTP (localhost:3366)\n┌────────────────────────▼────────────────────────────────┐\n│                  Docker Container                        │\n│                                                          │\n│  ┌─────────────────────────────────────────────────┐    │\n│  │          MCP Server (TypeScript)                 │    │\n│  │   153 tools · REST API · Document Viewer         │    │\n│  │   File Upload · Multi-session · Rate limiting    │    │\n│  └──────┬──────────┬──────────┬────────────────────┘    │\n│         │          │          │                           │\n│  ┌──────▼───┐ ┌────▼────┐ ┌──▼──────────┐              │\n│  │ OCR      │ │ VLM     │ │ Embedding   │  GPU Daemons  │\n│  │(Marker)  │ │(Chandra)│ │(nomic/legal)│              │\n│  └──────────┘ └─────────┘ └─────────────┘              │\n│  ┌──────────┐ ┌─────────────────────────┐              │\n│  │ Reranker │ │ Spreadsheet Prep        │  CPU Workers  │\n│  │(MiniLM)  │ │ (openpyxl + LibreOffice)│              │\n│  └──────────┘ └─────────────────────────┘              │\n│                                                          │\n│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  │\n│  │ SQLite +     │  │   License    │  │  Dashboard   │  │\n│  │ sqlite-vec   │  │   Server     │  │  (Next.js)   │  │\n│  │ FTS5 + vec   │  │  (port 3000) │  │ (port 3367)  │  │\n│  └──────────────┘  └──────────────┘  └──────────────┘  │\n└─────────────────────────────────────────────────────────┘\n```\n\n### Provenance Chain\n\nEvery piece of extracted data is cryptographically linked to its source:\n\n```\nDOCUMENT(0) → OCR_RESULT(1) → CHUNK(2)     → EMBEDDING(3)\n                              → IMAGE(2)     → VLM_DESC(3) → EMBEDDING(4)\n```\n\nEach node carries a SHA-256 hash. Verify any result traces back to its original document with `ocr_provenance_verify`. Export the full chain in W3C PROV format.\n\n---\n\n## Performance\n\nBenchmarked on NVIDIA RTX 5090 (32 GB VRAM):\n\n| Operation | Speed | Notes |\n|---|---|---|\n| **OCR** | ~2-5 s/page | Layout-preserving with Marker-pdf (daemon mode) |\n| **Embedding** | ~12 ms/chunk | Daemon mode — model loaded once, reused for entire batch |\n| **VLM image description** | ~2-5 s/image | Chandra generates detailed descriptions |\n| **Semantic search** | < 100 ms | sqlite-vec cosine similarity across 10K+ vectors |\n| **Hybrid search** | < 200 ms | BM25 + semantic with Reciprocal Rank Fusion + cross-encoder reranking |\n| **Full pipeline (1,150 docs)** | ~3 min | OCR + chunk + embed for 1,150 markdown transcripts |\n\n---\n\n## Security\n\n**Your data never leaves your machine.**\n\n- **100% local processing** — all OCR, VLM, and embedding inference runs on your hardware\n- **Ed25519 signed license tokens** — cryptographic authentication with offline verification\n- **SHA-256 provenance chains** — every extraction linked to its source document\n- **HMAC-signed balances** — tamper detection on all billing operations\n- **Container hardening** — `--cap-drop=ALL`, `--security-opt=no-new-privileges`, non-root user\n- **Secret isolation** — signing keys stripped from dashboard process\n- **Input validation** — Zod schema validation on all 153 tool inputs\n- **Path sanitization** — directory traversal prevention on all file operations\n- **Magic byte validation** — upload rejects files with mismatched extensions and suggests the correct format\n- **Cloud auth protection** — dev tokens blocked on non-localhost origins to prevent email spoofing on cloud deployments\n- **Zero telemetry** — no analytics, no tracking, no phone-home\n\n---\n\n## Docker Images\n\nTwo-image architecture for fast updates:\n\n| Image | Size | Contents | Updates |\n|---|---|---|---|\n| `leapable/ocr-provenance-models:v2` | ~14 GB | PyTorch, CUDA, all 5 AI models | Rarely |\n| `leapable/ocr-provenance-mcp:latest` | ~700 MB | MCP server, license server, dashboard, LibreOffice | Every release |\n\nModels image is pulled once and cached. Updates only download the ~700 MB app layer. Your data volume is never touched during updates.\n\n---\n\n## System Requirements\n\n| Component | Minimum | Recommended |\n|---|---|---|\n| **Docker** | Docker Engine 20+ | Docker Desktop (latest) |\n| **Node.js** | 20.0+ | 22+ LTS |\n| **RAM** | 8 GB | 16+ GB |\n| **Disk** | 30 GB | 50+ GB |\n| **GPU** | Optional (CPU works) | NVIDIA RTX 3060+ (8GB+ VRAM) |\n| **OS** | Linux, macOS, Windows (WSL2) | Linux with NVIDIA drivers |\n\nNo GPU? Use [Cloud Deploy](#cloud-deploy-no-local-gpu-required) to run on a cloud GPU instead.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/ChrisRoyse/ocrprovenancelocalmcp.git\ncd ocrprovenancelocalmcp\nnpm install\nnpm run build\nnpm test          # 4,067 tests across 144 files\nnpm run lint:all  # TypeScript + Python\nnpm run typecheck\n```\n\n---\n\n## License\n\n**Dual License** — free for non-commercial use (personal, academic, research, non-profit). Commercial use requires a commercial license.\n\nSee [LICENSE](LICENSE) for full terms.\n\n**Contact:** [chrisroyseai@gmail.com](mailto:chrisroyseai@gmail.com)\n\n---\n\n<p align=\"center\">\n  <strong>Stop copying and pasting. Give your AI the tools to do the work.</strong>\n</p>\n\n```bash\nnpx -y ocr-provenance-mcp install\n```\n","readmeFilename":"README.md"}