Enables sending quote documents via email through Gmail's SMTP service, with dry-run and approval workflow capabilities for manufacturing quotes.
MCP Quoting System
An MCP (Model Context Protocol) based intelligent quoting system that compares incoming RFPs against historical quotes to generate accurate cost estimates and lead times.
🚀 Quick Start (Windows)
New to the system? Just double-click START.bat and choose option [1] for automatic setup!
See these guides:
QUICKSTART.md - Visual guide with workflows and examples
BATCH-FILES-README.md - Complete batch file documentation
TEST-CASES.md - Sample RFQs to test the system
Available Batch Files
START.bat- Main interactive launcher (recommended) ⭐setup.bat- First-time installation wizardstart-dev.bat- Start development serverstart-prod.bat- Start production serverquick-test.bat- Automated testingstop.bat- Stop the serverSee BATCH-FILES-README.md for complete list
Features
RFP Parsing: Automatically extracts material, processes, quantities, tolerances, and other key information from text-based RFPs
Historical Matching: Compares new requests against past quotes using intelligent similarity scoring
Cost Estimation: Activity-based costing with material, processing, labor, tooling, and overhead calculations
Lead Time Prediction: Estimates delivery time based on quantity, processes, and historical data
Confidence Scoring: Provides low/medium/high confidence ratings based on data completeness and match quality
Human-in-Loop: Requires approval before sending quotes, with full audit trails
Idempotency: Prevents duplicate processing of the same RFP
Architecture
The system is built as an MCP server with the following capabilities:
MCP Functions (Capabilities)
ingestRfp - Parse RFP text and extract structured information
findSimilarQuotes - Search historical database for similar past quotes
estimateCostLeadTime - Calculate cost and lead time estimates
generateQuote - Create formatted quote documents
approveQuote - Mark quotes as approved (human-in-loop)
sendQuote - Send quotes via email (dry-run enabled)
Coordinator
evaluateRfpAndDraftQuote - Orchestrates all functions to produce a complete quote evaluation
Installation
Configuration
Copy
.env.exampleto.env:
Edit
.envwith your settings:
Usage
Start the Server
Development mode:
Production mode:
Load Sample Historical Data
Copy sample quotes to the main database:
Example API Calls
1. Full Quote Evaluation (Coordinator)
2. Get Formatted Review
3. View Historical Quotes
4. Add Historical Quote
Similarity Matching
The system uses rule-based similarity scoring with weighted components:
Material (35%): Exact, family, or partial matches
Processes (30%): Overlap of required processes
Quantity (20%): Same range or adjacent ranges
Tolerances (10%): Matching precision requirements
Finish (5%): Surface treatment matching
Confidence Thresholds
High confidence (≥85%): Very similar to past work, reliable estimate
Medium confidence (70-85%): Similar family, adjust with caution
Low confidence (<70%): New type of work, requires engineer review
Cost Estimation
Activity-based costing model:
Components
Material Cost: Unit price × quantity (from material price list)
Processing Cost: Sum of process times × machine hour rate
Labor Cost: Operator time × labor rate
Tooling Amortization: Setup cost / quantity
Overhead: 15% of direct costs
Margin: 20% profit margin
Contingency: 10% for low-confidence quotes
Lead Time Calculation
Adjustments based on:
Quantity (higher volume = longer lead time)
Process complexity (heat treat, plating add time)
Historical actual lead times from similar quotes
Data Storage
Currently uses JSON files in the data/ directory:
quotes.json- Historical quotes databaseevaluations.json- Recent RFP evaluations (last 100)
For production, consider migrating to:
PostgreSQL for relational data
Vector database (Pinecone, Weaviate) for semantic similarity search
Redis for caching and idempotency
Safety Features
Human-in-Loop: All quotes default to "draft" status
Dry-Run Email: Email sending requires explicit enablement
Idempotency: Duplicate RFPs return cached results
Audit Trails: All evaluations logged with timestamps
Confidence Scoring: Flags uncertain estimates for review
Extending the System
Add New Materials
Edit src/config.ts:
Add New Processes
Edit src/config.ts:
Integrate Vector Search
Replace the rule-based matcher in src/matcher.ts with:
OpenAI embeddings for RFP text
Vector DB (Pinecone, Weaviate, FAISS)
Cosine similarity search
Metadata filtering (material, process)
Add Database Backend
Replace src/storage.ts with database adapters:
Use Prisma or TypeORM for PostgreSQL
Implement connection pooling
Add transactions for data integrity
Testing
Create test RFPs:
API Documentation
See full API documentation in the console output when starting the server.
Troubleshooting
No historical matches found
Check that
data/quotes.jsonexists and has contentVerify material names match (case-insensitive)
Lower similarity threshold in
src/config.ts
Costs seem incorrect
Review material prices in
src/config.tsAdjust machine hour rate and labor rate
Check overhead and margin percentages
Lead times too short/long
Adjust
defaultLeadDaysin configReview process time estimates
Check quantity-based scaling logic
Future Enhancements
ML-based similarity: Train model on historical quote-to-win patterns
Drawing analysis: Extract features from CAD/PDF drawings
Supplier integration: Real-time material lead times from vendors
CRM integration: Auto-populate customer info
Dashboard UI: React frontend for engineers to review/approve
Analytics: Win/loss tracking, pricing optimization
Multi-currency: International quote support
Revision tracking: Quote version history
License
MIT
Support
For issues or questions, please contact your system administrator.
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Intelligently generates cost estimates and lead times for manufacturing RFPs by parsing requests, matching against historical quotes, and calculating activity-based costs with confidence scoring and human approval workflows.