Skip to main content
Glama
ntopology-mcp

ntopology-mcp

by sohumsuthar

ntopology-mcp

nTop(이전 nTopology)용 MCP 서버로, 노트북 블록 그래프를 직접 읽고 편집하며, nTop Automate를 통해 헤드리스로 실행하고, 결과로 나오는 지오메트리를 측정합니다.

nTop은 공식 MCP 서버를 제공하며, 이는 다른 문제를 해결합니다. 즉, nTop의 문서를 검색합니다. 이 서버는 사용자의 파일을 대상으로 작동합니다. 두 서버는 상호 보완적입니다. 공식 서버는 "토폴로지 최적화를 어떻게 설정할까"에 답하고, 이 서버는 설정을 직접 수행하고 실행합니다.

문서화된 자동화 경로(nTop Automate)는 GUI에서 노트북을 수동으로 만들고, 몇 가지 입력을 변수로 노출한 다음, 스크립트에서 해당 변수를 변경할 것을 요구합니다. 이는 매개변수 스윕을 다룹니다. 블록을 추가하거나, 입력을 다시 연결하거나, 그래프를 재구성하는 것은 허용하지 않습니다. 이 서버는 .ntop 파일을 그 자체로 취급하여 이를 수행합니다. 즉, JSON 블록 그래프를 담는 컨테이너입니다.

도구

도구

설명

inspect_notebook

버전, 섹션, 블록 및 값 개수, 루트가 평가하는 내용

read_graph

타입이 지정된 시그니처, 배선 및 리터럴 값을 가진 블록; 필터 가능, 기본 200개

validate_graph

연결되지 않은 입력, 중복 ID, 누락된 루트, 값이 없는 리터럴, list<T> 매개변수를 지나치는 추가 엣지

set_literal_value

스칼라, 파일 경로, 벡터, 점, 부울 또는 열거형 변경

set_input

블록의 입력 슬롯 하나 다시 연결

add_block

타입이 지정된 시그니처에서 계산 블록 추가

add_literal

상수 추가

prune_graph

루트를 선택한 출력으로 지정하고 도달할 수 없는 모든 것을 제거

run_notebook

ntopcl을 통해 실행, 구조화된 오류, 경고 및 블록별 타이밍 반환

search_blocks

nTop 설치에 있는 블록 시그니처 검색

mesh_stats

부피, 면적, 경계 상자, 열린 및 비-매니폴드 엣지 개수, 연결된 구성 요소

set_output

ntopcl -o가 노트북 출력으로 보고할 블록 선택

find_example

nTop 자체 제공 예제 노트북 및 참조 페이지 검색

environment

이 머신에서 서버가 찾을 수 있는 것 보고

Related MCP server: Onshape MCP Server

요구 사항

  • nTop 설치. Windows에서 5.54.2로 검증됨.

  • nTop Automate 라이선스는 run_notebook용. 이는 GUI 시트와 별도로 라이선스가 부여됨; 다른 모든 것은 라이선스 없이 작동.

  • Node.js 20+ 서버 실행용. 테스트 스위트는 21+ 필요, node --test가 glob을 허용하는 버전.

설치

git clone https://github.com/sohumsuthar/ntopology-mcp.git
cd ntopology-mcp
npm install
npm run build

구성

MCP 클라이언트 구성에 추가:

{
  "mcpServers": {
    "ntopology": {
      "command": "node",
      "args": ["C:\\path\\to\\ntopology-mcp\\dist\\index.js"],
      "env": {
        "NTOP_INSTALL_ROOT": "C:\\Program Files\\nTopology\\nTopology"
      }
    }
  }
}

NTOP_INSTALL_ROOT는 nTop이 기본 Windows 위치에 있으면 선택 사항입니다. NTOPCL_PATH는 ntopcl.exe를 직접 가리킬 수 있습니다. 먼저 environment를 호출하여 서버가 찾은 것을 확인하세요.

예제

기존 최적화를 다른 설계 공간으로 재타겟팅하고, 하나의 출력 체인으로 줄이고, 실행:

read_graph         notebook=bracket.ntop filter=file_path
set_literal_value  notebook=bracket.ntop blockId=477 value={"val": "C:/parts/wedge.step"}
prune_graph        notebook=bracket.ntop rootInputs=[900] output=bracket_run.ntop
run_notebook       notebook=bracket_run.ntop
mesh_stats         path=C:/parts/result.stl listComponents=true

