Token导航 LogoToken导航TokenDH.com
Staruml Controller MCP Core logo
开发工具未说明官方级别未说明来源级核验

Staruml Controller MCP Core

MCP Server

为所有StarUML控制器MCP服务器提供共享的核心功能,包括HTTP客户端、工具注册、响应格式化器和服务器工厂等基础设施层,以及跨图表特定MCP服务器的通用工具定义。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
TypeScript开发工具命令行工具

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

pontasan

提供方

pontasan

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

staruml控制器mcp内核

所有人共享核心包 StarUML控制器 MCP服务器。提供基础架构层——HTTP客户端、工具注册表、响应格式化器、服务器工厂——以及在每个特定于图表的MCP服务器上共享的通用工具定义。

这个包有什么作用

每个图特定的MCP服务器(例如。, staruml-controller-erd-mcp, staruml-controller-seq-mcp)取决于这个包。它提供:

  1. 常用工具 --概述、项目、实用程序、图表、注释、形状、视图、元素
  2. 家庭配置 --25个图族(ERD、序列、类等)的声明性定义
  3. 服务器工厂 --一个电话 createServer() 使用通用+系列工具启动完整的MCP服务器
  4. 工具注册表 --在上注册工具的元数据驱动引擎 McpServer,处理主机/端口注入、URL参数编码、查询字符串和请求体构建
  5. HTTP客户端 --具有超时、连接错误处理和自动ID编码的REST客户端
  6. 响应格式化程序 --具有错误检测功能的一致MCP响应格式

建筑

src/
  index.ts                  # Public API exports
  server-factory.ts         # createServer(name, version, familyTools) → McpServer
  tool-registry.ts          # registerAll(server, tools) — declarative tool registration
  http-client.ts            # request(method, host, port, path, body) — REST client
  response-formatter.ts     # format(response), formatError(name, error)
  tools/
    general.ts              # get_status, get_element, tags, save/open project
    project.ts              # project_new, project_close, import, export
    utility.ts              # undo, redo, search, validate, mermaid_import, generate_diagram
    diagrams.ts             # diagram CRUD, export, layout, zoom, create_view_of
    notes.ts                # notes, note links, free lines
    shapes.ts               # shape CRUD (Text, Rect, Ellipse, Image, etc.)
    views.ts                # view position/style, reconnect, align
    elements.ts             # element update/delete, children, relocate, reorder
    family-factory.ts       # generateFamilyTools(config) — declarative tool generator
    families/
      types.ts              # FamilyConfig, ResourceConfig, RelationConfig, etc.
      erd.ts                # ERD family (data models, entities, columns, relationships, DDL)
      seq.ts                # Sequence family (interactions, lifelines, messages, fragments)
      class.ts              # Class/Package family
      usecase.ts            # Use Case family
      activity.ts           # Activity family
      statemachine.ts       # State Machine family
      component.ts          # Component family
      deployment.ts         # Deployment family
      object.ts             # Object family
      communication.ts      # Communication family
      composite.ts          # Composite Structure family
      infoflow.ts           # Information Flow family
      profile.ts            # Profile family
      timing.ts             # Timing family
      overview.ts           # Interaction Overview family
      flowchart.ts          # Flowchart family
      dfd.ts                # DFD family
      bpmn.ts               # BPMN family
      c4.ts                 # C4 family
      sysml.ts              # SysML family
      wireframe.ts          # Wireframe family
      mindmap.ts            # MindMap family
      aws.ts                # AWS family
      azure.ts              # Azure family
      gcp.ts                # GCP family

用法

创建特定于图表的MCP服务器

一个最小的MCP服务器只需要几行代码:

import { createServer, erdTools } from "staruml-controller-mcp-core"
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"

const server = createServer(
  "staruml-controller-erd-mcp",
  "1.0.0",
  erdTools       // diagram-specific tools
)

const transport = new StdioServerTransport()
await server.connect(transport)

createServer() 自动包含所有常用工具(常规、项目、实用程序、图表、注释、形状、视图、元素),并将其与提供的族工具合并。

使用家族工厂

对于自定义图表族,定义 FamilyConfig 并生成工具:

import { generateFamilyTools, type FamilyConfig } from "staruml-controller-mcp-core"

const config: FamilyConfig = {
  prefix: "mydiagram",
  label: "My Diagram",
  diagrams: { types: ["MyDiagramType"] },
  resources: [
    { name: "nodes", types: ["MyNode"], createFields: ["name", "label"] }
  ],
  relations: [
    { name: "edges", type: "MyEdge" }
  ],
}

const tools = generateFamilyTools(config)

使用个人导出

所有模块都单独导出以进行细粒度控制:

// Infrastructure
import { request, encodeId } from "staruml-controller-mcp-core"
import { format, formatError } from "staruml-controller-mcp-core"
import { registerAll, type ToolDefinition } from "staruml-controller-mcp-core"

// Common tool arrays
import { generalTools, diagramTools, noteTools } from "staruml-controller-mcp-core"

// Family configs
import { erdTools, seqTools, classTools } from "staruml-controller-mcp-core"

// Type definitions
import type { FamilyConfig, ResourceConfig, RelationConfig } from "staruml-controller-mcp-core"

构建

npm install
npm run build

输出到 dist/ 使用TypeScript声明(.d.ts).

先决条件

  • Node.js 18+

使用此包的图表服务器

服务器系列配置
staruml控制器erd-mcperdTools
staruml控制器seq-mcpseqTools
staruml控制器类mcpclassTools
staruml控制器用例mcpusecaseTools
staruml控制器活动mcpactivityTools
staruml控制器状态机mcpstatemachineTools
staruml控制器组件mcpcomponentTools
staruml控制器部署mcpdeploymentTools
staruml控制器对象mcpobjectTools
staruml控制器通信mcpcommunicationTools
staruml控制器复合mcpcompositeTools
staruml控制器信息流mcpinfoflowTools
staruml控制器配置文件mcpprofileTools
staruml控制器时序mcptimingTools
staruml控制器概述mcpoverviewTools
staruml控制器流程图mcpflowchartTools
staruml控制器dfd-mcpdfdTools
staruml控制器bpmn-mcpbpmnTools
星控器-c4-mcpc4Tools
staruml控制器sysml-mcpsysmlTools
staruml控制器线框mcpwireframeTools
staruml控制器思维导图mcpmindmapTools
staruml控制器aws-mcpawsTools
staruml控制器azure mcpazureTools
staruml控制器gcp-mcpgcpTools

许可证

麻省理工学院

目录标签

目录标签

TypeScript开发工具命令行工具UML工具本地部署图表服务服务器核心HTTP客户端

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP