Tri-Tender Pricing MCP

Tri-Tender Pricing MCP

An MCP server designed to automate tender and RFQ pricing by extracting requirements from documents and building structured pricing models. It enables users to calculate final costs, compare market rates, and generate styled HTML pricing reports for PDF export.

Category
Visit Server

README

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.).

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

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.

Official
Featured
Python
graphlit-mcp-server

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.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured