Tri-Tender Pricing MCP MCP Server

$pip install -r requirements.txt
README.md

Automate tender and RFQ pricing by extracting requirements from documents.

Tri‑Tender Pricing MCP

This is a production‑ready Model Context Protocol (MCP) server built with FastMCP for Tri‑Tender. It focuses on pricing schedules for tenders and RFQs.

The server exposes tools that:

  1. Detect and extract pricing requirements from tender packs
  2. Build a structured pricing model from tender rules + company rates
  3. Calculate final prices (including markups & VAT)
  4. Optionally compare against market prices
  5. Generate a styled HTML pricing report ready for PDF export
  6. Wrap the output in a Tri‑Tender‑friendly format for preview

1. Project Structure

tri_tender_pricing_mcp/
├── server.py
├── requirements.txt
├── README.md
├── tools/
│   ├── extract_pricing_requirements.py
│   ├── build_pricing_model.py
│   ├── calculate_prices.py
│   ├── generate_html_report.py
│   ├── fetch_market_prices.py
│   └── format_output.py
├── utils/
│   ├── pdf_reader.py
│   ├── docx_reader.py
│   ├── xlsx_reader.py
│   ├── classify_document.py
│   └── clean_text.py
└── resources/
    ├── pricing_templates/
    │   ├── base_template.html
    │   ├── table_style.css
    │   └── branding.css
    └── sample_data/
        └── example_pricing.json

2. Installation

Create and activate a virtual environment (recommended), then:

pip install -r requirements.txt

Verify that FastMCP is installed:

fastmcp version

3. Running the MCP Server

fastmcp run server.py

By default FastMCP will use stdio for transport. Some hosts also support:

python server.py

or

fastmcp run --transport sse --host 0.0.0.0 --port 8000 server.py

(Consult the FastMCP docs / your host's docs if you want SSE or HTTP.)

4. Registering in Tri‑Tender (Desktop / Dyad)

Use a configuration entry like this in your MCP client:

{
  "mcpServers": {
    "tri_tender_pricing_mcp": {
      "command": "python",
      "args": ["server.py"],
      "env": {}
    }
  }
}

If you deploy it remotely with SSE/HTTP, you can instead use:

{
  "mcpServers": {
    "tri_tender_pricing_mcp": {
      "url": "http://YOUR-HOST:8000/sse"
    }
  }
}

5. Exposed Tools

`detect_pricing_requirements(file_path: str) -> dict`

  • Reads PDF, DOCX or XLSX
  • Cleans the text
  • Classifies the document type (tender, pricing schedule, BOQ, etc.)
  • Tries to extract pricing‑related sections
  • Returns:
    • instructions (LLM‑ready description of what was found)
    • summary
    • currency
    • pricing_items (rough skeleton list)
    • raw_text (trimmed excerpt for the LLM)

`build_model(description: str, tender_rules: str, company_rates: str) -> dict`

  • Takes free‑text input and produces a structured pricing model with:
    • items: description, unit, quantity, base_rate, markup_percent
    • meta: currency, VAT %, assumptions

`calculate(model_json: dict) -> dict`

  • Applies line‑level calculations:
    • line_total_ex_vat
    • line_vat_amount
    • line_total_inc_vat
  • Sums to grand totals
  • Returns items + totals + instructions for the LLM.

`market_prices(item_name: str) -> dict`

  • Currently returns simulated market prices.
  • Designed to be extended with real HTTP APIs (hardware, fuel, etc.).

`render_report(pricing_data: dict) -> dict`

  • Renders a styled HTML report based on resources/pricing_templates/base_template.html
  • Returns: { "mime_type": "text/html", "html": "..." }

`final_output(html: str) -> dict`

  • Final simple wrapper used by Tri‑Tender desktop app / Dyad templates.

6. Customisation

  • Update resources/pricing_templates/base_template.html and CSS files to match Tri‑Tender branding.
  • Extend the logic in calculate_prices.py to support:
    • multi‑year escalations
    • different markups per category
    • PSIRA / industry‑regulated minimums
  • Plug real HTTP APIs into fetch_market_prices.py once you have a host that allows outbound HTTP.

7. Safety Notes

  • This server does no remote network calls by default.
  • All calculations are purely local and deterministic.
  • Perfect for running inside constrained MCP hosts (FastMCP Cloud, Cursor, Claude Desktop, etc.).

Tools (6)

detect_pricing_requirementsReads PDF, DOCX or XLSX to classify document type and extract pricing-related sections and items.
build_modelProduces a structured pricing model with items, units, quantities, and markups from free-text input.
calculateApplies line-level calculations for VAT and markups to generate grand totals.
market_pricesReturns simulated market prices for specific items, designed for extension with real APIs.
render_reportRenders a styled HTML report based on a base template and pricing data.
final_outputFinal simple wrapper used by Tri-Tender desktop app or Dyad templates.

Configuration

claude_desktop_config.json
{"mcpServers": {"tri_tender_pricing_mcp": {"command": "python", "args": ["server.py"], "env": {}}}}

Try it

Extract the pricing requirements from this tender document: tender_spec.pdf
Build a structured pricing model using these company rates and the extracted tender rules.
Calculate the final totals including a 15% markup and VAT for my current pricing model.
Generate a styled HTML pricing report for the calculated tender data.
Compare the item 'Grade A Steel' against current market prices.

Frequently Asked Questions

What are the key features of Tri-Tender Pricing MCP?

Extracts pricing requirements from PDF, DOCX, and XLSX files.. Builds structured pricing models including markups, VAT, and assumptions.. Generates styled HTML pricing reports ready for PDF export.. Provides local, deterministic calculations without mandatory remote network calls.. Classifies document types such as Bill of Quantities (BOQ) or pricing schedules..

What can I use Tri-Tender Pricing MCP for?

Automating the extraction of line items from complex tender PDF packs.. Standardizing RFQ responses by converting free-text requirements into structured JSON models.. Generating professional, branded HTML pricing summaries for client presentations.. Performing local cost calculations with specific industry-regulated minimums or markups..

How do I install Tri-Tender Pricing MCP?

Install Tri-Tender Pricing MCP by running: pip install -r requirements.txt

What MCP clients work with Tri-Tender Pricing MCP?

Tri-Tender Pricing MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Tri-Tender Pricing MCP with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free