allplan-mcp-bridge

allplan-mcp-bridge

Enables Claude to create, query, and modify BIM elements in Allplan via natural language, with full undo history support.

Category
访问服务器

README

CI

allplan-mcp-bridge

A production-grade MCP server that exposes Allplan's BIM API (geometry, attributes, IFC import/export, and layer management) to MCP clients such as Claude Code and Claude Desktop. Runs as a normal Python process that communicates with a PythonPart agent embedded inside Allplan over local TCP, so Claude can create, query, and modify BIM elements while every operation stays inside Allplan's native undo history.


Quick start

Prerequisites

Component Version
Allplan 2026 (tested), likely works on 2025 / 2024-1
OS Windows 10 / 11
Python (external) 3.12+
uv pip install uv
Claude Code or Claude Desktop Latest

1 — Clone and install the MCP server

git clone https://github.com/andrej-reeg/allplan-mcp-bridge.git
cd allplan-mcp-bridge
uv sync

2 — Install the Allplan PythonPart

python scripts\install_pythonpart.py

Auto-detects the Allplan 2026 PythonParts directory. Pass --scripts-dir and --library-dir explicitly if auto-detection fails.

3 — Activate the bridge in Allplan

  1. Launch Allplan 2026 and open any project.
  2. In the Library, find Allplan MCP Bridge → AllplanMcpBridge and activate it.
  3. A palette should appear. The bridge is now listening on TCP port 49152.

4 — Start the MCP server

uv run python -m allplan_mcp_server

You should see {"event": "ipc.connected", ...} in the log. If not, check that the Allplan palette is visible and the bridge is active.

5 — Configure Claude Code (or Claude Desktop)

Add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "allplan": {
      "command": "uv",
      "args": ["run", "python", "-m", "allplan_mcp_server"],
      "cwd": "C:\\path\\to\\allplan-mcp-bridge"
    }
  }
}

Then ask Claude:

"Create a 5 m wall at (0,0,0) to (5000,0,0), height 3000 mm, thickness 300 mm."

The wall should appear in Allplan, inside one undo bracket.


Architecture

Claude Code / Desktop
     │  stdio JSON-RPC (MCP protocol)
     ▼
allplan_mcp_server          (this repo — normal Python 3.12 process)
     │  TCP 127.0.0.1:49152  length-prefixed JSON  + HMAC token auth
     ▼
allplan_agent               (PythonPart — runs INSIDE Allplan's embedded Python)
     │  thread-safe queue
     ▼
Allplan main thread → NemAll_Python_* API → BIM document

See docs/architecture.md for the full picture and docs/threading-model.md for the one law that must never be broken.


Configuration reference

All settings use the ALLPLAN_MCP_ prefix. Set as environment variables or in a .env file in the repository root.

Variable Default Description
ALLPLAN_MCP_IPC_TRANSPORT tcp tcp or named_pipe
ALLPLAN_MCP_TCP_HOST 127.0.0.1 TCP host (loopback only)
ALLPLAN_MCP_TCP_PORT 49152 TCP port
ALLPLAN_MCP_ALLPLAN_WORKSPACE_ROOT auto-detected Root path for IFC file allowlist
ALLPLAN_MCP_REQUEST_TIMEOUT_SECONDS 10.0 Timeout for standard operations
ALLPLAN_MCP_LONG_OP_TIMEOUT_SECONDS 120.0 Timeout for IFC import/export
ALLPLAN_MCP_LOG_LEVEL INFO DEBUG, INFO, WARNING, ERROR
ALLPLAN_MCP_MAX_FRAME_BYTES 16777216 IPC frame size cap (16 MiB)
ALLPLAN_MCP_MAX_ARG_BYTES 1048576 Per-tool argument size cap (1 MiB)

Available tools

See docs/tool-catalog.md for the full catalog with input schemas and examples. Short summary:

Category Tools
Geometry create_wall, create_slab, create_column, create_beam, get_element, delete_element, move_element
Document get_active_document_info, save_document, undo, redo
Attributes get_attributes, set_attributes
Layers list_layers, create_layer, set_layer_visibility, assign_layer
IFC export_ifc, import_ifc
Health health

Supported Allplan versions

Version Status
Allplan 2026 Tested, supported
Allplan 2025 Should work — not formally tested
Allplan 2024-1 Should work — not formally tested
Earlier Not supported

Limitations (v1)

  • Single instance. One Allplan + one MCP server. Multi-instance support is out of scope for v1; see docs/architecture.md for the design note.
  • Windows only. Allplan is Windows-only. The MCP server can run in WSL2 and connect to Allplan over TCP.
  • Geometry only. create_slab, create_column, create_beam create generic 3-D solids (not architectural elements with material assignments). Architecture elements are planned for v2.
  • No live preview. Elements are inserted when the bridge processes the command, not on mouse hover.
  • IFC size. Exports > 1 GiB are hard-rejected. Exports > 100 MiB log a warning.
  • Main-thread serialisation. All Allplan API calls run on the main thread. Heavy operations (large IFC export) will briefly freeze Allplan's UI.

Troubleshooting

ipc.connect_failed in MCP server logs

  • Confirm the Allplan palette is visible and shows "running".
  • Check that the TCP port (default 49152) is not blocked.
  • Check ~/.allplan-mcp/bridge.log for errors from the agent.

Wall/element created but in wrong position

  • Check ~/.allplan-mcp/debug.log for _wall: attempt N lines — these show which geometry placement strategy succeeded.

PathNotAllowedError on IFC export

  • The path is outside ALLPLAN_MCP_ALLPLAN_WORKSPACE_ROOT.
  • Either move the file or set the env var to a parent directory.

Timeout errors on get_active_document_info

  • This call requires the Allplan main thread and returns {main_thread_required: true} when called from the background pump. Trigger a mouse event in Allplan (move the cursor into the drawing) to process the next tick.

Development

uv sync --dev
uv run pytest tests/unit tests/integration
uv run ruff check src tests
uv run mypy src

See CONTRIBUTING.md for how to add a new tool.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选