Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Procurement MCP Server

Crates.io Docs.rs License ADK-Rust Enterprise Registry Ready

AI-powered procurement engine for ADK-Rust Enterprise agents. Provides 37 MCP tools covering the full source-to-pay lifecycle — supplier management, purchase orders, RFQs, contracts, goods receipt, 3-way matching, budgets, diversity tracking, and 10 unique intelligence tools for risk scoring, price benchmarking, carbon footprint, demand forecasting, and AI-powered negotiation briefs. Feature parity with SAP Ariba and Coupa, plus capabilities neither offers.

Architecture

Procurement MCP Architecture

Key Principles

  • Source-to-pay lifecycle — from supplier onboarding through payment reconciliation.
  • AI-powered intelligence — 10 tools that no competitor offers: risk scoring, benchmarking, ESG, forecasting.
  • 3-way matching — automatic PO vs receipt vs invoice reconciliation with tolerance.
  • ESG built-in — carbon footprint estimation and supplier diversity tracking.
  • Governance — multi-level approvals, budget checks, maverick spend detection.
  • Zero configuration — starts immediately with no external dependencies.

Tools (37)

Supplier Management (4)

Tool Description
supplier_create Register supplier (name, category, country, terms, contact)
supplier_list List all suppliers
supplier_get Get supplier details
supplier_rate Rate supplier (0-5 stars)

Purchase Orders (6)

Tool Description
po_create Create PO with line items
po_list List all POs
po_get Get PO details
po_approve Approve PO (governance gate)
po_send Send to supplier
po_cancel Cancel PO

RFQ — Request for Quotation (4)

Tool Description
rfq_create Create RFQ, send to multiple suppliers
rfq_respond Submit supplier quote (prices, lead time)
rfq_compare Side-by-side comparison of all responses
rfq_award Award to winning supplier

Contracts (3)

Tool Description
contract_create Create contract (fixed price, T&M, blanket, framework)
contract_list List contracts (flags expiring within 90 days)
contract_get Get contract details

Goods Receipt & Matching (2)

Tool Description
goods_receive Receive goods (partial/full, rejections)
three_way_match PO vs receipt vs invoice — flags discrepancies

Budget & Compliance (5)

Tool Description
budget_set Set department budget by category/period
budget_check Verify PO fits budget (approve/reject recommendation)
diversity_set Set supplier diversity certifications
diversity_report Diverse spend %, certification breakdown
approval_escalate Route to Manager/Director/CFO by amount

Catalogs (2)

Tool Description
catalog_add Add items to supplier punch-out catalog
catalog_search Search across all supplier catalogs

Analytics (1)

Tool Description
spend_analysis Total spend by supplier/category

🏆 Intelligence — Unique Selling Proposition (10)

Tool Description Why unique
supplier_risk_score Multi-factor risk score (0-100): country, performance, contracts, rating Real-time risk assessment
price_benchmark Compare quote vs historical avg/min/max — verdict + recommendation Automatic price intelligence
carbon_footprint CO2 kg per shipment (weight × distance × transport mode) ESG compliance built-in
supplier_recommend AI-ranked supplier suggestions by score Eliminates manual searching
contract_clause_check Flag risky clauses (auto-renewal, liability, IP, non-compete) Legal risk automation
demand_forecast Predict future spend from historical patterns Proactive procurement
savings_opportunity Find same SKU at different prices across suppliers Automatic cost reduction
supplier_scorecard A/B/C/D grade (delivery %, quality %, rating) Data-driven management
maverick_spend_detect Purchases outside contracted suppliers Compliance automation
negotiation_brief Leverage analysis, BATNA, talking points, strategy AI negotiation prep

Installation

cargo install mcp-procurement

Client Configuration

{
  "mcpServers": {
    "procurement": { "command": "mcp-procurement" }
  }
}

Quick Start

1. Register suppliers

{"name": "supplier_create", "arguments": {"name": "Acme Steel Ltd", "category": "raw_materials", "country": "KE", "payment_terms": "net30"}}
{"name": "supplier_create", "arguments": {"name": "Global Parts Inc", "category": "raw_materials", "country": "CN", "payment_terms": "net60"}}

2. Run an RFQ

{"name": "rfq_create", "arguments": {"title": "Steel Rods Q3", "items": [{"description": "Steel Rod 12mm", "quantity": 5000, "unit": "kg"}], "supplier_ids": ["sup_abc", "sup_def"], "deadline": "2026-07-01", "created_by": "james"}}
{"name": "rfq_respond", "arguments": {"rfq_id": "rfq_xyz", "supplier_id": "sup_abc", "unit_prices": [2.50], "lead_time_days": 14}}
{"name": "rfq_respond", "arguments": {"rfq_id": "rfq_xyz", "supplier_id": "sup_def", "unit_prices": [2.20], "lead_time_days": 21}}
{"name": "rfq_compare", "arguments": {"po_id": "rfq_xyz"}}

3. Create and approve PO

{"name": "po_create", "arguments": {"supplier_id": "sup_def", "lines": [{"sku": "STEEL-12MM", "description": "Steel Rod 12mm", "quantity": 5000, "unit_price": 2.20}], "created_by": "james"}}
{"name": "budget_check", "arguments": {"department": "manufacturing", "amount": 11000}}
{"name": "po_approve", "arguments": {"po_id": "po_abc", "approved_by": "director_kim"}}

4. Receive and match

{"name": "goods_receive", "arguments": {"po_id": "po_abc", "lines": [{"sku": "STEEL-12MM", "quantity_received": 4950, "quantity_rejected": 50, "rejection_reason": "surface defects"}], "received_by": "warehouse_john"}}
{"name": "three_way_match", "arguments": {"po_id": "po_abc", "invoice_number": "INV-2026-0891", "invoice_amount": 10890}}

