Skip to main content
Glama
zeqikong-ctrl

quote-mcp-server

🏗️ decoration-quote-engine

装修硬装报价引擎:DXF 墙线拓扑重建 → 工程量提取 → 确定性报价 → MCP Server

Python ezdxf shapely MCP

配套智能体项目:interior-ai-agent(LangGraph 编排,经 MCP 调用本引擎)


✨ 它做什么

输入一张量房后的原始墙体图(DWG→DXF),输出一份可直接给客户看的硬装报价单

新块1.dxf(60.48㎡ 两室两厅)
  → 7 个房间自动围合 + 干湿区分类(客厅/餐厅/卧室=dry,厨/卫/阳台独立)
  → 门 5 / 窗 5 / 垭口 1 自动识别
  → 硬装报价 ¥92,806.79,69 项明细(JSON + 打印友好 HTML)

没有一次 LLM 调用——几何计算和算钱全部是确定性代码,可复现、可审计。

Related MCP server: tero-mcp-lite

🧠 核心设计

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

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    MCP server that exposes CAD geometry reasoning over STEP files to LLMs, allowing natural language queries about parts, assemblies, dimensions, holes, and mass properties.
    Last updated
  • A
    license
    -
    quality
    C
    maintenance
    MCP stdio server wrapping the fallhome SDK to enable sovereign, offline-capable, and cryptographically signed management of professional service workflows for autonomous agents and human developers.
    Last updated
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Drive the OpenTakeoff construction takeoff engine from any MCP client: open plan PDFs, set and verify drawing scale, one-click room areas, measure lengths, and export takeoff quantities. Runs locally over stdio via npx -y opentakeoff-mcp.
    Last updated
    31
    41
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • MCP CAD services; bundles with SmartScale (measure to CAD).

  • Read-only MCP server for ClassQuill, a tutoring-business-management platform.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zeqikong-ctrl/quote-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server