Skip to main content
Glama

tqs-mcp

MCP server for TQS, the Brazilian structural engineering CAD/analysis system, built on the TQS Python Interface.

It lets Claude Code (or any MCP client) read building models, extract data from TQS drawings, run structural processing, and script against the TQS API.

Unofficial and independent. TQS® is a trademark of TQS Informática Ltda.

Requirements

  • Windows with TQS installed (the modules bind to native TQS DLLs)

  • The TQS Python Interface wheel installed in some Python 3.10+ interpreter:

    pip install TQSPythonInterface-1.2.1-py310-none-any.whl

    Get it from tqs.com.br/developers.

  • Python 3.10+ to run this server

The server itself does not need TQS in its own interpreter. It runs all TQS work in a subprocess under whichever interpreter has the TQS package — point TQS_PYTHON at it. That keeps the server alive if a TQS DLL crashes, and lets this server run on a modern Python while TQS code runs on the version its wheel was built for.

Related MCP server: Bonsai-mcp

Install

git clone https://github.com/carlostavares-manager-MNGT/tqs-mcp
cd tqs-mcp
uv sync

Configure

Add to Claude Code:

claude mcp add tqs -e TQS_PYTHON=C:\\TQSW\\Python\\python.exe -e TQS_ROOT=C:\\TQS -- uv --directory C:\\path\\to\\tqs-mcp run tqs-mcp

Or edit the MCP config directly:

{
  "mcpServers": {
    "tqs": {
      "command": "uv",
      "args": ["--directory", "C:\\path\\to\\tqs-mcp", "run", "tqs-mcp"],
      "env": {
        "TQS_PYTHON": "C:\\TQSW\\Python\\python.exe",
        "TQS_ROOT": "C:\\TQS"
      }
    }
  }
}

Variable

Meaning

Default

TQS_PYTHON

Interpreter with the TQS package installed

the server's own interpreter

TQS_ROOT

Root of the building tree

none — pass paths explicitly

TQS_MCP_TIMEOUT

Default subprocess timeout, seconds

120

Run tqs_status first. It reports the interpreter in use, which TQS modules import, and the TQS folders — and tells you what to fix if TQS is unreachable.

Tools

Tool

What it does

tqs_status

Is TQS reachable? Which interpreter, modules, folders

tqs_list_buildings

Find buildings (folders with EDIFICIO.DAT) under a root

tqs_building_read

Project metadata, model, floors, concrete strengths, covers, loads

tqs_building_edit

Change building properties and save — dry-run by default

tqs_dwg_read

Drawing metadata, extents, levels, blocks, entity counts, entities

tqs_process

Run TQSExec tasks — global processing, drawings, rebar schedules

tqs_introspect

List the installed TQS API's real methods and properties

tqs_run_script

Run arbitrary Python with TQS importable — the escape hatch

tqs_reference

Bundled offline API reference, browsable and searchable

tqs_building_edit, tqs_process and tqs_run_script modify project files and are annotated as such, so MCP clients prompt before running them.

The reference topics are also exposed as MCP resources under tqs://reference/.

Why tqs_introspect exists

TQS's published docs cover part of the API. Rather than guess at property names, ask the installed version:

tqs_introspect(target="TQSBuild.Building.floorsplan")
tqs_introspect(target="TQSDwg", filter="DWGTYPE")

Examples

Audit concrete strengths across a project

Read the building at C:\TQS\EDIF-A and tell me the concrete strength per floor.

Pull rebar callouts out of a drawing

From C:\TQS\EDIF-A\PAV1\VIGAS.DWG, extract all TEXT entities containing "Ø" and group them by level.

Reprocess after a change

Set beam cover to 3.0 cm in EDIF-A, then run global processing on the frames folder and regenerate the rebar schedule.

Anything else

# via tqs_run_script
from TQS import TQSDwg
dwg = TQSDwg.Dwg()
dwg.file.Open("PLANTA.DWG")
result = {"limits": dwg.limits.DwgLimits(), "scale": dwg.settings.scale}

Development

uv sync
uv run pytest

The test suite runs without TQS installed — it covers the tool surface, driver framing, and the absent-TQS error paths.

Status

The MCP layer, the subprocess bridge, and every driver's framing and error path are tested and working. The TQS API calls inside the drivers are written from the official documentation but have not been exercised against a live TQS install — that hardware wasn't available here. Expect to need tqs_introspect to correct property names on first real use, particularly:

  • the floor-count property on floorsplan (the driver probes several candidates)

  • the return shape of loads.GetLoad()

  • TaskGlobalProc parameter names beyond those in the docs

