procurement-agent-mcp
MCP server that automates the procurement workflow, including RFQ generation, quote parsing, ERP item loading, and purchase requisition submission with human-in-the-loop approval gates.
README
Agentic Procurement Workflow
Disclaimer: All data in this project is synthetic, modeled on real manufacturing scenarios. The taskboard, mail, and ERP systems are local mock services. Not affiliated with or derived from any employer's systems.
Problem
Procurement is expensive and time-consuming. In my experience, engineers routinely spend 4 or more hours per week on it — sending requests for quotes (RFQ), waiting on quotes, parsing through quotes, loading items into the ERP, creating purchase requisitions (PRQ), sending them to purchasing, waiting on confirmation, and then posting tracking information in a project management system. At a $50/hr base wage (~$70/hr burdened), that is roughly $14,000 per engineer per year, before counting the opportunity cost of an engineer not engineering. Multiply this across a department.
The process is simple and repetitive, but it is not easily automatable. Quotes come in all shapes and sizes. Items don't line up between the RFQ and the quotes that come back — Vendor A splits your line 3 into two lines, Vendor B substitutes an equivalent part without saying so, and Vendor C skips it entirely. "Compare line 3" stops having an obvious meaning. The same part also goes by several names (HHCS, hex head cap screw, hex bolt), so matching a free-text description to a catalog item number is its own problem. Lead times are never concrete. Any tool that quietly guesses at these will produce wrong answers that look right.
Procurement also cannot be fully automated, because the financial and commercial risk is real. Errors cost money or project timeline, and both are painful to unwind. For that reason this workflow uses human gates. A human verifies the agent's work before a PRQ is sent, and a human creates and sends the PO. The agent never sends a PO.
Approach
This workflow utilizes an AI agent to take care of all the tedious data entry and administrative work of the procurement process, while still keeping a human in the loop to confirm critical steps in the workflow.
-
The human operator selects a project's item list and tells the agent to begin procurement.
-
The agent generates RFQ emails. The email contains quantity needed, part number, description, and drawings (if applicable). It requests a quote that includes pricing and lead time. The agent sends the emails to the various vendor representatives.
-
Upon the first vendor quote received, a configurable quote window timer begins. Once all expected quotes are returned or the timer runs out, the agent processes the quotes. If a quote is not able to be processed or items don't match up, the human operator is notified. At this point the human operator will disposition the issue. Once dispositioned, the operator can manually tell the agent what items correlate to price and lead time. Once all items are resolved, the agent creates a report for the human operator.
-
[HUMAN GATE] The human operator then reviews the report and tells the agent which vendor's quote to use.
-
The agent loads the resolved lines into the ERP. The item number is the key, so the agent writes only the item number, quantity, awarded vendor, cost, and lead time. The ERP's item master supplies the rest of the record. Nothing is written against a guessed item number.
-
The agent assembles the PRQ (line items, awarded vendor, pricing, lead times, attached quotes and drawings) and submits it to purchasing. This write is guarded with an idempotency key and logged, so a retry cannot submit it twice.
-
[HUMAN GATE] The purchasing department representative reviews the PRQ and quote. If all looks good, purchasing creates a PO, sends it to the vendor, and the ERP is populated with the PO number. The agent never creates the PO in this workflow.
-
The agent will poll the ERP system. Once it detects that items from the PRQ had a PO created, it uploads that PO number to project management software where the human operator can keep track of order progress.
Every agent action is logged with its inputs, outputs, and a timestamp. Write operations carry an idempotency key, so re-running a step (a retry after a timeout, a reconciliation loop that fires twice) never double-posts to the ERP or re-sends an RFQ.
Architecture
An MCP server exposes the procurement workflow as a set of tools an agent can call. Behind those tools sit a SQLite state layer, a quote parsing pipeline, an item resolution step, and HTTP clients for the taskboard, mail, and ERP systems. All three backends are local mock services.
Architecture diagram and component breakdown to follow.
Demo
WIP
How to Run
Requires uv and Python 3.12 or newer.
git clone git@github.com:njsav26/procurement-agent-mcp.git
cd procurement-agent-mcp
uv sync
uv run pytest
What I Would Do Next
Known Limitations
- Quote extraction is template driven. New vendors need new templates.
- Edge cases are flagged for human intervention rather than handled.
- Cannot handle scanned or image-only PDFs. There is no OCR capability.
What a Production Version Requires
- Real authentication against the real systems
- Logging and metrics
- Retry logic for failed writes to the ERP
- Access control — who can approve quotes and trigger a write
What I Would Design Differently
- TBD after implementation
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.