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.
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:
- Detect and extract pricing requirements from tender packs
- Build a structured pricing model from tender rules + company rates
- Calculate final prices (including markups & VAT)
- Optionally compare against market prices
- Generate a styled HTML pricing report ready for PDF export
- 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)summarycurrencypricing_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_percentmeta: currency, VAT %, assumptions
calculate(model_json: dict) -> dict
- Applies line‑level calculations:
line_total_ex_vatline_vat_amountline_total_inc_vat
- Sums to grand totals
- Returns
items+totals+instructionsfor 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.htmland CSS files to match Tri‑Tender branding. - Extend the logic in
calculate_prices.pyto support:- multi‑year escalations
- different markups per category
- PSIRA / industry‑regulated minimums
- Plug real HTTP APIs into
fetch_market_prices.pyonce 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.).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。