편집 도구는 쓰기 전에 검증하며 오류가 있는 그래프 저장을 거부하므로, 생성된 모든 것은 이미 검사된 것입니다. 이 서버가 작성하지 않은 노트북(예: nTop GUI에서 편집한 것)은 run_notebook에 시간을 쓰기 전에 validate_graph를 실행하세요.

노트북 형식

.ntop 형식은 nTop에서 문서화되지 않았습니다. 다음은 5.54.2에서 작성된 파일을 검사하여 파생되었으며, 파서는 실제 노트북을 바이트 단위로 왕복하여 검증됩니다.

file     : "MAGIC%$1" u64 sectionCount u64 reserved
           sectionCount * { name[16], u64 endOffset }
           80 zero bytes, then sections laid out in table order
section  : "MAGIC@@9" type[16] name[16] u64 contentLength 80 zero bytes, content

main 섹션에는 두 개의 자식이 있습니다: fn(블록 그래프 JSON)과 leaves(모든 리터럴 값을 담는 index 섹션을 가진 객체 컨테이너). func가 비어 있지 않은 블록은 무언가를 계산하고, func가 비어 있는 블록은 리터럴입니다. 입력은 0과 -1이 모두 연결되지 않음을 의미하며, 생성 블록을 ID로 참조합니다.

알아두면 좋은 동작

이들은 실제 디버깅 시간을 소모하며 가능한 경우 validate_graph 또는 도구 설명에 인코딩되어 있습니다:

  • list<T> 매개변수는 정확히 하나의 core.list<T> 블록으로 공급되어야 합니다. 두 개의 암시적 값을 목록 슬롯에 직접 연결하면 nTop이 전체 파일을 로드 시 "파일을 로드할 수 없음"이라는 일반 오류로 거부하며 아무것도 명명하지 않습니다. validate_graph는 실제로 발생하는 형태를 포착합니다: list<T> 매개변수가 있는 블록에서 선언된 매개변수 수를 지나치는 연결된 엣지.

  • 추가적인 후행 연결되지 않은 입력 슬롯은 정상입니다. 블록 버전이 선택적 매개변수를 얻을 때 nTop 자체가 이를 생성하므로 오류가 아닙니다.

  • plane<point,vector,vector>는 원점과 평면을 생성하는 두 벡터를 받습니다. 법선은 두 번째 인수가 아니라 그들의 외적입니다.

  • offset_implicit은 직관과 반대입니다: 양수 오프셋은 침식합니다. 볼록한 엣지를 둥글게(형태학적 열기)는 offset(+r) 후 offset(-r)입니다.

  • boolean_union의 블렌드 열거형: 1은 접합부에 재료를 추가하고, 2는 제거하며, 0은 하드 유니온입니다.

  • implicit_to_mesh v2.4.0의 세 번째 입력은 최소 피처 크기입니다. 5mm로 설정하면 5mm 플레이트가 조용히 사라집니다.

  • 버전 접미사는 중요합니다. 바이너리에는 블록의 모든 과거 수정본이 포함되지만, nTop은 현재 것만 등록합니다. 오래된 수정본은 라이선스가 없는 툴킷과 동일한 "알 수 없는 블록 … 설치되지 않은 Toolkit 또는 Connector" 메시지로 실패하므로, 오래된 시그니처는 라이선스 누락과 정확히 동일하게 보입니다. search_blocks는 이름의 최신 수정본을 먼저 반환합니다; 이를 선호하고, 버전이 없는 형태는 의심하세요.

  • 연결되지 않은 입력은 -1(Empty)이며 0(None)이 아닙니다. 필수 입력에 0이 있으면 nTop이 파일 로드를 거부합니다. 그러나 -1도 보편적으로 안전하지 않습니다: 일부 선택적 입력은 Input at N is Empty but optional로 거부하며 리터럴을 공급해야 합니다. 주변 노트북이 이미 하는 방식을 따르고, validate_graph와 시험 실행으로 나머지를 결정하세요.

  • ntopcl -o는 그래프 자체의 output 키가 지정하는 블록을 보고하며, set_output이 이를 설정합니다. 루트 그룹의 입력은 노트북 출력이 아닙니다; set_output 없이 Output path specified, but can't find output in notebook. 오류가 발생합니다.

  • 시계열을 노출하는 결과 블록은 1부터 인덱싱되며, 1단계는 종종 답이 아닌 비물리적 초기화입니다. 이를 읽으면 오류 없이 그럴듯해 보이는 넌센스가 생성됩니다.

  • 최적화 중 영역 보존은 fe_region_by_implicit로 공급되는 passive_region_constraint<region>을 사용하며, 최적화 제약 목록에 추가됩니다. 초기 밀도 입력은 아무것도 고정하지 않습니다 — nTop 문서는 시작 추측일 뿐이라고 설명합니다.

