schemeog-mcp 3.7.2 → 3.8.0

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.
Files changed (3) hide show
  1. package/README.md +15 -133
  2. package/index.js +14 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,18 +1,15 @@
1
- # SchemeOG MCP Server v3.6
1
+ # SchemeOG MCP Server v2.9
2
2
 
3
- MCP server for [Diagrams.love](https://diagrams.love) — create diagrams and flowcharts with AI.
3
+ MCP server for [SchemeOG Cloud](https://scheme.smartlaunchhub.com) — create diagrams and flowcharts with AI.
4
4
 
5
5
  ## Features
6
6
 
7
- - **21 commands** for schemas, projects, tags, versions, and import/export
8
- - **Version history**: View, restore, and create checkpoints for schemas
7
+ - **17 commands** for schemas, projects, tags, and import/export
9
8
  - **Auto-refresh**: Browser automatically reloads when MCP updates schema
10
9
  - **Smart positioning**: Existing elements keep their positions, new elements get auto-layout
11
10
  - **No coordinate conflicts**: MCP ignores x/y to prevent overlapping cards
12
- - **Shared links support**: Open schemas via public `/shared/` URLs (read-only)
13
- - **Large schema handling**: Automatic detection and preview for schemas >100 elements
14
11
 
15
- ## 21 Commands
12
+ ## 17 Commands
16
13
 
17
14
  ### Schemas (6 commands)
18
15
 
@@ -51,15 +48,6 @@ MCP server for [Diagrams.love](https://diagrams.love) — create diagrams and fl
51
48
  | `remove_tag` | Remove tag from schema |
52
49
  | `tag_element` | Assign/remove tag from element |
53
50
 
54
- ### Versions (4 commands)
55
-
56
- | Command | Description |
57
- |---------|-------------|
58
- | `list_versions` | List schema version history (auto-saves and manual checkpoints) |
59
- | `get_version` | Get full data of a specific version |
60
- | `restore_version` | Restore schema from a previous version (auto-backup before restore) |
61
- | `create_version` | Create manual checkpoint with optional comment |
62
-
63
51
  ## Installation
64
52
 
65
53
  ### Via npx (recommended)
@@ -72,7 +60,7 @@ npx schemeog-mcp
72
60
 
73
61
  ### 1. Get your token
74
62
 
75
- 1. Open https://diagrams.love
63
+ 1. Open https://scheme.smartlaunchhub.com
76
64
  2. Sign in with email
77
65
  3. Go to Profile
78
66
  4. Copy token from "Claude Code Integration" section
@@ -125,29 +113,6 @@ In `~/.claude.json` (or Cline settings):
125
113
  **Element types:**
126
114
  - `card` — regular process/action card
127
115
  - `condition` — decision point (diamond shape)
128
- - `ascii` — ASCII diagram card (renders monospace ASCII art)
129
-
130
- ### ASCII Card Type
131
-
132
- The `ascii` type renders ASCII diagrams inside a card with monospace font. Requires `asciiContent` field.
133
-
134
- ```json
135
- {
136
- "id": "flow-1",
137
- "type": "ascii",
138
- "title": "Request Flow",
139
- "asciiContent": "┌─────────┐ ┌─────────┐\n│ Request │────▶│ Process │\n└─────────┘ └─────────┘",
140
- "borderColor": "purple"
141
- }
142
- ```
143
-
144
- **ASCII card features:**
145
- - Monospace font rendering
146
- - Auto-calculated width/height based on content
147
- - Max 2000 characters for `asciiContent`
148
- - Default border color: purple
149
- - Supports box-drawing characters: `┌ ┐ └ ┘ ─ │ ├ ┤ ┬ ┴ ┼`
150
- - Supports arrows: `▶ ◀ ▼ ▲ → ← ↓ ↑`
151
116
 
152
117
  **Completion status (`completed`):**
153
118
  - `true` — card is marked as completed (done)
@@ -191,46 +156,6 @@ Connections are defined inside each element's `connections` array:
191
156
 
192
157
  **Line styles (`style`):** `solid` (default), `dashed`, `dotted`
193
158
 
194
- ### Connection Label Format
195
-
196
- **When to use `[square brackets]`:** UI transitions (screen to screen, user actions)
197
-
198
- ```json
199
- {
200
- "connections": [
201
- {"to": "home", "label": "[Login]"},
202
- {"to": "profile", "label": "[Open Profile]"},
203
- {"to": "settings", "label": "[Settings]"}
204
- ]
205
- }
206
- ```
207
-
208
- **When to use NO brackets:** Logic/data flow (conditions, API responses)
209
-
210
- ```json
211
- {
212
- "connections": [
213
- {"to": "success", "label": "valid"},
214
- {"to": "error", "label": "invalid"},
215
- {"to": "next", "label": "yes"},
216
- {"to": "stop", "label": "no"}
217
- ]
218
- }
219
- ```
220
-
221
- **Summary:**
222
- | Type | Format | Examples |
223
- |------|--------|----------|
224
- | UI transitions | `[Brackets]` | `[Login]`, `[Submit]`, `[Back]` |
225
- | Logic/conditions | No brackets | `yes`, `no`, `valid`, `error` |
226
-
227
- **Example in ASCII:**
228
- ```
229
- ┌───────────┐ [Login] ┌───────────┐ yes ┌───────────┐
230
- │ Login │──────────▶│ Check? │────────▶│ Success │
231
- └───────────┘ └───────────┘ └───────────┘
232
- ```
233
-
234
159
  ### Full schema example
235
160
 
236
161
  ```json
@@ -246,7 +171,7 @@ Connections are defined inside each element's `connections` array:
246
171
  "tags": ["user"],
247
172
  "description": "User fills in email and password",
248
173
  "connections": [
249
- {"to": "validate", "label": "[Submit]"}
174
+ {"to": "validate", "label": "submit"}
250
175
  ]
251
176
  },
252
177
  {
@@ -323,38 +248,15 @@ When you edit a schema via MCP while viewing it in the browser:
323
248
  You can open any schema by URL using `get_schema_by_url`:
324
249
 
325
250
  ```
326
- # Canvas URL (main format) — full access
327
- https://diagrams.love/canvas?schema=abc123
251
+ # Canvas URL (основной формат)
252
+ https://scheme.smartlaunchhub.com/canvas?schema=abc123
328
253
 
329
- # Shared link — read-only access
330
- https://diagrams.love/shared/xyz789
254
+ # Shared link
255
+ https://scheme.smartlaunchhub.com/shared/xyz789
331
256
  ```
332
257
 
333
258
  Just paste the URL and the MCP will extract the schema ID automatically.
334
259
 
335
- ### Shared Links (Read-Only)
336
-
337
- When you open a schema via `/shared/` URL:
338
- - ✅ You can **view** the schema content
339
- - ✅ You can **analyze** the structure
340
- - ✅ You can **count** elements and connections
341
- - ❌ You **cannot edit** — need access to original schema
342
-
343
- This is useful for:
344
- - Analyzing schemas shared by others
345
- - Answering questions about schema structure
346
- - Getting inspiration for your own diagrams
347
-
348
- ## Large Schema Handling
349
-
350
- For schemas with >100 elements or >50KB data:
351
-
352
- - `get_schema` shows first 5 elements as preview
353
- - `get_schema_by_url` shows statistics only
354
- - Full data available via `export_schema_to_json`
355
-
356
- This prevents context overflow in Claude Code when working with large diagrams.
357
-
358
260
  ## Schema Methodology
359
261
 
360
262
  Schema = complete tree of **ACTIONS** and **CONSEQUENCES**:
@@ -451,34 +353,14 @@ import_schema_from_json(
451
353
 
452
354
  ## Version History
453
355
 
454
- Full version control for your schemas:
455
-
456
- ### Commands
457
-
458
- ```
459
- # List all versions
460
- list_versions(schema_id: "xxx")
461
-
462
- # View specific version
463
- get_version(schema_id: "xxx", version_id: "yyy")
464
-
465
- # Restore from version (auto-backup before restore)
466
- restore_version(schema_id: "xxx", version_id: "yyy")
467
-
468
- # Create manual checkpoint
469
- create_version(schema_id: "xxx", comment: "Before refactoring")
470
- ```
471
-
472
- ### Features
473
-
474
- - **Auto-save**: Every schema change creates a version automatically
475
- - **Manual checkpoints**: Create named versions before important changes
476
- - **Safe restore**: Current state is backed up before any restore
477
- - **100 versions limit**: Old auto-saves are cleaned, manual checkpoints are preserved
356
+ MCP now automatically creates versions when updating schemas:
357
+ - Before each update via MCP, a snapshot is saved
358
+ - View version history in the web interface (History tab)
359
+ - Restore any previous version with one click
478
360
 
479
361
  ## Links
480
362
 
481
- - [Diagrams.love](https://diagrams.love)
363
+ - [SchemeOG Cloud](https://scheme.smartlaunchhub.com)
482
364
  - [GitLab](https://gitlab.com/serter2069/schemeog-mcp)
483
365
 
484
366
  ## License
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * SchemeOG MCP Server v3.7.0
4
+ * SchemeOG MCP Server v3.8.0
5
5
  *
6
6
  * MCP сервер для работы со схемами, проектами и тегами в SchemeOG Cloud.
7
7
  *
@@ -37,8 +37,7 @@ import {
37
37
  CallToolRequestSchema,
38
38
  ListToolsRequestSchema,
39
39
  } from "@modelcontextprotocol/sdk/types.js";
40
- import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
41
- import { dirname } from "path";
40
+ import { readFileSync } from "fs";
42
41
 
43
42
  // Конфигурация
44
43
  const API_BASE_URL = process.env.SCHEMEOG_API_URL || "https://diagrams.love";
@@ -435,6 +434,11 @@ function normalizeElements(elements) {
435
434
  fixed.asciiContent = el.asciiContent;
436
435
  }
437
436
 
437
+ // HTML Content — для type: "html" (HTML+CSS контент с изолированными стилями)
438
+ if (el.htmlContent) {
439
+ fixed.htmlContent = el.htmlContent;
440
+ }
441
+
438
442
  // КРИТИЧНО: Извлекаем connections из элемента (локальный формат)
439
443
  // и конвертируем в формат сервера {from, to, label}
440
444
  if (el.connections && Array.isArray(el.connections)) {
@@ -2329,15 +2333,18 @@ export_schema_to_json(
2329
2333
 
2330
2334
  // Если указан file_path — сохраняем в файл
2331
2335
  if (file_path) {
2336
+ const fs = require('fs');
2337
+ const path = require('path');
2338
+
2332
2339
  // Создаём директорию если не существует
2333
- const dir = dirname(file_path);
2334
- if (!existsSync(dir)) {
2335
- mkdirSync(dir, { recursive: true });
2340
+ const dir = path.dirname(file_path);
2341
+ if (!fs.existsSync(dir)) {
2342
+ fs.mkdirSync(dir, { recursive: true });
2336
2343
  }
2337
2344
 
2338
2345
  // Сохраняем JSON в файл
2339
2346
  const jsonContent = JSON.stringify(exportData, null, 2);
2340
- writeFileSync(file_path, jsonContent, 'utf8');
2347
+ fs.writeFileSync(file_path, jsonContent, 'utf8');
2341
2348
 
2342
2349
  const fileSizeKB = Math.round(jsonContent.length / 1024);
2343
2350
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schemeog-mcp",
3
- "version": "3.7.2",
3
+ "version": "3.8.0",
4
4
  "description": "MCP Server for Diagrams.love - Create and manage visual diagrams and flowcharts with AI assistance",
5
5
  "type": "module",
6
6
  "main": "index.js",