schemeog-mcp 2.2.0 → 2.2.1
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 +106 -151
- package/index.js +10 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
# SchemeOG MCP Server v2.
|
|
1
|
+
# SchemeOG MCP Server v2.2
|
|
2
2
|
|
|
3
|
-
MCP
|
|
3
|
+
MCP server for [SchemeOG Cloud](https://scheme.smartlaunchhub.com) — create diagrams and flowcharts with AI.
|
|
4
4
|
|
|
5
|
-
## 14
|
|
5
|
+
## 14 Commands
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Schemas (5 commands)
|
|
8
8
|
|
|
9
|
-
|
|
|
10
|
-
|
|
11
|
-
| `list_schemas` |
|
|
12
|
-
| `get_schema` |
|
|
13
|
-
| `create_schema` |
|
|
14
|
-
| `replace_schema` |
|
|
15
|
-
| `delete_schema` |
|
|
9
|
+
| Command | Description |
|
|
10
|
+
|---------|-------------|
|
|
11
|
+
| `list_schemas` | List all schemas |
|
|
12
|
+
| `get_schema` | Get schema with data |
|
|
13
|
+
| `create_schema` | Create new schema |
|
|
14
|
+
| `replace_schema` | Replace schema content |
|
|
15
|
+
| `delete_schema` | Delete schema |
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### Projects (5 commands)
|
|
18
18
|
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
| `list_projects` |
|
|
22
|
-
| `create_project` |
|
|
23
|
-
| `update_project` |
|
|
24
|
-
| `delete_project` |
|
|
25
|
-
| `move_schema_to_project` |
|
|
19
|
+
| Command | Description |
|
|
20
|
+
|---------|-------------|
|
|
21
|
+
| `list_projects` | List projects (folders) |
|
|
22
|
+
| `create_project` | Create project |
|
|
23
|
+
| `update_project` | Update project |
|
|
24
|
+
| `delete_project` | Delete project |
|
|
25
|
+
| `move_schema_to_project` | Move schema to project |
|
|
26
26
|
|
|
27
|
-
###
|
|
27
|
+
### Tags (4 commands)
|
|
28
28
|
|
|
29
|
-
|
|
|
30
|
-
|
|
31
|
-
| `list_tags` |
|
|
32
|
-
| `add_tag` |
|
|
33
|
-
| `remove_tag` |
|
|
34
|
-
| `tag_element` |
|
|
29
|
+
| Command | Description |
|
|
30
|
+
|---------|-------------|
|
|
31
|
+
| `list_tags` | List schema tags |
|
|
32
|
+
| `add_tag` | Add tag to schema |
|
|
33
|
+
| `remove_tag` | Remove tag from schema |
|
|
34
|
+
| `tag_element` | Assign/remove tag from element |
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Installation
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### Via npx (recommended)
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
npx schemeog-mcp
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Setup
|
|
45
45
|
|
|
46
|
-
### 1.
|
|
46
|
+
### 1. Get your token
|
|
47
47
|
|
|
48
|
-
1.
|
|
49
|
-
2.
|
|
50
|
-
3.
|
|
51
|
-
4.
|
|
48
|
+
1. Open https://scheme.smartlaunchhub.com
|
|
49
|
+
2. Sign in with email
|
|
50
|
+
3. Go to Profile
|
|
51
|
+
4. Copy token from "Claude Code Integration" section
|
|
52
52
|
|
|
53
|
-
### 2.
|
|
53
|
+
### 2. Add to Claude Code / Cline
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
In `~/.claude.json` (or Cline settings):
|
|
56
56
|
|
|
57
57
|
```json
|
|
58
58
|
{
|
|
@@ -68,199 +68,154 @@ npx schemeog-mcp
|
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
##
|
|
71
|
+
## Schema Data Format
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### Full schema example
|
|
74
74
|
|
|
75
75
|
```json
|
|
76
76
|
{
|
|
77
77
|
"name": "User Registration Flow",
|
|
78
|
-
"description": "
|
|
78
|
+
"description": "User registration process",
|
|
79
79
|
"elements": [
|
|
80
80
|
{
|
|
81
81
|
"id": "start",
|
|
82
82
|
"type": "card",
|
|
83
|
-
"title": "
|
|
83
|
+
"title": "Registration Form",
|
|
84
84
|
"color": "light_green",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"description": "Пользователь заполняет форму с email и паролем"
|
|
85
|
+
"tags": ["user"],
|
|
86
|
+
"description": "User fills in email and password"
|
|
88
87
|
},
|
|
89
88
|
{
|
|
90
89
|
"id": "validate",
|
|
91
90
|
"type": "condition",
|
|
92
|
-
"title": "
|
|
91
|
+
"title": "Validate Data",
|
|
93
92
|
"color": "light_yellow",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"description": "Проверка корректности email и сложности пароля"
|
|
93
|
+
"tags": ["system", "check"],
|
|
94
|
+
"description": "Check email format and password strength"
|
|
97
95
|
},
|
|
98
96
|
{
|
|
99
97
|
"id": "save",
|
|
100
98
|
"type": "card",
|
|
101
|
-
"title": "
|
|
99
|
+
"title": "Save to Database",
|
|
102
100
|
"color": "light_blue",
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"description": "Создание записи пользователя в базе данных"
|
|
101
|
+
"tags": ["system"],
|
|
102
|
+
"description": "Create user record in database"
|
|
106
103
|
},
|
|
107
104
|
{
|
|
108
105
|
"id": "error",
|
|
109
106
|
"type": "card",
|
|
110
|
-
"title": "
|
|
107
|
+
"title": "Validation Error",
|
|
111
108
|
"color": "light_red",
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"description": "Показать пользователю ошибки валидации"
|
|
109
|
+
"tags": ["system", "error"],
|
|
110
|
+
"description": "Show validation errors to user"
|
|
115
111
|
},
|
|
116
112
|
{
|
|
117
113
|
"id": "success",
|
|
118
114
|
"type": "card",
|
|
119
|
-
"title": "
|
|
115
|
+
"title": "Registration Complete",
|
|
120
116
|
"color": "light_green",
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"description": "Пользователь успешно зарегистрирован"
|
|
117
|
+
"tags": ["user"],
|
|
118
|
+
"description": "User successfully registered"
|
|
124
119
|
}
|
|
125
120
|
],
|
|
126
121
|
"connections": [
|
|
127
|
-
{"from": "start", "to": "validate", "label": "
|
|
128
|
-
{"from": "validate", "to": "save", "label": "
|
|
129
|
-
{"from": "validate", "to": "error", "label": "
|
|
122
|
+
{"from": "start", "to": "validate", "label": "submit"},
|
|
123
|
+
{"from": "validate", "to": "save", "label": "valid"},
|
|
124
|
+
{"from": "validate", "to": "error", "label": "invalid"},
|
|
130
125
|
{"from": "save", "to": "success"},
|
|
131
|
-
{"from": "error", "to": "start", "label": "
|
|
126
|
+
{"from": "error", "to": "start", "label": "retry"}
|
|
132
127
|
],
|
|
133
128
|
"tagsDictionary": [
|
|
134
|
-
{"id": "tag-user", "name": "
|
|
135
|
-
{"id": "tag-system", "name": "
|
|
136
|
-
{"id": "tag-check", "name": "
|
|
137
|
-
{"id": "tag-error", "name": "
|
|
129
|
+
{"id": "tag-user", "name": "user", "color": "#4CAF50"},
|
|
130
|
+
{"id": "tag-system", "name": "system", "color": "#2196F3"},
|
|
131
|
+
{"id": "tag-check", "name": "check", "color": "#FF9800"},
|
|
132
|
+
{"id": "tag-error", "name": "error", "color": "#F44336"}
|
|
138
133
|
]
|
|
139
134
|
}
|
|
140
135
|
```
|
|
141
136
|
|
|
142
|
-
###
|
|
137
|
+
### Element (card or condition)
|
|
143
138
|
|
|
144
139
|
```json
|
|
145
140
|
{
|
|
146
141
|
"id": "unique_id",
|
|
147
142
|
"type": "card",
|
|
148
|
-
"title": "
|
|
143
|
+
"title": "Card Title",
|
|
149
144
|
"color": "light_blue",
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"description": "Подробное описание действия или процесса"
|
|
145
|
+
"tags": ["tag1", "tag2"],
|
|
146
|
+
"description": "Detailed description of the action or process"
|
|
153
147
|
}
|
|
154
148
|
```
|
|
155
149
|
|
|
156
|
-
|
|
157
|
-
- `card` —
|
|
158
|
-
- `condition` —
|
|
150
|
+
**Element types:**
|
|
151
|
+
- `card` — regular process/action card
|
|
152
|
+
- `condition` — decision point (diamond shape)
|
|
159
153
|
|
|
160
|
-
|
|
161
|
-
|
|
|
162
|
-
|
|
163
|
-
| `white` |
|
|
164
|
-
| `light_blue` |
|
|
165
|
-
| `light_green` |
|
|
166
|
-
| `light_yellow` |
|
|
167
|
-
| `light_orange` |
|
|
168
|
-
| `light_red` |
|
|
169
|
-
| `light_purple` |
|
|
170
|
-
| `light_gray` |
|
|
171
|
-
| `light_pink` |
|
|
172
|
-
| `light_teal` |
|
|
154
|
+
**Available colors (`color`):**
|
|
155
|
+
| Color | Purpose |
|
|
156
|
+
|-------|---------|
|
|
157
|
+
| `white` | Default white |
|
|
158
|
+
| `light_blue` | Main processes |
|
|
159
|
+
| `light_green` | Start and success |
|
|
160
|
+
| `light_yellow` | Checks and conditions |
|
|
161
|
+
| `light_orange` | Warnings |
|
|
162
|
+
| `light_red` | Errors and critical |
|
|
163
|
+
| `light_purple` | Decisions |
|
|
164
|
+
| `light_gray` | Completion |
|
|
165
|
+
| `light_pink` | Additional processes |
|
|
166
|
+
| `light_teal` | Special operations |
|
|
173
167
|
|
|
174
|
-
|
|
175
|
-
`default`, `blue`, `green`, `orange`, `purple`, `red`, `teal`, `yellow`, `gray`, `black`
|
|
168
|
+
**Border colors (`borderColor`):** `default`, `blue`, `green`, `orange`, `purple`, `red`, `teal`, `yellow`, `gray`, `black`
|
|
176
169
|
|
|
177
|
-
|
|
170
|
+
**Important:** Do NOT specify `width`, `height`, `x`, `y` — they are calculated automatically!
|
|
178
171
|
|
|
179
|
-
###
|
|
172
|
+
### Connection
|
|
180
173
|
|
|
181
174
|
```json
|
|
182
175
|
{
|
|
183
176
|
"from": "source_id",
|
|
184
177
|
"to": "target_id",
|
|
185
|
-
"label": "
|
|
178
|
+
"label": "optional label",
|
|
186
179
|
"style": "solid"
|
|
187
180
|
}
|
|
188
181
|
```
|
|
189
182
|
|
|
190
|
-
|
|
183
|
+
**Line styles (`style`):** `solid`, `dashed`, `dotted`
|
|
191
184
|
|
|
192
|
-
###
|
|
185
|
+
### Tags Dictionary (tagsDictionary)
|
|
193
186
|
|
|
194
187
|
```json
|
|
195
188
|
{
|
|
196
189
|
"tagsDictionary": [
|
|
197
|
-
{"id": "tag-1", "name": "
|
|
198
|
-
{"id": "tag-2", "name": "
|
|
199
|
-
{"id": "tag-3", "name": "
|
|
190
|
+
{"id": "tag-1", "name": "system", "color": "#2196F3"},
|
|
191
|
+
{"id": "tag-2", "name": "user", "color": "#4CAF50"},
|
|
192
|
+
{"id": "tag-3", "name": "check", "color": "#FF9800"}
|
|
200
193
|
]
|
|
201
194
|
}
|
|
202
195
|
```
|
|
203
196
|
|
|
204
|
-
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
- `муж`, `жена`, `ребёнок` (для личных схем)
|
|
197
|
+
**Tags = roles/actors.** Indicate WHO performs the action:
|
|
198
|
+
- `system`, `user`, `admin`
|
|
199
|
+
- `client`, `manager`, `bot`
|
|
208
200
|
|
|
209
|
-
##
|
|
201
|
+
## Schema Methodology
|
|
210
202
|
|
|
211
|
-
|
|
203
|
+
Schema = complete tree of **ACTIONS** and **CONSEQUENCES**:
|
|
212
204
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### Обновить схему
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
Добавь в схему блок "Двухфакторная аутентификация" между проверкой и успехом
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### Работа с проектами
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
Создай проект "Backend API" с иконкой 🚀 и синим цветом
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
```
|
|
233
|
-
Перемести схему в проект Backend API
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### Работа с тегами
|
|
237
|
-
|
|
238
|
-
```
|
|
239
|
-
Добавь тег "Critical" красного цвета в схему
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
```
|
|
243
|
-
Пометь элемент "Валидация" тегом Critical
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
## Методология создания схем
|
|
247
|
-
|
|
248
|
-
Схема = полное дерево **ДЕЙСТВИЙ** и **ПОСЛЕДСТВИЙ**:
|
|
249
|
-
|
|
250
|
-
1. Каждое решение → показать ВСЕ возможные варианты
|
|
251
|
-
2. Каждый вариант → показать ВСЕ последствия
|
|
252
|
-
3. Использовать `condition` для точек принятия решений
|
|
253
|
-
4. НЕ абстрактные размышления — КОНКРЕТНЫЕ пути развития
|
|
254
|
-
5. Теги указывают КТО выполняет действие
|
|
205
|
+
1. Each decision → show ALL possible options
|
|
206
|
+
2. Each option → show ALL consequences
|
|
207
|
+
3. Use `condition` for decision points
|
|
208
|
+
4. NOT abstract thoughts — CONCRETE paths
|
|
209
|
+
5. Tags indicate WHO performs the action
|
|
255
210
|
|
|
256
|
-
|
|
211
|
+
**Example:**
|
|
257
212
|
```
|
|
258
|
-
"
|
|
259
|
-
├── "
|
|
260
|
-
└── "
|
|
213
|
+
"Submit Form" → condition "Validate" →
|
|
214
|
+
├── "Data Valid" → "Save" → "Success"
|
|
215
|
+
└── "Error" → "Show Errors" → "Fix Form"
|
|
261
216
|
```
|
|
262
217
|
|
|
263
|
-
##
|
|
218
|
+
## Links
|
|
264
219
|
|
|
265
220
|
- [SchemeOG Cloud](https://scheme.smartlaunchhub.com)
|
|
266
221
|
- [GitLab](https://gitlab.com/serter2069/schemeog-cloud)
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* SchemeOG MCP Server v2.
|
|
4
|
+
* SchemeOG MCP Server v2.2
|
|
5
5
|
*
|
|
6
6
|
* MCP сервер для работы со схемами, проектами и тегами в SchemeOG Cloud.
|
|
7
7
|
*
|
|
@@ -114,11 +114,11 @@ async function apiRequest(endpoint, options = {}) {
|
|
|
114
114
|
throw new Error(error.message);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
// Базовая валидация формата токена
|
|
118
|
-
if (!AUTH_TOKEN.startsWith("
|
|
117
|
+
// Базовая валидация формата токена (schog_ - новый формат)
|
|
118
|
+
if (!AUTH_TOKEN.startsWith("schog_") || AUTH_TOKEN.length < 20) {
|
|
119
119
|
const error = createError(
|
|
120
120
|
ErrorCodes.AUTH_INVALID,
|
|
121
|
-
`Неверный формат токена. Токен должен начинаться с "
|
|
121
|
+
`Неверный формат токена. Токен должен начинаться с "schog_" и содержать минимум 20 символов.\n\nПолучен: ${AUTH_TOKEN.substring(0, 10)}...`
|
|
122
122
|
);
|
|
123
123
|
throw new Error(error.message);
|
|
124
124
|
}
|
|
@@ -215,10 +215,7 @@ function prepareElements(elements) {
|
|
|
215
215
|
if (!elements) return [];
|
|
216
216
|
return elements.map(el => ({
|
|
217
217
|
id: el.id || generateId(),
|
|
218
|
-
type: el.type || "
|
|
219
|
-
x: el.x || 0,
|
|
220
|
-
y: el.y || 0,
|
|
221
|
-
text: el.text || "",
|
|
218
|
+
type: el.type || "card",
|
|
222
219
|
...el
|
|
223
220
|
}));
|
|
224
221
|
}
|
|
@@ -1192,16 +1189,16 @@ async function main() {
|
|
|
1192
1189
|
2. Добавьте в настройки MCP:
|
|
1193
1190
|
|
|
1194
1191
|
"env": {
|
|
1195
|
-
"SCHEMEOG_TOKEN": "
|
|
1192
|
+
"SCHEMEOG_TOKEN": "schog_ваш-токен"
|
|
1196
1193
|
}
|
|
1197
1194
|
|
|
1198
1195
|
Документация: ${DOCS_URL}
|
|
1199
1196
|
`);
|
|
1200
|
-
} else if (!AUTH_TOKEN.startsWith("
|
|
1197
|
+
} else if (!AUTH_TOKEN.startsWith("schog_")) {
|
|
1201
1198
|
console.error(`
|
|
1202
1199
|
⚠️ Неверный формат токена!
|
|
1203
1200
|
|
|
1204
|
-
Токен должен начинаться с "
|
|
1201
|
+
Токен должен начинаться с "schog_".
|
|
1205
1202
|
Получен: ${AUTH_TOKEN.substring(0, 10)}...
|
|
1206
1203
|
|
|
1207
1204
|
Создайте новый токен: ${PROFILE_URL}
|
|
@@ -1211,7 +1208,7 @@ async function main() {
|
|
|
1211
1208
|
const server = new Server(
|
|
1212
1209
|
{
|
|
1213
1210
|
name: "schemeog-mcp",
|
|
1214
|
-
version: "2.1
|
|
1211
|
+
version: "2.2.1",
|
|
1215
1212
|
},
|
|
1216
1213
|
{
|
|
1217
1214
|
capabilities: {
|
|
@@ -1241,7 +1238,7 @@ async function main() {
|
|
|
1241
1238
|
const transport = new StdioServerTransport();
|
|
1242
1239
|
await server.connect(transport);
|
|
1243
1240
|
|
|
1244
|
-
console.error("SchemeOG MCP Server v2.
|
|
1241
|
+
console.error("SchemeOG MCP Server v2.2 запущен");
|
|
1245
1242
|
}
|
|
1246
1243
|
|
|
1247
1244
|
main().catch(console.error);
|