AS

adventurous-systems/topologicpy_mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

22 stars 5 forks 质量 69 趋势 10AGPL-3.0

拓扑学模型上下文协议服务器

概览

一个模型上下文协议服务器,向 Claude Code、Claude Desktop 及其他 MCP 客户端展示 TopologicPy 文件的空间建模能力。该服务器旨在帮助我们开发更多围绕 Topologic 和 TopologicPy 的工具 请Claude(或任何配备MCP的LLM)通过自然语言构建架构模型: “创建一个三层办公楼,12米×20米,楼高3.5米,然后给我看邻接图并导出到IFC。” MCP服务器将这些请求转换为精确的拓扑操作,在整个对话中维护一个命名对象会话。 添加你的Claude代码MCP配置(~/.claude/claude_code_config.json): GPL-3.0或更高版本(与TopologicPy的许可证匹配) 该服务器包裹了 TopologicPy 的纯 Python API。要添加新工具:1. 在 server.py 中添加一个 @mcp.tool() 装饰函数 2.遵循命名规范:verb_noun(例如 create_vertex、export_brep) 3.

概述(AI 翻译)

一个模型上下文协议服务器,向 Claude Code、Claude Desktop 及其他 MCP 客户端展示 TopologicPy 文件的空间建模能力。该服务器旨在帮助我们开发更多围绕 Topologic 和 TopologicPy 的工具

这能带来什么

请Claude(或任何配备MCP的LLM)通过自然语言构建架构模型:

“创建一个三层办公楼,12米×20米,楼高3.5米,然后给我看邻接图并导出到IFC”

MCP服务器将这些请求转换为精确的拓扑操作,在整个对话中维护一个命名对象会话。

建筑

可用工具(36 个工具)

创作

工具 描述
create_vertex 在 (x, y, z) 处创建一个点
create_edge 两个顶点之间的线段
create_wire 从有序顶点生成的多段线
create_face_by_wire 闭合线的面
create_face_rectangle 矩形面
create_face_circle 圆面(多边形近似)
create_cell_by_faces 来自包围面的三维实体
create_cell_prism 方框 / 长方体

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

TopologicPy MCP Server

A Model Context Protocol server that exposes TopologicPy TopologicPy-docs’s spatial modeling capabilities to LLM agents like Claude Code, Claude Desktop, and other MCP clients. This was created to assist us in developing further tools around Topologic and TopologicPy

What This Enables

Ask Claude (or any MCP-equipped LLM) to build architectural models through natural language:

“Create a 3-storey office building, 12m × 20m with 3.5m floor heights, then show me the adjacency graph and export to IFC”

The MCP server translates these requests into precise TopologicPy operations, maintaining a named object session across the conversation.

Architecture

┌─────────────────────────────────────────────────┐
│              MCP Client (Claude Code, etc.)       │
│  Natural language ↔ tool calls                   │
└────────────────────┬────────────────────────────┘
                     │  MCP Protocol (stdio/SSE)
                     ▼
┌─────────────────────────────────────────────────┐
│            TopologicPy MCP Server                │
│  ┌───────────────────────────────────────────┐  │
│  │  Session Store (named topology objects)    │  │
│  │  • "building" → CellComplex               │  │
│  │  • "floor_0"  → Cell                      │  │
│  │  • "graph"    → Graph                     │  │
│  └───────────────────────────────────────────┘  │
│                                                  │
│  Tools: create, boolean, transform, query, I/O   │
│  Resources: session state, BREP strings          │
│  Prompts: building envelope, adjacency, grids    │
└────────────────────┬────────────────────────────┘
                     │
                     ▼
┌─────────────────────────────────────────────────┐
│                  TopologicPy                     │
│  Vertex → Edge → Wire → Face → Shell → Cell     │
│  CellComplex → Cluster → Graph → Dictionary     │
│  OpenCASCADE (BREP) • IfcOpenShell (IFC)        │
└─────────────────────────────────────────────────┘

Available Tools (36 tools)

Creation

Tool Description
create_vertex Create a point at (x, y, z)
create_edge Line segment between two vertices
create_wire Polyline from ordered vertices
create_face_by_wire Face from a closed wire
create_face_rectangle Rectangular face
create_face_circle Circular face (polygon approximation)
create_cell_by_faces 3D solid from bounding faces
create_cell_prism Box / rectangular prism
create_cell_cylinder Cylindrical cell
create_cellcomplex_by_cells Merged cell assembly (shared boundaries)
create_cluster Unstructured collection

Boolean Operations

Tool Description
boolean_union A ∪ B
boolean_difference A − B
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "topologic": { "command": "python", "args": ["-m", "topologic_mcp"], "cwd": "/path/to/topologic-mcp-server" } } }