Skip to main content
Glama
SorataYang

Qiao-MCP

by SorataYang

🌉 Qiao-MCP

English · 简体中文

全生命周期桥梁结构分析 — 建模、施工阶段、规范验算 桥梁全过程结构分析 MCP 服务器 — 建模、施工阶段、规范验算

Qiao-MCP 是一个 模型上下文协议 (MCP) 服务器,使 AI 助手能够与桥梁结构分析软件交互。它提供了创建桥梁模型、施加荷载、运行结构分析和查看结果的工具。

功能特性

🔧 工具(132 个工具,按组分类)

工具按工作流区域组织。每组亮点:

组别

代表性工具

核心建模

create_nodes_linear, create_beam_elements_linear, create_material, create_section(所有参数化截面类型), create_polygon_section

荷载

create_load_group, create_load_case, set_self_weight_stage, set_gravity, apply_nodal_force, apply_beam_distributed_load, 温度/沉降荷载

边界

set_support, add_elastic_link, add_master_slave_link, add_elastic_support, add_beam_constraint

create_structure_group, add_to_structure_group, merge_operation_stage

阶段与分析

add_construction_stage, merge_operation_stage, configure_analysis, run_analysis(异步,进度报告), get_analysis_results

预应力筋

create_tendon_property, create_tendon_2d, apply_prestress, get_tendon_info

交通(移动荷载)

add_node_tandem, add_influence_plane, add_traffic_lane, add_standard_vehicle, create_live_load_case

验算

setup_concrete_check, add_check_load_combination, add_parametric_reinforcement, run_concrete_check, get_check_data

查询

get_model_info, get_model_data(按种类), find_entities, calc_section_property, get_special_results(适用时分页)

修改

initialize_model, save_model_file, open_model_file, update_node, move_nodes, update_element, remove_nodes, remove_elements

可视化

save_model_screenshot, plot_analysis_result(可选返回可查看图像), set_view_angle, display_ids

工作流

create_simple_beam_bridge, create_continuous_beam_bridge

网关与诊断

check_qiaotong_connection, list_qtmodel_api, call_qtmodel_api — 诊断桥梁连接或发现并调用长尾 qtmodel 方法,带签名验证

工具响应被规范化为结构化内容({status, ...}),而图像工具可以直接返回 MCP 图像内容。工具失败使用类型化的 MCP 错误,只读、破坏性和开放世界操作带有 MCP 工具注释。服务器指令包含完整的工具组概览;在通过网关调用未覆盖的后端方法之前,请使用 list_qtmodel_api

📦 资源(7 个资源)

URI

描述

bridge://model/summary

模型概览

bridge://model/materials

材料列表

bridge://model/sections

截面列表

bridge://model/load-cases

荷载工况

bridge://model/stages

施工阶段

bridge://model/structure-groups

结构组

bridge://model/boundaries

边界条件

💬 提示(4 个工作流)

提示

描述

design-simple-beam

简支梁桥设计工作流(简支梁设计)

design-continuous-beam

连续梁桥设计(连续梁设计)

check-structure

结构检算(结构检算)

construction-stage-analysis

施工阶段分析(施工阶段分析)

Related MCP server: ETABS MCP Server

架构

qiao-mcp/
├── src/qiao_mcp/
│   ├── server.py              # MCP server entry point
│   ├── tools/                 # MCP Tools (envelope-wrapped)
│   ├── resources/             # MCP Resources
│   ├── prompts/               # MCP Prompts
│   └── providers/             # Backend adapters
│       ├── __init__.py        # BridgeProvider abstract base
│       └── qtmodel_provider.py  # QiaoTong adapter
├── tests/                     # Offline unit, integration, and API contract tests
└── reference-docs/            # Review notes and project documentation

提供者模式使 132 个工具与任何单一后端解耦。通过 BRIDGE_PROVIDER 选择一个;每个提供者声明自己的软件特定规则,因此 LLM 无需更改提示即可适应。目前支持:

添加后端意味着实现 BridgeProvider 并注册一行 — 无需更改工具层。参见 后端选择

快速开始

前提条件

  • Python >= 3.11

  • uv 包管理器

  • qtmodel 2.6.3(由 uv sync 安装)

  • 调用后端模型、分析或可视化操作时,桥通软件 2.6.3 正在运行

MCP 服务器可以在没有桥通的情况下启动。使用 check_qiaotong_connection 来区分已连接的服务器、版本不匹配以及软件未运行的情况。

安装与运行

# Install dependencies
uv sync

# Run the server
uv run qiao-mcp

在 Claude Desktop 中配置

添加到你的 claude_desktop_config.json

{
  "mcpServers": {
    "qiao-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/qiao-mcp", "run", "qiao-mcp"]
    }
  }
}

在 Cursor 中配置

添加到 .cursor/mcp.json

