@markdy/mcp-server 0.8.25 → 0.8.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,6 +51,28 @@ Equip Claude Desktop, Cursor, Google Antigravity, and autonomous AI agents with
51
51
  }
52
52
  ```
53
53
 
54
+ ### Google Antigravity (`~/.gemini/antigravity/mcp_config.json`)
55
+
56
+ ```json
57
+ {
58
+ "mcpServers": {
59
+ "markdy": {
60
+ "command": "npx",
61
+ "args": ["-y", "@markdy/mcp-server"]
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 📖 Documentation & References
70
+
71
+ - **Authoritative AI Agent Guide**: <https://markdy.com/AGENT.md>
72
+ - **Human Documentation**: <https://markdy.com/docs/>
73
+ - **Interactive Playground**: <https://markdy.com/playground/>
74
+ - **LLM Index**: <https://markdy.com/llms.txt>
75
+
54
76
  ---
55
77
 
56
78
  ## License
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ interface ToolResult {
13
13
  isError?: boolean;
14
14
  }
15
15
  declare function handleValidateMarkdy(code: string, checkArchitecture?: boolean): ToolResult;
16
- declare function handleTranspileToMarkdy(source: string, format: "mermaid" | "docker-compose" | "k8s" | "terraform", title?: string): ToolResult;
16
+ declare function handleTranspileToMarkdy(source: string, format: "mermaid" | "docker-compose" | "k8s" | "terraform" | "drawio", title?: string): Promise<ToolResult>;
17
17
  declare function handleExplainArchitecture(code: string): ToolResult;
18
18
  declare function handleGenerateMarkdyPrompt(userGoal: string): ToolResult;
19
19
 
package/dist/index.js CHANGED
@@ -18,7 +18,8 @@ import {
18
18
  transpileMermaidToMarkdy,
19
19
  transpileDockerComposeToMarkdy,
20
20
  transpileKubernetesManifestsToMarkdy,
21
- transpileTerraformStateToMarkdy
21
+ transpileTerraformStateToMarkdy,
22
+ transpileDrawioToMarkdy
22
23
  } from "@markdy/compat";
23
24
  function handleValidateMarkdy(code, checkArchitecture = true) {
24
25
  try {
@@ -43,7 +44,7 @@ function handleValidateMarkdy(code, checkArchitecture = true) {
43
44
  content: [{ type: "text", text: lines.join("\n") }]
44
45
  };
45
46
  } catch (error) {
46
- const repairPrompt = analyzeAndBuildRepairPrompt(code);
47
+ const repairBundle = analyzeAndBuildRepairPrompt(code);
47
48
  return {
48
49
  isError: true,
49
50
  content: [
@@ -52,13 +53,13 @@ function handleValidateMarkdy(code, checkArchitecture = true) {
52
53
  text: `\u274C Parse Error: ${error.message}
53
54
 
54
55
  Suggested AI Healing Prompt:
55
- ${repairPrompt}`
56
+ ${repairBundle.repairPrompt}`
56
57
  }
57
58
  ]
58
59
  };
59
60
  }
60
61
  }
61
- function handleTranspileToMarkdy(source, format, title = "Imported Scene") {
62
+ async function handleTranspileToMarkdy(source, format, title = "Imported Scene") {
62
63
  try {
63
64
  let markdyCode = "";
64
65
  switch (format) {
@@ -74,6 +75,9 @@ function handleTranspileToMarkdy(source, format, title = "Imported Scene") {
74
75
  case "terraform":
75
76
  markdyCode = transpileTerraformStateToMarkdy(source, title);
76
77
  break;
78
+ case "drawio":
79
+ markdyCode = (await transpileDrawioToMarkdy(source, title)).code;
80
+ break;
77
81
  default:
78
82
  throw new Error(`Unsupported ingestion format: ${format}`);
79
83
  }
@@ -132,16 +136,17 @@ function handleExplainArchitecture(code) {
132
136
  }
133
137
  function handleGenerateMarkdyPrompt(userGoal) {
134
138
  const prompt = [
135
- `You are an expert system architecture designer specializing in MarkdyScript DSL.`,
139
+ `You are an expert system architecture designer specializing in MarkdyScript 0.8+ syntax and DSL.`,
136
140
  `Goal: ${userGoal}`,
137
141
  ``,
138
- `### Instructions:`,
139
- `1. Use MarkdyScript 0.8+ syntax. Start with: \`scene "<Title>" theme=paper layout=LR\``,
140
- `2. Define nodes using semantic types (e.g. \`browser client\`, \`gateway api_gw\`, \`service auth_svc\`, \`database pg_db\`, \`cache redis\`, \`queue kafka\`).`,
141
- `3. Organize components in \`group <id> "<Label>": <members...>\` boundaries.`,
142
- `4. Define animated traffic steps in \`beat <id> "<Description>":\``,
143
- `5. Animate flows with \`show $nodes\`, \`client -> api_gw "request"\`, and \`api_gw -> auth_svc "verify"\`.`,
144
- `6. Keep syntax clean and output ONLY valid MarkdyScript.`
142
+ `### Instructions & Authoritative Reference:`,
143
+ `1. Follow the canonical MarkdyScript 0.8+ syntax and specification hosted at: https://markdy.com/AGENT.md`,
144
+ `2. Start the scene with: \`scene "<Title>" theme=paper layout=LR\``,
145
+ `3. Define nodes using semantic types (e.g. \`browser client\`, \`gateway api_gw\`, \`service auth_svc\`, \`database pg_db\`, \`cache redis\`, \`queue kafka\`, \`worker worker\`).`,
146
+ `4. Organize components in \`group <id> "<Label>": <members...>\` boundaries.`,
147
+ `5. Animate flows with canonical operators: \`->\` (request), \`<-\` (response), \`~>\` (event), and \`--\` (dependency).`,
148
+ `6. Group narrative cues into \`beat <id> "<Description>":\` with \`show $nodes\`, \`glow\`, \`focus\`, \`frame\`.`,
149
+ `7. Keep syntax clean, do not invent unsupported directives, and output ONLY valid MarkdyScript.`
145
150
  ].join("\n");
146
151
  return {
147
152
  content: [{ type: "text", text: prompt }]
@@ -153,7 +158,7 @@ function createMarkdyMcpServer() {
153
158
  const server = new Server(
154
159
  {
155
160
  name: "markdy-mcp-server",
156
- version: "0.8.20"
161
+ version: "0.8.26"
157
162
  },
158
163
  {
159
164
  capabilities: {
@@ -178,14 +183,14 @@ function createMarkdyMcpServer() {
178
183
  },
179
184
  {
180
185
  name: "transpile_to_markdy",
181
- description: "Converts external infrastructure or diagram code (Mermaid, Docker Compose, Kubernetes manifests, or Terraform state) into animated MarkdyScript scenes.",
186
+ description: "Converts external infrastructure or diagram code (Mermaid, Docker Compose, Kubernetes manifests, Terraform state, or Draw.io XML) into animated MarkdyScript scenes.",
182
187
  inputSchema: {
183
188
  type: "object",
184
189
  properties: {
185
190
  source: { type: "string", description: "The source code or content to transpile." },
186
191
  format: {
187
192
  type: "string",
188
- enum: ["mermaid", "docker-compose", "k8s", "terraform"],
193
+ enum: ["mermaid", "docker-compose", "k8s", "terraform", "drawio"],
189
194
  description: "The source format."
190
195
  },
191
196
  title: { type: "string", description: "Optional title for the resulting scene." }
@@ -228,7 +233,7 @@ function createMarkdyMcpServer() {
228
233
  safeArgs.checkArchitecture !== false
229
234
  );
230
235
  case "transpile_to_markdy":
231
- return handleTranspileToMarkdy(
236
+ return await handleTranspileToMarkdy(
232
237
  String(safeArgs.source ?? ""),
233
238
  safeArgs.format,
234
239
  safeArgs.title ? String(safeArgs.title) : void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/mcp-server",
3
- "version": "0.8.25",
3
+ "version": "0.8.27",
4
4
  "description": "Model Context Protocol server for Markdy diagram validation, transpilation, and generation.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,8 +16,8 @@
16
16
  ],
17
17
  "dependencies": {
18
18
  "@modelcontextprotocol/sdk": "^1.6.1",
19
- "@markdy/compat": "0.8.25",
20
- "@markdy/core": "0.8.25"
19
+ "@markdy/compat": "0.8.27",
20
+ "@markdy/core": "0.8.27"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^25.9.5",