Enterprise Procurement MCP Server

Enterprise Procurement MCP Server

Enables AI-powered procurement policy compliance, document generation, supplier management, budget verification, and analytics through standardized MCP tools.

Category
访问服务器

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 regulations
  • ask_compliance_question - Ask compliance questions with citations
  • explain_clause - Explain procurement clauses in plain language
  • recommend_procurement_method - Recommend procurement method
  • generate_compliance_checklist - Generate compliance checklist
  • compare_policy_versions - Compare policy document versions

Procurement Planning

  • create_procurement_plan - Create procurement plan
  • validate_procurement_plan - Validate plan completeness
  • generate_procurement_calendar - Generate procurement calendar
  • forecast_procurement_needs - Forecast procurement needs
  • review_procurement_plan_compliance - Review plan compliance

Tender & RFQ/RFP

  • generate_tender_document - Generate tender document
  • generate_invitation_to_tender - Generate ITT
  • generate_scope_of_work - Generate SoW
  • generate_evaluation_criteria - Generate evaluation criteria
  • generate_rfq - Generate Request for Quotations
  • generate_rfp - Generate Request for Proposals

Supplier Management

  • assess_supplier_risk - Assess supplier risk
  • verify_supplier_documents - Verify supplier documents
  • generate_supplier_scorecard - Generate supplier scorecard
  • check_conflict_of_interest - Check conflicts of interest

Budget & Finance

  • check_budget_availability - Check budget availability
  • reserve_budget_commitment - Reserve budget commitment
  • budget_utilization_summary - Budget utilization summary
  • match_po_grn_invoice - Three-way matching
  • detect_duplicate_invoice - Detect duplicate invoices

Contract Management

  • review_contract - Review contract risks
  • extract_contract_clauses - Extract all clauses
  • compare_contract_to_template - Compare to template

Analytics

  • spend_by_category - Spend analysis by category
  • spend_by_supplier - Spend analysis by supplier
  • detect_maverick_spending - Detect maverick spending
  • get_market_price - Get market price intelligence
  • forecast_price_trend - Forecast price trends

Audit

  • audit_procurement_file - Audit procurement file
  • detect_missing_documents - Detect missing documents
  • detect_procurement_red_flags - Detect red flags

Integrations

  • list_integrations - List available integrations
  • connect_integration - Connect to ERP system
  • fetch_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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选