Enterprise Procurement MCP Server
Enables AI-powered procurement policy compliance, document generation, supplier management, budget verification, and analytics through standardized MCP tools.
README
Enterprise Procurement MCP Server
A production-ready MCP (Model Context Protocol) server for Enterprise Procurement Intelligence. Provides AI-powered procurement policy compliance, document generation, supplier management, budget verification, and analytics through standardized MCP tools.
Features
- Policy & Compliance: RAG-powered search over procurement laws, regulations, SOPs, and templates
- Procurement Planning: Create, validate, and review procurement plans
- Document Generation: Generate tender documents, RFQs, RFPs, contracts
- Supplier Management: Risk assessment, due diligence, performance scoring
- Budget Verification: Real-time budget availability checks and commitment tracking
- Three-Way Matching: PO-GRN-Invoice matching with variance detection
- Spend Analytics: Category, supplier, and department spend analysis
- Market Intelligence: Price comparison, trend forecasting, anomaly detection
- Procurement Audit: Compliance checks, red flag detection, approval trail verification
- ERP Integration: Extensible adapter framework for SAP, Oracle, Dynamics, Odoo
- Document Management: Support for PDF, DOCX, TXT, Markdown, HTML, CSV, XLSX
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ MCP Client (OpenCode, Claude, etc.) │
└──────────────────────────────┬──────────────────────────────────────┘
│ MCP Protocol (stdio)
┌──────────────────────────────▼──────────────────────────────────────┐
│ MCP Server (StdioServerTransport) │
│ ┌────────────────────────────────────────────────────────────────┐│
│ │ Tool Router ││
│ │ tools/list | tools/call | Zod Validation | Auth/RBAC ││
│ └────────────────────────────────────────────────────────────────┘│
┌─────────┬──────────┬──────────┬─────────┬──────────┬──────────────┐│
│ Policy │ Planning │ Tender │ RFQ/RFP │ Supplier │ Bid Eval ││
│ & Comp │ │ Generator│ Author │ Risk │ ││
├─────────┼──────────┼──────────┼─────────┼──────────┼──────────────┤│
│ Contract│ Req/PO │ Budget │ 3-Way │ Perform │ Spend/Market││
│ Review │ │ Verify │ Match │ Analytics│ Analytics ││
├─────────┴──────────┴──────────┴─────────┴──────────┴──────────────┤│
│ RAG Pipeline (pgvector) ││
│ Document Ingest → Chunk → Embeddings → Vector Search → Citations ││
├───────────────────────────────────────────────────────────────────┤│
│ Integration Adapters ││
│ SAP │ Oracle │ Dynamics │ Odoo │ e-Proc │ SharePoint │ MinIO/S3 ││
└───────────────────────────────────────────────────────────────────-┘
Quick Start
Local Development
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env
# Edit .env with your configuration
# Start PostgreSQL and Redis
docker compose up -d postgres redis
# Run database migrations
npm run db:migrate
# Seed sample data
npm run db:seed
# Start the MCP server
npm run dev
Using Docker
# Start all services
docker compose up -d
# Run migrations
docker compose exec app npx prisma migrate deploy
# Seed data
docker compose exec app npm run db:seed
Connecting from MCP Clients
OpenCode Configuration
Add to your opencode.json:
{
"mcpServers": {
"procurement": {
"command": "node",
"args": ["path/to/procurement-mcp-server/dist/server.js"],
"env": {
"API_KEY": "your-api-key",
"DATABASE_URL": "postgresql://...",
"REDIS_URL": "redis://..."
}
}
}
}
Claude Desktop Configuration
Add to your Claude Desktop config:
{
"mcpServers": {
"procurement": {
"command": "node",
"args": ["path/to/procurement-mcp-server/dist/server.js"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
VS Code / Cursor
Configure the MCP server in the AI extension settings using the same command format.
Environment Variables
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Required |
REDIS_URL |
Redis connection string | redis://localhost:6379 |
OPENAI_API_KEY |
OpenAI API key for embeddings | Optional |
EMBEDDING_PROVIDER |
Embedding provider (openai/local/mock) | mock |
API_KEY |
MCP server API key | dev-key |
STORAGE_PROVIDER |
Document storage (local/minio/s3) | local |
LOG_LEVEL |
Logging level | info |
Available MCP Tools
Policy & Compliance
search_policy- Search procurement policies and regulationsask_compliance_question- Ask compliance questions with citationsexplain_clause- Explain procurement clauses in plain languagerecommend_procurement_method- Recommend procurement methodgenerate_compliance_checklist- Generate compliance checklistcompare_policy_versions- Compare policy document versions
Procurement Planning
create_procurement_plan- Create procurement planvalidate_procurement_plan- Validate plan completenessgenerate_procurement_calendar- Generate procurement calendarforecast_procurement_needs- Forecast procurement needsreview_procurement_plan_compliance- Review plan compliance
Tender & RFQ/RFP
generate_tender_document- Generate tender documentgenerate_invitation_to_tender- Generate ITTgenerate_scope_of_work- Generate SoWgenerate_evaluation_criteria- Generate evaluation criteriagenerate_rfq- Generate Request for Quotationsgenerate_rfp- Generate Request for Proposals
Supplier Management
assess_supplier_risk- Assess supplier riskverify_supplier_documents- Verify supplier documentsgenerate_supplier_scorecard- Generate supplier scorecardcheck_conflict_of_interest- Check conflicts of interest
Budget & Finance
check_budget_availability- Check budget availabilityreserve_budget_commitment- Reserve budget commitmentbudget_utilization_summary- Budget utilization summarymatch_po_grn_invoice- Three-way matchingdetect_duplicate_invoice- Detect duplicate invoices
Contract Management
review_contract- Review contract risksextract_contract_clauses- Extract all clausescompare_contract_to_template- Compare to template
Analytics
spend_by_category- Spend analysis by categoryspend_by_supplier- Spend analysis by supplierdetect_maverick_spending- Detect maverick spendingget_market_price- Get market price intelligenceforecast_price_trend- Forecast price trends
Audit
audit_procurement_file- Audit procurement filedetect_missing_documents- Detect missing documentsdetect_procurement_red_flags- Detect red flags
Integrations
list_integrations- List available integrationsconnect_integration- Connect to ERP systemfetch_vendors_from_erp- Fetch vendors from ERP
Example Tool Calls
# Search procurement policies
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_policy","arguments":{"query":"open tendering threshold"}}}' | node dist/server.js
# Check budget availability
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_budget_availability","arguments":{"budgetCode":"BUD-IT-2024","amount":50000}}}' | node dist/server.js
# Generate compliance checklist
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"generate_compliance_checklist","arguments":{"procurementMethod":"Open Tendering","procurementCategory":"IT Equipment","estimatedValue":150000}}}' | node dist/server.js
Testing
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Watch mode
npm run test:watch
Project Structure
src/
├── server.ts # Entry point
├── config/env.ts # Environment configuration
├── common/ # Shared utilities (logger, errors, database)
├── auth/ # Authentication & RBAC
├── mcp/ # MCP server & tools
│ ├── index.ts # MCP server setup
│ └── tools/ # Tool implementations (17 categories)
├── modules/ # Business logic
│ ├── documents/ # Document management
│ ├── rag/ # RAG pipeline
│ ├── embeddings/ # Embedding service abstraction
│ ├── procurement/ # Procurement planning
│ ├── suppliers/ # Supplier management
│ ├── contracts/ # Contract management
│ ├── requisitions/ # Purchase requisitions
│ ├── purchase-orders/ # Purchase orders
│ ├── budgets/ # Budget management
│ ├── invoices/ # Invoice matching
│ ├── analytics/ # Spend & market analytics
│ ├── audit/ # Audit & compliance
│ └── integrations/ # ERP adapters
├── workers/ # Background workers (ingestion, embedding)
└── database/ # Database client
prisma/
├── schema.prisma # Database schema
└── seed.ts # Seed data
tests/ # Test files
docs/ # Documentation
docker/ # Docker configuration
Security
- API key authentication with SHA-256 hashing
- Role-Based Access Control (RBAC) with granular permissions
- Input validation via Zod schemas
- SQL injection protection via Prisma ORM
- Audit logging for every tool call
- Safe file upload with type allowlist and size limits
- No secrets in code — all via environment variables
- Structured error responses (no stack traces in production)
Production Deployment
See docs/DEPLOYMENT.md for production deployment guides including Docker, VPS, and Kubernetes.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.