Caseware Procurement Document MCP Server
Uses Ollama with llama3.2 to generate grounded answers from retrieved documents, keeping everything local.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Caseware Procurement Document MCP ServerShow me all invoices for Roland Mendel"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Caseware Procurement Document MCP Server
MCP server over a procurement and inventory knowledge base. Ingests invoices, purchase orders, shipping orders, inventory reports, and contracts, then exposes structured (SQL) and semantic (vector) retrieval via MCP tools for AI agents.
Architecture
Documents Pipeline Storage MCP Server
───────── ──────── ─────── ──────────
invoices/ ──▶ ingest.py ──▶ SQLite search_documents
purchase_orders/ ──▶ extract.py ──▶ ChromaDB ──▶ stdio ──▶ get_related_documents
shipping_orders/ ──▶ embed.py server find_order_evidence
inventory_reports──▶ index.py answer_question
contracts/ ──▶Hybrid retrieval: structured questions (e.g. "which invoices are missing a PO?") hit SQL; semantic questions (e.g. "summarize contract terms") hit vector search via sentence-transformers, then Ollama (llama3.2) generates grounded answers with citations.
Related MCP server: AXYS MCP Lite
Prerequisites
Python 3.12+
Tesseract OCR (for image-based invoice extraction)
macOS:
brew install tesseractUbuntu:
apt install tesseract-ocr
Ollama with
llama3.2(for LLM-based answer generation)brew install ollama # macOS # or: curl -fsSL https://ollama.com/install.sh | sh ollama pull llama3.2
Quick Start
# Clone and enter the project
cd caseware.mcp-codechallege
# Install with pip (no venv required)
pip install -e .
# Run full pipeline + start MCP server
python -m src.caseware_documents_mcp.main
# Or with task (recommended)
task install
taskDependencies
Package | Purpose |
| PDF text extraction |
| OCR for scanned/image documents |
| Local embeddings ( |
| Vector storage and similarity search |
| Data models and validation |
| MCP protocol server (stdio transport) |
| LLM inference for grounded answer generation |
All listed in pyproject.toml — no requirements.txt needed.
Data
Documents live in data/ organized by type:
data/
├── invoices/ 10 PDFs + 4 JPGs
├── purchase_orders/ 9 PDFs
├── shipping_orders/ 14 PDFs
├── inventory_reports/ 7 PDFs
└── contracts/ 1 PDF (71 pages)The pipeline auto-detects format: PDFs via PyMuPDF, images via Tesseract OCR.
Usage
Taskfile (recommended)
Command | Description |
| Full pipeline + start MCP server |
| Index documents only |
| Start server (skip indexing) |
| Install into |
| Smoke test — list available tools |
| Show document counts |
| Remove storage + |
Direct
# Full run
python -m src.caseware_documents_mcp.main
# Pipeline only (no server)
python -m src.caseware_documents_mcp.main --pipeline-only
# Skip indexing (if already indexed)
python -m src.caseware_documents_mcp.main --skip-pipelineMCP Tools
Tool | Input | What it does |
|
| Hybrid SQL + vector search |
|
| Cross-document lookup via invoice↔PO↔shipment refs |
|
| Trace an order across all document types with citations |
|
| Routes to SQL or vector search → Ollama answer with sources |
Example questions
"Which invoices are missing a purchase order?"
"Find all documents related to order 10687"
"Summarize the contract terms"
"Show me all invoices for Roland Mendel"
Claude Desktop Integration
See MCPHOWTO.md for detailed setup instructions.
Project Structure
src/caseware_documents_mcp/
├── models.py # Pydantic models
├── main.py # Entry point
├── pipeline/
│ ├── ingest.py # PDF + OCR extraction
│ ├── extract.py # Structured field parsing
│ ├── embed.py # Chunking + embeddings
│ └── index.py # Cross-document reference builder
├── db/
│ ├── schema.py # SQLite DDL
│ └── queries.py # SQL queries
├── retrieval/
│ ├── classifier.py # Question routing
│ ├── structured.py # SQL-based retrieval
│ └── semantic.py # Vector search
└── server/
└── mcp_server.py # MCP stdio serverDesign Decisions
SQLite + ChromaDB over a single vector store — procurement data is fundamentally relational; vector search alone misses invoice↔PO↔shipment links
Regex extraction over LLM-based parsing — the documents follow predictable templates (Northwind-style); regex is faster, cheaper, and more reliable
sentence-transformers for local embeddings — no API calls needed;
all-MiniLM-L6-v2is 80MB and runs on CPUOllama for answer generation — keeps everything local;
llama3.2provides good results for summarization and reasoningKeyword classifier over LLM router — pattern matching on the question is sufficient to distinguish "which invoices are missing a PO?" (SQL) from "summarize the contract" (vector)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/luiscanaveral/caseware.codechallenge.mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server