Quote Server
FreeNot checkedMCP server for hard decoration quoting: parses DXF floor plans, reconstructs room topology, computes material quantities, and generates deterministic itemized q
About
MCP server for hard decoration quoting: parses DXF floor plans, reconstructs room topology, computes material quantities, and generates deterministic itemized quotes with tiered pricing. Exposes tools parse_dxf, compute_quote, and generate_report via stdio.
README
装修硬装报价引擎:DXF 墙线拓扑重建 → 工程量提取 → 确定性报价 → MCP Server
配套智能体项目:interior-ai-agent(LangGraph 编排,经 MCP 调用本引擎)
✨ 它做什么
输入一张量房后的原始墙体图(DWG→DXF),输出一份可直接给客户看的硬装报价单:
新块1.dxf(60.48㎡ 两室两厅)
→ 7 个房间自动围合 + 干湿区分类(客厅/餐厅/卧室=dry,厨/卫/阳台独立)
→ 门 5 / 窗 5 / 垭口 1 自动识别
→ 硬装报价 ¥92,806.79,69 项明细(JSON + 打印友好 HTML)
没有一次 LLM 调用——几何计算和算钱全部是确定性代码,可复现、可审计。
🧠 核心设计
1. 墙线拓扑重建(takeoff.py)
原始墙体图往往没有闭合的房间多段线。本引擎用 shapely.polygonize + networkx
从纯墙线段自动围合房间,再按文字标注/面积启发式判定房间功能(厨房/卫生间/阳台),
输出带置信度的工程量 JSON(房间面积/周长、墙面净面积、门窗洞口统计)。
2. 规则报价引擎(cost.py)
单价表按 zone(dry/wet/kitchen/balcony/all)× basis(计量依据)驱动,内置一线业务规则:
| 规则 | 说明 |
|---|---|
| 门按套计 | 木门 1298 元/套;门套按 2×高+宽 算延米,入户门单边、垭口双边 |
| 瓷砖品牌统一 | 同空间墙/地砖自动选同一品牌(两种品牌有 200 元小单费) |
| 地面材质分支 | 铺瓷砖→含铺贴人工、免地垫宝;铺地板→需地垫宝找平、踢脚线赠送 |
| 水电分档 | 1室1厅≤60平 8500;2室以上≤75平 10000;>75平按建筑面积×140(建面=套内/0.75) |
| 石膏板平顶 | 只算衣柜柜头:投影面积×(柜深/柜高),非全屋满吊 |
| 橱柜/定制柜估算 | 按套内面积-户型对照表自动估延米/投影面积,可用实测值覆盖 |
| 提问点机制 | 层高、卧室瓷砖还是地板、下沉找平——计算前必须确认 |
3. MCP Server(src/mcp_server/server.py)
引擎以 MCP stdio 协议对外暴露 3 个工具,可被 LangGraph Agent、Claude Desktop、Cursor 等任何 MCP Host 调用:
| Tool | 输入 → 输出 |
|---|---|
parse_dxf |
DXF 路径 → 工程量 JSON + confidence + 房间摘要 |
compute_quote |
takeoff JSON + ProjectConfig(层高/地面材质/品牌偏好/tier)→ 报价 JSON |
generate_report |
报价 JSON → 打印友好 HTML |
4. 档次分档(tier)—— 激活「预算调高 / 调低」
单价表(config/unit_price_nanjing_mq.csv)每行带 tier 列:最简 / 标准 / 轻奢 / 通用
(不分档)。引擎按档位选单价,实现同一套工程量下的预算升降:
标准为锚点(即原南京美全价目表基线);最简/轻奢缺项时自动回退到标准,保证任何档位都能算全。- 分档价差覆盖:木门、强化地板、瓷砖(300/800 系列)、钛合金门、集成吊顶、开关插座、定制柜等主材。
- 语义归一:
低档/经济→最简,中档/性价比→标准,高档/豪华→轻奢(大小写与别名都接受)。 intent_node解析「预算调高」→高档→轻奢,「预算调低」→低档→最简,金额随之真实变化。
📁 项目结构
decoration-quote-engine/
├── src/
│ ├── core/models.py # 数据模型(Takeoff / HardQuote / ProjectState)
│ ├── agents/hard/
│ │ ├── takeoff.py # DXF 解析 + 墙线拓扑重建 + 工程量提取
│ │ ├── cost.py # 规则报价引擎(ProjectConfig + zone/basis 匹配)
│ │ └── quote_report.py # 报价 JSON → HTML
│ └── mcp_server/server.py # quote-mcp-server(FastMCP stdio)
├── config/
│ └── unit_price_template.csv # 单价表格式模板(真实价目表不入库)
├── tests/ # pytest(takeoff 回归 + MCP 全链路冒烟)
└── 装修报价智能体_技术方案文档.md
🚀 快速开始
pip install -e . # 或 pip install -r requirements.txt
# 1) DXF → 工程量
python -m src.agents.hard.takeoff path/to/户型.dxf output/takeoff.json
# 2) 工程量 → 报价(需按 config/unit_price_template.csv 格式准备单价表)
python -m src.agents.hard.cost output/takeoff.json config/你的单价表.csv output/quote.json
# 2b) 带档次:--tier 最简/标准/轻奢(或 低档/中档/高档)
python -m src.agents.hard.cost output/takeoff.json --tier 轻奢 output/quote_lux.json
# 3) 报价 → HTML
python src/agents/hard/quote_report.py output/quote.json output/quote.html
# 或者直接起 MCP Server
quote-mcp-server # stdio transport
# 测试
pytest tests/ -q
⚠️ 已知边界
- 单价表基于南京市场(2026),其他城市需替换
config/下的价目表 - 房间围合依赖墙线基本闭合;低置信度结果会在 JSON 中给出 warnings,由上层做人工确认(HITL)
- 橱柜延米/衣柜投影面积默认按户型规则估算,精确报价需实测值覆盖
📜 License
MIT © 2026
Install Quote Server in Claude Desktop, Claude Code & Cursor
unyly install quote-mcp-serverInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add quote-mcp-server -- uvx --from git+https://github.com/zeqikong-ctrl/quote-mcp-server decoration-quote-engineStep-by-step: how to install Quote Server
FAQ
Is Quote Server MCP free?
Yes, Quote Server MCP is free — one-click install via Unyly at no cost.
Does Quote Server need an API key?
No, Quote Server runs without API keys or environment variables.
Is Quote Server hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Quote Server in Claude Desktop, Claude Code or Cursor?
Open Quote Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Quote Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