nTop은 자체 예제를 제공합니다 - 먼저 읽으세요

nTop은 약 100개의 작동 예제 노트북을 C:\ProgramData Topology\documentation\ExtendedBlockDocs\에 설치하고, 전체 HTML 참조 페이지는 block-documentationlocks\ 아래에 있습니다. find_example는 둘 다 검색합니다. 예제 노트북은 블록의 배선, 리터럴 형태 및 속성 경로를 몇 초 안에 결정하며, 오류 메시지에서 동일한 것을 역공학하는 데는 몇 시간이 걸립니다. 추측하기 전에 먼저 확인하세요.

리터럴 값 형태

리터럴 값은 타입별로 저장되며 형태는 균일하지 않습니다:

타입

값

real

{"isFinite":true,"units":{"length":1},"val":0.005} (SI - 미터)

point

세 개의 그러한 객체 배열

text

{"string":"inlet"} - 아님 {"val":...}

choice

{"choices":["Full Analysis","Potential Flow"],"selected":0}

file_path

{"val":"C:/path/to/file.step"}

unit_length_enum

{"id":"mm"}

잘못된 형태는 로드 시 Leaf failed to deserialize with block/variable <name>로 실패합니다.

블록 시그니처

nTop은 자체 바이너리 내부에 블록 시그니처를 ASCII 문자열로 저장하며, 더 이상 등록되지 않은 수정본도 포함합니다. search_blocks는 런타임에 설치에서 이를 추출하고 각 이름의 최신 수정본을 먼저 정렬합니다. 이 저장소에는 시그니처 데이터가 포함되지 않습니다 — 시그니처는 nTop의 것이며, 이 서버는 재배포하지 않고 라이선스가 있는 설치에서 읽습니다.

제한 사항

  • 컨테이너 형식은 역공학되었으며 nTop 5.54.2에 대해서만 검증되었습니다. inspect_notebook은 각 파일이 기록하는 버전을 보고합니다. 다른 버전은 검증되지 않은 것으로 취급하고 백업을 유지하세요.

  • 편집 도구는 output을 전달하지 않으면 제자리에 씁니다. 검증에 실패하는 그래프 쓰기를 거부하지만, 편집이 모델에 의미적으로 올바른지 알 수 없습니다.

  • run_notebook은 nTop Automate 라이선스가 필요합니다. 없으면 ntopcl이 로그인 후 종료되고 오류가 표시됩니다.

  • 실제로는 Windows 전용입니다, nTop이 실행되는 곳이기 때문입니다.

개발

npm run check         # type-check src and test
npm test              # build, then run the test suite
npm run format:check  # Prettier is enforced by config, not by CI

테스트는 자체 포함되어 있으며 nTop이 필요하지 않습니다. 두 스위트는 더 많은 것을 제공할 때 확장됩니다:

  • NTOP_TEST_NOTEBOOKS — 세미콜론으로 구분된 .ntop 경로, 바이트 단위로 왕복. 이는 nTop 설치가 아닌 제공된 경로에 따라 제한됩니다. 저장소에는 노트북이 포함되지 않으므로, 위의 왕복 주장은 신뢰하지 말고 자신의 파일로 다시 검증해야 합니다.

  • 카탈로그 스위트는 실제 설치를 찾으면 스캔하고, 그렇지 않으면 건너뜁니다.

라이선스

MIT — LICENSE 참조.

nTop과 제휴하거나 보증하지 않습니다. "nTop" 및 "nTopology"는 해당 소유자의 상표입니다.

Available Tools

14 tools
add_blockA

Add a computed block. Give the full typed signature from search_blocks. Inputs are source block ids in parameter order; use 0 for an unconnected optional input. A list parameter takes exactly one core.list block.

