integram-mcp 0.7.161 → 0.7.172
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 +8 -8
- package/index.js +115 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/integram-mcp)
|
|
4
4
|
|
|
5
|
-
MCP-сервер для Integram — даёт доступ к
|
|
5
|
+
MCP-сервер для Integram — даёт доступ к 823 инструментам (таблицы, документы, отчёты, автоматизации, портал, Telegram-боты, граф знаний и т.д.) из Claude Code, Claude Desktop и Cursor.
|
|
6
6
|
|
|
7
7
|
Работает с облачным Integram на **ai2o.online** или с локальным сервером.
|
|
8
8
|
|
|
@@ -15,7 +15,7 @@ claude mcp add integram \
|
|
|
15
15
|
-e INTEGRAM_URL=https://ai2o.online \
|
|
16
16
|
-e INTEGRAM_EMAIL=you@example.com \
|
|
17
17
|
-e INTEGRAM_PASSWORD=secret \
|
|
18
|
-
-- npx -y integram-mcp@0.7.
|
|
18
|
+
-- npx -y integram-mcp@0.7.172
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Ставить ничего не нужно: `npx` скачает пакет сам.
|
|
@@ -49,7 +49,7 @@ claude mcp add integram \
|
|
|
49
49
|
-e INTEGRAM_URL=http://localhost:8081 \
|
|
50
50
|
-e INTEGRAM_EMAIL=you@example.com \
|
|
51
51
|
-e INTEGRAM_PASSWORD=secret \
|
|
52
|
-
-- npx -y integram-mcp@0.7.
|
|
52
|
+
-- npx -y integram-mcp@0.7.172
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
Удалить: `claude mcp remove integram`
|
|
@@ -63,7 +63,7 @@ claude mcp add integram \
|
|
|
63
63
|
"mcpServers": {
|
|
64
64
|
"integram": {
|
|
65
65
|
"command": "npx",
|
|
66
|
-
"args": ["-y", "integram-mcp@0.7.
|
|
66
|
+
"args": ["-y", "integram-mcp@0.7.172"],
|
|
67
67
|
"env": {
|
|
68
68
|
"INTEGRAM_URL": "https://ai2o.online",
|
|
69
69
|
"INTEGRAM_EMAIL": "you@example.com",
|
|
@@ -83,7 +83,7 @@ claude mcp add integram \
|
|
|
83
83
|
"mcpServers": {
|
|
84
84
|
"integram": {
|
|
85
85
|
"command": "npx",
|
|
86
|
-
"args": ["-y", "integram-mcp@0.7.
|
|
86
|
+
"args": ["-y", "integram-mcp@0.7.172"],
|
|
87
87
|
"env": {
|
|
88
88
|
"INTEGRAM_URL": "https://ai2o.online",
|
|
89
89
|
"INTEGRAM_EMAIL": "you@example.com",
|
|
@@ -174,8 +174,8 @@ claude mcp add integram -e INTEGRAM_URL=... -e INTEGRAM_EMAIL=... -e INTEGRAM_PA
|
|
|
174
174
|
|---|---|---|
|
|
175
175
|
| **workspace** | Файлы, коннекторы, участники, бэкапы, дашборды, вью, аудит, нормализатор, автоматизации, вебхуки, формы | 134 |
|
|
176
176
|
| **pm** | Управление проектами: задачи, спринты, доски, бэклог, диаграммы | 77 |
|
|
177
|
+
| **teamchat** | Сообщения, решения, метрики агентов, W-матрица, топики | 77 |
|
|
177
178
|
| **portal** | Портал: конфиг, каталог, корзины, заказы, тикеты, KB, метрики, Telegram-боты | 67 |
|
|
178
|
-
| **teamchat** | Сообщения, решения, метрики агентов, W-матрица, топики | 58 |
|
|
179
179
|
| **docs** | Документы, блоки, версии, шаринг, папки, теги, шаблоны, PDF | 53 |
|
|
180
180
|
| **nightcall** | Нормативная спецификация и проверяемая генерация: требования, обязательства, свидетельства, базовые линии | 44 |
|
|
181
181
|
| **codespace** | Git-репозитории: ветки, коммиты, файлы, точечная правка (`patch_file`), pull requests; запись с `baseCommit` сливается с чужими изменениями вместо перезаписи | 41 |
|
|
@@ -187,10 +187,12 @@ claude mcp add integram -e INTEGRAM_URL=... -e INTEGRAM_EMAIL=... -e INTEGRAM_PA
|
|
|
187
187
|
| **objects** | Перемещение, дублирование, переупорядочивание записей, корзина, обратные ссылки | 20 |
|
|
188
188
|
| **agents** | Реестр внешних AI-агентов, делегирование | 16 |
|
|
189
189
|
| **reports** | Отчёты: CRUD, колонки, JOIN, фильтры, экспорт | 16 |
|
|
190
|
+
| **workflows** | Событийные процессы (ADR-036): состояние и биография объекта, запись события в append-only журнал | 16 |
|
|
190
191
|
| **grants** | Роли, гранты, row-level правила (только admin) | 15 |
|
|
191
192
|
| **presentations** | Презентации: PPTX-движок воркспейса (список, чтение, создание из outline, сохранение слайдов, meta и статусы, версии и откат, шаринг, экспорт PPTX/PDF, импорт PPTX, превью биндингов, удаление) | 15 |
|
|
192
193
|
| **graph** | Граф данных: запросы, окрестности, кратчайший путь | 13 |
|
|
193
194
|
| **kag** | Граф знаний: поиск, обход, вопрос-ответ, ввоз сущностей и связей | 13 |
|
|
195
|
+
| **ai** | TTS и самонаблюдение AI: озвучка, список голосов, квота, расход, статистика, аудит, трейсы, провайдеры, модели | 10 |
|
|
194
196
|
| **comments** | Комментарии и реакции к записям | 7 |
|
|
195
197
|
| **video** | обучающие видео (сценарий→запись→озвучка→монтаж) | 6 |
|
|
196
198
|
| **advisor** | Советы эксперта, возможности платформы | 5 |
|
|
@@ -199,13 +201,11 @@ claude mcp add integram -e INTEGRAM_URL=... -e INTEGRAM_EMAIL=... -e INTEGRAM_PA
|
|
|
199
201
|
| **workspace-tools** | Инструменты уровня области: регистрация, правка, ввоз наборов | 5 |
|
|
200
202
|
| **bulk** | Массовые операции: создание, обновление, удаление, AI-batch | 4 |
|
|
201
203
|
| **dlp** | Контур защиты от утечек: DLP-правила воркспейса (список, создание, правка, удаление; только admin) | 4 |
|
|
202
|
-
| **ai** | Синтез речи (TTS): озвучка текста, список голосов | 3 |
|
|
203
204
|
| **finmodel** | Финмодели: посчитанная сетка по периодам и сценариям, граф зависимостей ячеек, подбор параметров (goal-seek) с записью решения | 3 |
|
|
204
205
|
| **meetings** | Конвейер встреч (TG-запись → протокол → одобрение → задачи) | 3 |
|
|
205
206
|
| **normalizer** | Разбор документов: запуск, состояние, подтверждение сопоставления | 3 |
|
|
206
207
|
| **timeseries** | Временные ряды: запись, запрос, список источников | 3 |
|
|
207
208
|
| **lookups** | Справочники: варианты для dropdown/ref | 2 |
|
|
208
|
-
| **workflows** | Событийные процессы (ADR-036): состояние и биография объекта, запись события в append-only журнал | 2 |
|
|
209
209
|
<!-- END:tool-groups -->
|
|
210
210
|
|
|
211
211
|
Core активна сразу (21 tools). Остальные — через `search_tools`.
|
package/index.js
CHANGED
|
@@ -419,7 +419,8 @@ async function loadWorkspaceTools(slug) {
|
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
// Built-in MCP tools handled locally — never load from backend to avoid duplicates
|
|
422
|
-
|
|
422
|
+
// PM-948: экспорт — built-ins участвуют в каталоге did-you-mean подсказок.
|
|
423
|
+
export const BUILT_IN_NAMES = new Set([
|
|
423
424
|
'list_workspaces', 'switch_workspace', 'create_workspace',
|
|
424
425
|
'delete_workspace', 'clone_workspace', 'search_tools', 'confirm_action',
|
|
425
426
|
]);
|
|
@@ -676,6 +677,20 @@ export const EN_DESCRIPTIONS = {
|
|
|
676
677
|
// Workflows (event-sourced processes, ADR-036)
|
|
677
678
|
workflow_get_state: 'State and biography of an object in an event-sourced process: current event, terminal flag, available transitions (blocked + reason from gates), and the event history. Pure read of the journal and spec — adjacency/gate/role/terminal are enforced by the server on write. Returns: { process, objectId, current, terminal, started, available: [{ key, title, blocked, reason? }], history: [{ id, key, actor, seq, occurred_at, fields, cause_id, object_table_id, subject_kind }] }.',
|
|
678
679
|
workflow_record_event: 'Append an event to a process journal (append-only, ADR-036; requires confirmation). The server validates adjacency, gates, roles and terminal state: non-adjacent or terminal write → 422 SPEC_INVALID, lost race → 409 CONCURRENCY (refresh expectedSeq). Optionally pass docId of the document artifact for provenance. Call workflow_get_state first. Returns the inserted journal row.',
|
|
680
|
+
workflow_list_processes: 'List event-sourcing workflow processes of the workspace.',
|
|
681
|
+
workflow_list_specs: 'List event specs of one workflow process (process name is required).',
|
|
682
|
+
workflow_create_spec: 'Create an event spec for a workflow process.',
|
|
683
|
+
workflow_update_spec: 'Update a workflow event spec by id. The process field cannot be changed (rejected). Unknown id gives 404.',
|
|
684
|
+
workflow_delete_spec: 'Delete a workflow event spec by id.',
|
|
685
|
+
workflow_list_bindings: 'List table bindings to the attribute journal.',
|
|
686
|
+
workflow_set_binding: 'Bind or rebind a table to the attribute journal.',
|
|
687
|
+
workflow_list_conditions: 'List conditions of a workflow process.',
|
|
688
|
+
workflow_replace_conditions: 'Fully replace the conditions of a workflow process (empty list clears them).',
|
|
689
|
+
workflow_list_stages: 'List stages of a workflow process.',
|
|
690
|
+
workflow_replace_stages: 'Fully replace the stages of a workflow process.',
|
|
691
|
+
workflow_verify_chain: 'Verify the integrity of the append-only event chain of all processes.',
|
|
692
|
+
workflow_list_doc_events: 'List workflow events linked to a document.',
|
|
693
|
+
workflow_replace_process_specs: 'Fully replace all event specs of a workflow process (the only way to add an event to a live process).',
|
|
679
694
|
// Meta-KB
|
|
680
695
|
mk_revoke_entity: 'Revoke all knowledge base entities derived from a specified decision. Use when a decision was found to be incorrect. Returns { revoked: number, message: string }.',
|
|
681
696
|
mk_list_debates: 'List recent expert debates in the workspace. Returns { debates: Array, total: number }. Each debate has id, question, consensus, verdict, created_by, created_at.',
|
|
@@ -1350,6 +1365,25 @@ export const EN_DESCRIPTIONS = {
|
|
|
1350
1365
|
get_team_activity: 'Team activity stats: messages, closed topics, tasks (including overdue), decisions, debates, reactions per member. Hot topics, blockers, recent decisions.',
|
|
1351
1366
|
get_user_activity: 'Get activity for a specific user: messages, tasks (open/completed/overdue), decisions, blockers assigned to them.',
|
|
1352
1367
|
generate_team_digest: 'AI team digest: who completed what, blockers, overdue items, accepted decisions, participation balance. Counts teamchat messages/topics, decisions and debates — PM tasks are NOT included — use pm_briefing for those.',
|
|
1368
|
+
list_snippets: 'List chat message snippets (own plus shared).',
|
|
1369
|
+
create_snippet: 'Create a chat message snippet (template).',
|
|
1370
|
+
update_snippet: 'Update a chat message snippet by id.',
|
|
1371
|
+
delete_snippet: 'Delete a chat message snippet by id.',
|
|
1372
|
+
subscribe_topic: 'Subscribe to topic events (pointType: table or record; pointId required).',
|
|
1373
|
+
unsubscribe_topic: 'Unsubscribe from topic events (pointType: table or record; pointId required).',
|
|
1374
|
+
list_topic_subscriptions: 'List subscriptions of a topic.',
|
|
1375
|
+
list_starred_messages: 'Messages starred by the user (pass nextCursor from the response as cursor for the next page).',
|
|
1376
|
+
get_message_history: 'Edit history of a chat message.',
|
|
1377
|
+
get_message_readers: 'Who read the message and when. Empty is normal until members marked the MESSAGE read; mark_topic_read does not fill message receipts.',
|
|
1378
|
+
move_messages_bulk: 'Move up to 100 messages to another topic; service rejects other people\'s messages older than 72 hours.',
|
|
1379
|
+
get_kanban: 'Topic kanban board — always four status columns.',
|
|
1380
|
+
get_notif_pref: 'Get the user notification preference for a room.',
|
|
1381
|
+
set_notif_pref: 'Set room notification preference: all | mentions | nothing.',
|
|
1382
|
+
list_room_roles: 'List domain roles of a room.',
|
|
1383
|
+
create_room_role: 'Create a room domain role.',
|
|
1384
|
+
update_room_role: 'Update a room domain role.',
|
|
1385
|
+
delete_room_role: 'Delete a room domain role.',
|
|
1386
|
+
assign_room_role: 'Assign a room domain role to a member (userId is a username string).',
|
|
1353
1387
|
// Orgs
|
|
1354
1388
|
list_orgs: 'List organizations of the current user.',
|
|
1355
1389
|
get_org: 'Get organization info by slug.',
|
|
@@ -1380,6 +1414,14 @@ export const EN_DESCRIPTIONS = {
|
|
|
1380
1414
|
speak_text: 'Speak text via Piper TTS (neural speech synthesis). Returns base64 audio. Lets you listen to arbitrary text — a generated answer, a document, an analysis result.',
|
|
1381
1415
|
list_tts_voices: 'List available Piper TTS voices on the server.',
|
|
1382
1416
|
get_tts_status: 'Check TTS (Piper) availability. Returns: { available, engine }.',
|
|
1417
|
+
// LLM observability
|
|
1418
|
+
get_llm_quota: 'Workspace LLM token quota and usage in the current period.',
|
|
1419
|
+
get_llm_usage: 'LLM spend report for the workspace: calls, tokens, cost, breakdowns.',
|
|
1420
|
+
get_llm_stats: 'LLM economics: success rate, latency p50/p95, cost grouped by agent/provider/model/feature.',
|
|
1421
|
+
get_llm_audit_log: 'AI tool-call audit log of the workspace with filters.',
|
|
1422
|
+
get_llm_traces: 'LLM calls of one chat thread: model, tokens, cost, latency.',
|
|
1423
|
+
list_llm_providers: 'LLM provider statuses and alias chains (no keys).',
|
|
1424
|
+
list_llm_models: 'List available models.',
|
|
1383
1425
|
// Workspace tools
|
|
1384
1426
|
list_workspace_tools: 'List custom workspace tools executed in an isolated sandbox (isolated-vm). Optional: filter to active only.',
|
|
1385
1427
|
register_workspace_tool: 'Register a new custom workspace tool. Code runs in an isolated sandbox (isolated-vm). scope=instance: admin-only, the tool becomes executable in EVERY workspace (a workspace tool with the same name overrides it locally).',
|
|
@@ -1574,8 +1616,10 @@ async function dispatchTool(request) {
|
|
|
1574
1616
|
// Regular tool call → proxy to backend
|
|
1575
1617
|
if (!activeTools.has(name)) {
|
|
1576
1618
|
// PM-164: называем похожие инструменты, чтобы модель не подменяла имя.
|
|
1577
|
-
|
|
1578
|
-
|
|
1619
|
+
// PM-948: built-ins тоже в каталоге; для ветки unknown они считаются
|
|
1620
|
+
// активными (всегда перехватываются раньше и до сюда не доходят точными именами).
|
|
1621
|
+
const catalog = buildSuggestionCatalog(allTools);
|
|
1622
|
+
const text = buildNotActiveText(name, catalog, [...activeTools, ...BUILT_IN_NAMES]);
|
|
1579
1623
|
return { content: [{ type: 'text', text }], isError: true };
|
|
1580
1624
|
}
|
|
1581
1625
|
|
|
@@ -2194,12 +2238,44 @@ export function buildSearchToolsText(p) {
|
|
|
2194
2238
|
|
|
2195
2239
|
// ─── PM-164: similar-name guard ──────────────────────────────────────────────
|
|
2196
2240
|
|
|
2241
|
+
// PM-948: каталог для did-you-mean — built-ins прокси + backend-тулы.
|
|
2242
|
+
// Опечатка «create_workspce» должна подсказывать create_workspace, а не пустоту.
|
|
2243
|
+
export function buildSuggestionCatalog(allTools) {
|
|
2244
|
+
return [
|
|
2245
|
+
...[...BUILT_IN_NAMES].map((n) => ({ name: n, group: 'builtin', description: '' })),
|
|
2246
|
+
...(allTools || []).map((t) => ({ name: t.name, group: t.group, description: t.description })),
|
|
2247
|
+
];
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2197
2250
|
/**
|
|
2198
|
-
*
|
|
2199
|
-
*
|
|
2251
|
+
* PM-948: нормированная похожесть Левенштейна, формула difflib
|
|
2252
|
+
* (m + n − dist) / (m + n). На подстановках чуть щедрее difflib
|
|
2253
|
+
* (замена стоит 1, а не 2) — порог 0.6 компенсирует консервативно.
|
|
2254
|
+
*/
|
|
2255
|
+
function editSimilarity(a, b) {
|
|
2256
|
+
const m = a.length;
|
|
2257
|
+
const n = b.length;
|
|
2258
|
+
if (!m || !n) return 0;
|
|
2259
|
+
let prev = Array.from({ length: n + 1 }, (_, j) => j);
|
|
2260
|
+
for (let i = 1; i <= m; i++) {
|
|
2261
|
+
const cur = [i];
|
|
2262
|
+
for (let j = 1; j <= n; j++) {
|
|
2263
|
+
cur[j] = Math.min(prev[j] + 1, cur[j - 1] + 1, prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1));
|
|
2264
|
+
}
|
|
2265
|
+
prev = cur;
|
|
2266
|
+
}
|
|
2267
|
+
return (m + n - prev[n]) / (m + n);
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
const EDIT_SIMILARITY_THRESHOLD = 0.6;
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* Детерминированный поиск похожих имён: общие токены (по '_'), подстрока
|
|
2274
|
+
* или edit-похожесть ≥ 0.6 (PM-948). Сам запрошенный тул не предлагается.
|
|
2275
|
+
* Сортировка: токен-совпадения (score ≥ 100) выше чисто edit-совпадений.
|
|
2200
2276
|
*/
|
|
2201
2277
|
export function findSimilarTools(name, catalog, limit = 3) {
|
|
2202
|
-
const tokens = (n) => n.split('_').filter(Boolean);
|
|
2278
|
+
const tokens = (n) => String(n ?? '').split('_').filter(Boolean);
|
|
2203
2279
|
const nameToks = new Set(tokens(name));
|
|
2204
2280
|
const scored = [];
|
|
2205
2281
|
for (const t of catalog) {
|
|
@@ -2209,8 +2285,10 @@ export function findSimilarTools(name, catalog, limit = 3) {
|
|
|
2209
2285
|
if (nameToks.has(tok)) shared += 1;
|
|
2210
2286
|
else if (t.name.includes(name) || name.includes(t.name)) shared += 1;
|
|
2211
2287
|
}
|
|
2212
|
-
|
|
2213
|
-
|
|
2288
|
+
const edit = editSimilarity(String(name ?? ''), String(t.name ?? ''));
|
|
2289
|
+
if (shared === 0 && edit < EDIT_SIMILARITY_THRESHOLD) continue;
|
|
2290
|
+
const score = shared > 0 ? shared * 100 + Math.round(edit * 10) : Math.round(edit * 10);
|
|
2291
|
+
scored.push({ tool: t, score });
|
|
2214
2292
|
}
|
|
2215
2293
|
scored.sort((a, b) => b.score - a.score || a.tool.name.localeCompare(b.tool.name));
|
|
2216
2294
|
return scored.slice(0, limit).map((s) => s.tool);
|
|
@@ -2223,10 +2301,37 @@ export function findSimilarTools(name, catalog, limit = 3) {
|
|
|
2223
2301
|
export function buildNotActiveText(name, catalog, activeNames) {
|
|
2224
2302
|
// PM-103: имени нет в каталоге — это не «не активен», а «такого тула нет».
|
|
2225
2303
|
// Общий текст «is not active» модель читает как «имя неверное, попробую соседнее».
|
|
2304
|
+
// PM-948: неизвестное имя не отменяет близости — добавляем did-you-mean,
|
|
2305
|
+
// чтобы эмиссия самоисправлялась вместо перебора соседних тулов.
|
|
2226
2306
|
const known = catalog.some((t) => t.name === name);
|
|
2227
2307
|
if (!known) {
|
|
2228
|
-
|
|
2229
|
-
`Do NOT call a different tool instead
|
|
2308
|
+
const base = `Error: Unknown tool "${name}" — no such tool in the integram catalog. ` +
|
|
2309
|
+
`Do NOT call a different tool instead.`;
|
|
2310
|
+
const similar = name ? findSimilarTools(String(name), catalog) : [];
|
|
2311
|
+
if (!similar.length) {
|
|
2312
|
+
return base + ` Check the name, or use search_tools to discover the right one.`;
|
|
2313
|
+
}
|
|
2314
|
+
const label = (t) => (t.group ? `"${t.name}" (group "${t.group}")` : `"${t.name}"`);
|
|
2315
|
+
const activeSet = new Set(activeNames);
|
|
2316
|
+
const lines = [base];
|
|
2317
|
+
const activeHits = similar.filter((t) => activeSet.has(t.name));
|
|
2318
|
+
const inactiveHits = similar.filter((t) => !activeSet.has(t.name));
|
|
2319
|
+
if (activeHits.length) {
|
|
2320
|
+
lines.push(
|
|
2321
|
+
`Did you mean: ${activeHits.map(label).join(', ')}? ` +
|
|
2322
|
+
`It IS ACTIVE — if that is what you meant, call it by its exact name. Do NOT guess other tools.`,
|
|
2323
|
+
);
|
|
2324
|
+
}
|
|
2325
|
+
if (inactiveHits.length) {
|
|
2326
|
+
const groups = [...new Set(inactiveHits.map((t) => t.group).filter(Boolean))];
|
|
2327
|
+
lines.push(
|
|
2328
|
+
`Did you mean: ${inactiveHits.map(label).join(', ')}? ` +
|
|
2329
|
+
`If one of these is what you meant, activate its group first: ` +
|
|
2330
|
+
groups.map((g) => `search_tools("${g}")`).join(' or ') +
|
|
2331
|
+
` — then call the tool by its exact name.`,
|
|
2332
|
+
);
|
|
2333
|
+
}
|
|
2334
|
+
return lines.join('\n');
|
|
2230
2335
|
}
|
|
2231
2336
|
const similar = findSimilarTools(name, catalog);
|
|
2232
2337
|
if (!similar.length) {
|
package/package.json
CHANGED