Corrections via issue or PR are welcome.

Layout

src/tqs_mcp/
  server.py      MCP tools
  bridge.py      subprocess protocol (sentinel-framed JSON)
  config.py      environment variables
  drivers/       scripts executed inside the TQS interpreter
  reference/     bundled API docs, served as tools and resources

Drivers are plain scripts, so they can be run and debugged directly:

echo {} > args.json
C:\TQSW\Python\python.exe src/tqs_mcp/drivers/status.py args.json

License

MIT — see LICENSE.

Available Tools

9 tools
tqs_building_editA
Destructive

Change building properties and save. Defaults to dry_run=true, which reports the old and new value of every change without writing. Set dry_run=false to commit; TQS keeps the prior version as EDIFICIO.BAK.

Inputs: building_path (required), floors, changes, dry_run.

tqs_building_readA
Read-only

Read a TQS building into JSON: project metadata, analysis model, floors, concrete strengths, covers and load cases. Pass a building folder or a path to EDIFICIO.DAT.

Inputs: building_path (required), sections.

tqs_dwg_readA
Read-only

Read a TQS drawing (.DWG): scale and system metadata, extents, levels, blocks, entity counts, and entities themselves. Filter by entity type, level, or text content — extracting TEXT entities is the usual way to pull rebar callouts and labels out of a drawing. Units are centimeters.

Inputs: dwg_path (required), level, limit, include, +2 more.

tqs_introspectA
Read-only

Inspect the installed TQS API: list a module's or object's real methods and properties with signatures. Use this whenever you are unsure a name exists — the published docs cover only part of the surface.

Inputs: filter, target.

tqs_list_buildingsA
Read-only

List TQS buildings under a root folder. A building is a subfolder containing EDIFICIO.DAT. Defaults to the TQS_ROOT environment variable.

Inputs: root, depth.

tqs_processA
Destructive

Run TQS Manager processing tasks against a building (TQSExec) — global processing, drawing generation, rebar schedules. This overwrites calculation results and drawings in the building tree, and can run for many minutes. See the tqsexec reference for the task list.

Inputs: tasks (required), building_path (required), folder, timeout, +1 more.

tqs_referenceA
Read-only

Bundled offline reference for the TQS Python Interface. Call with no arguments to list topics. Read the relevant topic before writing TQS code with tqs_run_script.

Inputs: topic, search.

tqs_run_scriptA
Destructive

Run Python with the TQS modules importable, in a separate process. The escape hatch for anything the other tools do not cover. Assign to a variable named result to return structured data; stdout is captured and returned too. This can create, modify and delete project files.

Inputs: code (required), cwd, timeout.

tqs_statusA
Read-only

Check whether the TQS Python Interface is reachable. Reports the interpreter in use, which TQS modules import, and the TQS programs/support/user folders. Run this first when TQS tools misbehave.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct concern: processing, building read/edit/list, DWG read, plus supporting utilities (status, introspect, reference, script). There is no meaningful overlap; even introspect and reference are complementary (live API inspection vs offline docs).

    Naming Consistency4/5

    All tools share the 'tqs_' prefix, but the verb/noun order is inconsistent: some are verb-first (tqs_list_buildings, tqs_run_script), others noun-first (tqs_building_read, tqs_dwg_read), and a couple are bare nouns (tqs_status, tqs_reference). Names are still clear and readable, but a uniform pattern would be better.

    Tool Count5/5

    With 9 tools, the server is well-scoped. It covers the core domain operations (buildings, drawings, processing) alongside essential utilities (status, docs, introspection) without unnecessary bloat.

    Completeness4/5

    The surface covers listing, reading, editing buildings, reading DWGs, and running processing tasks. Dedicated create/delete building tools are missing, but tqs_run_script explicitly serves as an escape hatch for creating or deleting project files, mitigating the gap. No DWG editing tool exists, but that seems outside the primary scope.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      AI-powered MCP server that enables Claude and other LLMs to interact directly with construction documents, drawings, and specifications through advanced RAG and hybrid search capabilities.
      8
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that bridges Claude with AutoCAD, enabling to generate architectural floor plans, draw geometry, and export DXF files just by describing what you need in natural language.
      -