Inputs: func (required), name (required), type (required), inputs (required), +3 more.

add_literalC

Add a literal block holding a constant. Value shape follows nTop: a length scalar is {"isFinite":true,"units":{"length":1},"val":0.005} in metres, a point is an array of three such objects, an enum is {"enum":0}.

Inputs: name (required), type (required), value (required), notebook (required), +2 more.

environmentB

Report whether ntopcl and an nTop installation were found, and how many block signatures are visible.

Inputs: no named parameters.

find_exampleA

Search nTop's own shipped documentation for a block: working example notebooks and HTML reference pages. Consult this BEFORE reverse-engineering a block's wiring - nTop ships 100+ example .ntop files that show the correct inputs, literal shapes and property paths.

Inputs: query (required), documentationRoot.

inspect_notebookA

Summarise a .ntop notebook: nTop version it was written by, its sections, how many blocks and literal values it holds, and what the root block evaluates.

Inputs: notebook (required).

mesh_statsA

Measure an STL: volume, surface area, bounding box, watertightness and connected components. Use this to check what a notebook actually produced.

Inputs: path (required), listComponents.

prune_graphA

Point the root block at the given outputs and drop every block no longer reachable. Use this to cut a large notebook down to one chain before running it.

Inputs: notebook (required), rootInputs (required), output.

read_graphA

List the blocks in a notebook with their typed signatures, wiring and literal values. Use filter to narrow by block name or signature.

Inputs: notebook (required), limit, filter.

run_notebookB

Execute a notebook headlessly through nTop Automate (ntopcl) and return its errors, warnings and per-block timings. Requires an nTop Automate licence.

Inputs: notebook (required), save, timeoutMs, inputsJson, +1 more.

search_blocksA

Search the block signatures present in the installed nTop binaries. Returns the exact typed signature strings that add_block needs, newest revision of each name first. The binaries retain retired revisions, and nTop rejects those with the same error it gives an unlicensed toolkit - so prefer the highest [version] and distrust a bare unversioned form.

Inputs: query (required), limit, installRoot.

set_inputA

Rewire one input slot of a block to a different source block. Use 0 to disconnect.

Inputs: slot (required), blockId (required), notebook (required), sourceId (required), +1 more.

set_literal_valueC

Set the value of a literal block - a scalar, file path, vector, point, boolean or enum. Writes in place unless output is given.

Inputs: value (required), blockId (required), notebook (required), output.

set_outputA

Choose which block ntopcl reports as the notebook output. Required before run_notebook's outputJson will produce anything - nTop reads the graph's own output key, not the root group's inputs, and answers "can't find output in notebook" when it is unset. Pass -1 to clear.

Inputs: blockId (required), notebook (required), output.

validate_graphA

Check a notebook for problems that stop it loading or building: dangling inputs, duplicate ids, literals with no value, and list parameters wired with several inline edges instead of a core.list block.

Inputs: notebook (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: adding literals vs. setting their values, reading the graph vs. inspecting the notebook, validating vs. running, searching blocks vs. finding examples. No two tools appear to do the same thing, so an agent can reliably pick the right one.

    Naming Consistency4/5

    The vast majority of tools follow a consistent verb_noun snake_case pattern (add_literal, search_blocks, set_output). Two exceptions break the pattern: 'mesh_stats' is a noun_noun compound and 'environment' is a bare noun, which slightly reduces predictability but does not cause real confusion.

    Tool Count5/5

    14 tools is well within the sweet spot for a domain-specific server. Each tool addresses a distinct step in the notebook lifecycle—inspection, editing, validation, execution, and analysis—earning its place without bloat or obvious omission.

    Completeness4/5

    The tool surface covers the core workflow: read/inspect/validate, add and modify blocks/literals, rewire inputs, set outputs, run, and check results. Minor gaps exist (e.g., no explicit block deletion, no direct 'save notebook' tool), but existing tools like prune_graph and set_input can work around these without agent failure.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables building and modifying parametric solid models in a local SOLIDWORKS installation via the COM API.
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables control of a live SOLIDWORKS session through the Windows COM API, providing native sketch, feature, body, reference-geometry, view, probe, and export operations, along with transactional CAD plans, parametric sketches, multibody tools, and deterministic raster-to-sketch vectorization pipelines.
      1
      -