{
  "mcpServers": {
    "qiao-mcp": {
      "command": "uv",
      "args": ["--directory", "/path/to/qiao-mcp", "run", "qiao-mcp"]
    }
  }
}

在 Reasonix(UI)中配置

打开 设置MCP & 工具,然后添加一个新的 MCP 服务器:

  • 名称: qiao-mcp

  • 传输方式: stdio(保持默认)

  • 命令: uv --directory /path/to/qiao-mcp run qiao-mcp

    • /path/to/qiao-mcp 替换为你的实际项目路径

    • Windows:使用反斜杠 D:\path\to\qiao-mcp

    • macOS/Linux:使用正斜杠 /path/to/qiao-mcp

  • 环境变量(可选):UV_PYTHON=3.11

点击 添加 保存。

在 Cherry Studio(UI)中配置

打开 设置扩展MCP 服务器,然后添加一个新的服务器:

  • 名称: qiao-mcp

  • 描述: 可选描述

  • 类型: 标准输入 / 输出 (stdio)

  • 命令: uv

  • 包管理器: 选择 默认

  • 参数:

    /path/to/qiao-mcp
    run
    qiao-mcp

    (每行一个参数,不需要 --directory 前缀)

    • /path/to/qiao-mcp 替换为你的实际项目路径

点击 保存 保存。

使用 MCP Inspector 测试

npx @modelcontextprotocol/inspector uv run qiao-mcp

局域网调试代理

对于跨机器调试,scripts/qiaotong_lan_proxy.py 将局域网端口转发到同一台机器上的桥通 API。它使用 45125 作为代理端口,并转发到选定的桥通进程(位于 127.0.0.1:55125):

python scripts/qiaotong_lan_proxy.py

然后将客户端机器指向:

from qtmodel import mdb

mdb.set_url("http://<proxy-machine-LAN-IP>:45125/pythonForQt/")

代理会打印每个转发的请求和响应。当多个桥通进程运行时,将一个进程保持在 55125 上用于此固定代理,或者为不同进程使用单独的代理实例和端口。

SSH 隧道是一种替代方案,不会在局域网上暴露 API 端口:

ssh -N -L 45125:127.0.0.1:55125 <user>@<qiaotong-machine-LAN-IP>

在隧道运行时,在客户端机器上使用 http://127.0.0.1:45125/pythonForQt/

开发

# Install in dev mode (includes ruff, mypy, pytest)
uv sync

# Run directly
uv run python -m qiao_mcp.server

# Quality gate (same checks as CI)
uv run ruff check src/ tests/
uv run mypy src/qiao_mcp/
uv run pytest tests/ -q

测试套件设计为离线运行 — 它不需要桥通软件。提供者/工具调用根据已安装的 qtmodel API 签名进行验证(契约测试),并针对进程内的假后端进行调度。

后端:QTModel(桥通)

此 MCP 服务器封装了 qtmodel Python API,该 API 提供对以下内容的访问:

  • mdb — 模型数据库:构建和修改桥梁模型

  • odb — 输出数据库:查询分析结果和可视化

  • cdb — 验算数据库:结构验证和规范验算

版本管理

Qiao-MCP 独立于 qtmodel 进行版本管理 — 项目自行迭代(错误修复、新工具、文档),无需等待后端发布,后端发布也不会强制此处版本升级。后端需求在其所属位置表达:在依赖约束中。

兼容性

Qiao-MCP

qtmodel

桥通软件

0.3.x

2.6.3 – 2.6.x

2.6.3

0.2.x

2.5.0 – 2.5.x

2.5.0

桥通软件 API 版本和已安装的 qtmodel 必须完全匹配 — qtmodel 2.6+ 会进行精确的版本握手,否则拒绝连接。运行 check_qiaotong_connection 查看两个版本以及当它们不同时该怎么做。

0.x 表示 API 仍可自由更改;这不是关于发布质量的声明。当迁移到新的 qtmodel 次要版本线时,提高依赖边界并在上表中添加一行。

许可证

版权所有 2026 Sorata (https://github.com/SorataYang)

根据 Apache 许可证 2.0 版授权。参见 LICENSE。 其他归属声明见 NOTICE

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (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

  • A
    license
    A
    quality
    B
    maintenance
    Connects AI assistants to CSI ETABS for structural engineering tasks, enabling model creation, analysis, design, and seismic checks via the COM API.
    69
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to interact with Autodesk Civil 3D through natural language, supporting tools for surfaces, alignments, profiles, corridors, pipe networks, COGO points, and AutoCAD geometry.
    9
    2
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI agents to interact with Bentley STAAD.Pro models for tasks like load case definition, data extraction, and property setting, running locally with multi-instance support and no cloud dependency.
    5
    MIT

View all related MCP servers

Related MCP Connectors

  • AI-callable calculators and engineering models with real formulas. No hallucinated math.

  • Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.

  • AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).

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/SorataYang/qiao-mcp'

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