5. Intelligence tools

{"name": "supplier_risk_score", "arguments": {"supplier_id": "sup_def"}}
{"name": "price_benchmark", "arguments": {"sku": "STEEL-12MM", "quoted_price": 2.50}}
{"name": "carbon_footprint", "arguments": {"supplier_id": "sup_def", "weight_kg": 5000, "distance_km": 8500, "transport_mode": "sea"}}
{"name": "negotiation_brief", "arguments": {"supplier_id": "sup_def", "items": ["Steel Rod 12mm"], "target_discount_pct": 15}}

Procurement Flow

supplier_create → rfq_create → rfq_respond (×N) → rfq_compare → rfq_award
                                                         │
                    budget_check ← po_create ←───────────┘
                         │
                    po_approve → po_send → goods_receive → three_way_match
                         │                                        │
                 approval_escalate (if over threshold)      invoice paid ✓

Intelligence Tools — Deep Dive

Supplier Risk Score

{"risk_score": 72, "risk_level": "medium_risk", "factors": {"country_risk": 70, "performance": 85, "contract_coverage": 40, "rating": 80}}

Price Benchmark

{"quoted_price": 2.50, "historical_avg": 2.35, "vs_average_pct": 6.38, "verdict": "acceptable"}

Carbon Footprint

{"co2_kg": 6.8, "transport_mode": "sea", "trees_to_offset": 0.32, "rating": "low"}

Negotiation Brief

{"leverage": "strong", "alternative_suppliers": 4, "strategy": "competitive_pressure", "talking_points": ["We've spent USD 150,000 over 23 orders", "We have 4 alternative suppliers"], "batna": "Switch to alternative supplier"}

Competitive Comparison

Feature SAP Ariba Coupa Oracle Us
Supplier management
Purchase orders
RFQ/RFP
3-way match
Contracts
Supplier diversity
Punch-out catalogs
Budget checking
Multi-level approval
AI risk scoring
Price benchmarking Partial Partial
Carbon footprint
AI supplier recommend
Contract clause check
Demand forecast
Savings detection Partial
Supplier scorecard
Maverick spend
Negotiation brief
Zero config
Open source

Error Codes

Code Meaning
SUPPLIER_NOT_FOUND Supplier ID doesn't exist
PO_NOT_FOUND Purchase order ID doesn't exist
PO_NOT_IN_DRAFT PO already approved/sent
PO_NOT_APPROVED Can't send unapproved PO
RFQ_NOT_FOUND RFQ ID doesn't exist
CONTRACT_NOT_FOUND Contract ID doesn't exist

Integration

Server How it connects
mcp-inventory stock_receive on goods receipt
mcp-pricing Price rules for catalog items
mcp-workflow Approval workflows for POs
mcp-legal Sanctions screening for suppliers
mcp-messaging Notify suppliers on PO send

Documentation

Document Description
mcp-server.toml ADK-Rust Enterprise registry manifest
Rust Docs Generated API documentation

Contributing

Contributions welcome. Priority areas:

  • Supplier portal (self-service onboarding)
  • E-procurement marketplace
  • Auction/reverse auction support
  • AP automation (invoice processing)
  • Supplier collaboration messaging

Contributors


James Karanja Maina

License

Apache-2.0 — see LICENSE for details.


Part of the ADK-Rust Enterprise MCP server ecosystem.

Built with ❤️ by Zavora AI

Registry Compliance

This server implements the ADK MCP SDK contract:

  • HealthCheck — async health probe for registry monitoring
  • mcp-server.toml — manifest declaring tools, risk classes, and credentials
  • Structured tracingRUST_LOG env-filter for observability
  • Governance gates — PO approval required, budget checks, multi-level escalation

rmcp and MCP compatibility

This server is built with rmcp 3.1.2 and requires Rust 1.94.1 or newer. The rmcp 3 rollout retains legacy MCP initialization compatibility and targets MCP protocol revisions 2025-11-25 and 2026-07-28.

MCP 2026-07-28 rollout (P4 workflow/business)

This server uses rmcp 3.1.2 and adk-mcp-sdk 0.2 with a minimum supported Rust version of 1.94.1. It accepts stateless MCP 2026 requests with per-request protocol, client identity, and capability metadata while retaining the legacy MCP 2025-11-25 initialize flow for ordinary tools.

  • Tasks: demand_forecast
  • MRTR approvals: po_approve, rfq_award
  • Discovery and routing: rmcp serves on-demand discovery and validates the per-request protocol envelope; HTTP deployments can route with Mcp-Method and Mcp-Name. The packaged binary currently uses stdio.
  • Caching: tools/list returns a public ttlMs of 60,000 for MCP 2026; rmcp omits the cache fields for legacy clients.
  • Deprecated extensions: this server does not add new Roots, Sampling, or dynamic client-registration dependencies.

Protected tools require MCP_REQUEST_STATE_KEY with at least 32 high-entropy bytes. All replicas must share that key so sealed approval state can resume on another instance. Approval state is bound to the client identity, tool, and arguments and expires after two minutes. Missing identity, invalid state, rejection, or legacy protocol use fails closed. Task records are process-local for the current stdio runtime; use a durable task store before deploying the server behind scale-to-zero HTTP infrastructure.

About

AI-powered procurement engine for ADK-Rust Enterprise agents. Provides 37 MCP tools covering the full source-to-pay lifecycle — supplier management, purchase orders, RFQs, contracts, goods receipt, 3-way matching, budgets, diversity tracking, and 10 unique intelligence tools for risk scoring, price benchmarking, carbon footprint, demand forecasts

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages