@vargov/mcp 0.0.0-stage → 0.2.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.
- package/DATA-LICENSE.md +30 -0
- package/LICENSE +24 -0
- package/README.md +132 -2
- package/data/brand-facts.json +204 -0
- package/data/llms-configurator.txt +26 -0
- package/data/llms-en.txt +94 -0
- package/data/llms-ru.txt +95 -0
- package/data/manifest.json +61 -0
- package/data/open-skus.json +1 -0
- package/data/organization.jsonld +265 -0
- package/data/products.json +68278 -0
- package/data/sketchfab-models.json +1843 -0
- package/dist/bim.js +166 -0
- package/dist/brand.js +137 -0
- package/dist/catalog.js +331 -0
- package/dist/data.js +148 -0
- package/dist/dealers.js +171 -0
- package/dist/index.js +16 -0
- package/dist/server.js +113 -0
- package/package.json +54 -6
package/dist/server.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// Registers the tools and resources on an McpServer. Transport is chosen by index.ts.
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { bimGuide } from './bim.js';
|
|
5
|
+
import { brandFacts } from './brand.js';
|
|
6
|
+
import { dealerForCountry } from './dealers.js';
|
|
7
|
+
import { SEARCH_LIMIT_DEFAULT, SEARCH_LIMIT_MAX, buildConfiguratorLink, compositionCard, isLinkError, searchCompositions } from './catalog.js';
|
|
8
|
+
import { FAMILIES, LANGS, getData } from './data.js';
|
|
9
|
+
export const SERVER_NAME = 'vargov-design';
|
|
10
|
+
export const SERVER_VERSION = '0.2.0';
|
|
11
|
+
const LangSchema = z.enum(LANGS);
|
|
12
|
+
function textResult(payload, isError = false) {
|
|
13
|
+
const text = typeof payload === 'string' ? payload : JSON.stringify(payload, null, 1);
|
|
14
|
+
return { content: [{ type: 'text', text }], ...(isError ? { isError: true } : {}) };
|
|
15
|
+
}
|
|
16
|
+
export function createServer() {
|
|
17
|
+
const server = new McpServer({ name: SERVER_NAME, version: SERVER_VERSION }, {
|
|
18
|
+
instructions: 'Vargov®Design: 605 made-to-order light and decorative compositions (codes LC0001…LC0602). ' +
|
|
19
|
+
'Use search_compositions to find candidates for a room, get_composition for the card, build_configurator_link to open the 3D configurator with the plan dimensions and ceiling height, how_to_get_bim for the IFC4/FBX steps, brand_facts for the brand card, dealer_for_country for who supplies and installs in a given country. ' +
|
|
20
|
+
'The brand publishes no prices, no materials and no composition dimensions: every composition is scaled to the room; quotes come per request. All data is bundled; the server makes no network calls.',
|
|
21
|
+
});
|
|
22
|
+
server.registerTool('search_compositions', {
|
|
23
|
+
title: 'Search Vargov®Design compositions',
|
|
24
|
+
description: 'Search the Vargov®Design catalogue: 605 made-to-order light and decorative compositions, codes LC0001…LC0602. ' +
|
|
25
|
+
'Full-text over codes, type labels and the brand\'s own texts (description, where it works, style) in Russian and English; other site languages are matched too. ' +
|
|
26
|
+
'Filters: family (lighting | decorative | sculptural-decor | floor-table-lamps); lit (true = the lighting family or a type label mentioning light/lamp/backlit — a hint derived from labels, not a measured property); ' +
|
|
27
|
+
'awarded (has a listed award); configurable (opens in the 3D configurator with a full calculation: IFC4, FBX, PDF specification, tender sheet — 360 of 605). ' +
|
|
28
|
+
'Returns compact rows: code, names RU/EN, family, type, flags, site pages, cover image, English snippet. ' +
|
|
29
|
+
'Then use get_composition for details and build_configurator_link to open the configurator with the room plan. No prices, materials or composition dimensions are published.',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
query: z.string().max(300).optional().describe('Words or a code, e.g. "hotel lobby", "birds", "гостиная", "LC0564"'),
|
|
32
|
+
family: z.enum(FAMILIES).optional(),
|
|
33
|
+
lit: z.boolean().optional().describe('true: light-emitting (hint from labels); false: decorative/unlit'),
|
|
34
|
+
awarded: z.boolean().optional(),
|
|
35
|
+
configurable: z.boolean().optional().describe('true: opens in the configurator with a full calculation (IFC4/FBX/PDF/tender sheet)'),
|
|
36
|
+
limit: z.number().int().min(1).max(SEARCH_LIMIT_MAX).optional().describe(`default ${SEARCH_LIMIT_DEFAULT}, max ${SEARCH_LIMIT_MAX}`),
|
|
37
|
+
},
|
|
38
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
39
|
+
}, async (args) => textResult(searchCompositions(args)));
|
|
40
|
+
server.registerTool('get_composition', {
|
|
41
|
+
title: 'Composition card',
|
|
42
|
+
description: 'Everything the public dataset knows about one composition by its code (LC0564, lc0564, "564" are all accepted): names RU/EN, family and type, the brand\'s texts in the requested language (default en; ru de it fr es vi ar available), ' +
|
|
43
|
+
'site pages in 8 languages, cover image, 3D models (3ddd/3dsky, Sketchfab), awards, whether it is certified (fact only), ' +
|
|
44
|
+
'and the configurator status: opens with a full calculation or is calculated individually; kind (cloud of elements / ribbon / chain / on a frame / ready scene); IFC4, FBX, PDF and tender-sheet exports; whether the 1:1 ceiling drawing exists; ready links. ' +
|
|
45
|
+
'No price, no materials, no composition dimensions — they are not published.',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
code: z.string().min(1).max(20).describe('Catalogue code, e.g. LC0564 or LC0406-1'),
|
|
48
|
+
lang: LangSchema.optional().describe('Language of the texts, default en'),
|
|
49
|
+
},
|
|
50
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
51
|
+
}, async ({ code, lang }) => {
|
|
52
|
+
const card = compositionCard(code, lang ?? 'en');
|
|
53
|
+
if (!card)
|
|
54
|
+
return textResult({ error: `Code "${code}" is not in the catalogue (LC0001…LC0602, some with a -1/-2 suffix). Use search_compositions.` }, true);
|
|
55
|
+
return textResult(card);
|
|
56
|
+
});
|
|
57
|
+
server.registerTool('build_configurator_link', {
|
|
58
|
+
title: 'Configurator link with room dimensions',
|
|
59
|
+
description: 'Builds a link that opens the Vargov®Design 3D configurator on a composition with the plan dimensions and the room ceiling height already filled in. ' +
|
|
60
|
+
'Only codes that open with a full calculation are accepted (360 of 605; others return an error with the product page). ' +
|
|
61
|
+
'lengthMm → the "Length" field of the plan, widthMm → the "Width" field, both integer millimetres, at least 300 (the plan is the zone the composition is laid out in, not a product size); ' +
|
|
62
|
+
'heightMm → height of the cloud of elements (optional); ceilingMm → room ceiling height (optional, default 2700 in the configurator; it goes into the IFC4 file and AR); ' +
|
|
63
|
+
'lang → interface language (ru opens configurator.vargov.ru, other languages vargov.design); openOnFormStep → open scrolled to the "Composition form" step. ' +
|
|
64
|
+
'The visitor then picks element sizes, colours and the form; the configurator\'s "Share" button returns a link that reopens that exact calculation.',
|
|
65
|
+
inputSchema: {
|
|
66
|
+
code: z.string().min(1).max(20),
|
|
67
|
+
lengthMm: z.number().optional().describe('Plan length, integer mm, ≥ 300'),
|
|
68
|
+
widthMm: z.number().optional().describe('Plan width, integer mm, ≥ 300'),
|
|
69
|
+
heightMm: z.number().optional().describe('Height of the cloud of elements, integer mm (optional)'),
|
|
70
|
+
ceilingMm: z.number().optional().describe('Room ceiling height, integer mm (optional; configurator default 2700)'),
|
|
71
|
+
lang: LangSchema.optional().describe('ru en de it fr es vi ar; default en'),
|
|
72
|
+
openOnFormStep: z.boolean().optional().describe('true: add step=form to open scrolled to the form step'),
|
|
73
|
+
},
|
|
74
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
75
|
+
}, async (args) => {
|
|
76
|
+
const r = buildConfiguratorLink(args);
|
|
77
|
+
return isLinkError(r) ? textResult(r, true) : textResult(r);
|
|
78
|
+
});
|
|
79
|
+
server.registerTool('how_to_get_bim', {
|
|
80
|
+
title: 'How to get IFC4 (BIM) and FBX',
|
|
81
|
+
description: 'Step-by-step: where the "Download IFC (BIM)" and "Download FBX (3ds Max)" buttons are (step "3D composition scheme" → "Documents" drawer), what the IFC4 and FBX files contain and what they do not (no textures/UV, BIM properties only in IFC4, ceiling fixing points as IfcDiscreteAccessory objects), ' +
|
|
82
|
+
'and when the 1:1 ceiling drawing opens (only after the production brief is started in production). With a code, the answer starts with the status of that composition (full calculation / calculated individually; ribbon, chain, frame, ready scene). Text in English or Russian.',
|
|
83
|
+
inputSchema: {
|
|
84
|
+
code: z.string().max(20).optional().describe('Optional catalogue code to prefix the guide with that composition\'s status'),
|
|
85
|
+
lang: z.enum(['en', 'ru']).optional().describe('en (default) or ru'),
|
|
86
|
+
},
|
|
87
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
88
|
+
}, async ({ code, lang }) => textResult(bimGuide(code, lang ?? 'en')));
|
|
89
|
+
server.registerTool('brand_facts', {
|
|
90
|
+
title: 'Brand card',
|
|
91
|
+
description: 'Compact card of Vargov®Design: founder and founding year, catalogue size and families, configurator scope (full calculation, 1:1 drawing), the awards count and list, certification, trademarks, showroom, contacts, dealers page, site languages, links to llms.txt of the site, the knowledge base and the configurator, the open dataset on Hugging Face. Numbers are computed from the bundled data.',
|
|
92
|
+
inputSchema: { lang: z.enum(['en', 'ru']).optional().describe('en (default) or ru for the wording fields') },
|
|
93
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
94
|
+
}, async ({ lang }) => textResult(brandFacts(lang ?? 'en')));
|
|
95
|
+
server.registerTool('dealer_for_country', {
|
|
96
|
+
title: 'Official dealer for a country',
|
|
97
|
+
description: 'Who supplies, installs and services Vargov®Design compositions in a given country: the official dealer of that region (Moscow — Russia and the CIS; Hanoi — Vietnam, Laos, Cambodia, Thailand, Malaysia, Singapore; Dubai — the Persian Gulf, Middle East, Americas, Europe, Asia, Africa and every other country), ' +
|
|
98
|
+
'the page with the dealer contacts, the brand\'s direct contacts, and the installation terms as published (a separate service priced individually; supervised installation available). ' +
|
|
99
|
+
'country: a country name in English or Russian, an ISO 3166 alpha-2 code, or a major city (Dubai, Moscow, Hanoi…). Without country, returns all three regions.',
|
|
100
|
+
inputSchema: {
|
|
101
|
+
country: z.string().max(80).optional().describe('e.g. "United Arab Emirates", "UAE", "AE", "ОАЭ", "Dubai", "Казахстан"'),
|
|
102
|
+
lang: z.enum(['en', 'ru']).optional().describe('en (default) or ru'),
|
|
103
|
+
},
|
|
104
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
105
|
+
}, async ({ country, lang }) => textResult(dealerForCountry(country, lang ?? 'en')));
|
|
106
|
+
const d = getData();
|
|
107
|
+
server.registerResource('llms-vargov-en', 'llms://vargov', { title: 'Vargov®Design llms.txt (English)', description: 'en/llms.txt of the public knowledge base vargov3-spec/vargov-ai-kb: brand facts, catalogue, configurator, awards, contacts.', mimeType: 'text/plain' }, async (uri) => ({ contents: [{ uri: uri.href, mimeType: 'text/plain', text: d.llmsEn }] }));
|
|
108
|
+
server.registerResource('llms-vargov-ru', 'llms://vargov/ru', { title: 'Vargov®Design llms.txt (Russian)', description: 'llms.txt of the public knowledge base, Russian.', mimeType: 'text/plain' }, async (uri) => ({ contents: [{ uri: uri.href, mimeType: 'text/plain', text: d.llmsRu }] }));
|
|
109
|
+
if (d.llmsConfigurator) {
|
|
110
|
+
server.registerResource('llms-vargov-configurator', 'llms://vargov/configurator', { title: 'Vargov®Design configurator llms.txt', description: 'llms.txt of the 3D configurator (vargov.design): what it is, what it exports, which pages are open.', mimeType: 'text/plain' }, async (uri) => ({ contents: [{ uri: uri.href, mimeType: 'text/plain', text: d.llmsConfigurator ?? '' }] }));
|
|
111
|
+
}
|
|
112
|
+
return server;
|
|
113
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vargov/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@vargov/mcp",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"mcpName": "io.github.vargov3-spec/vargov-mcp",
|
|
5
|
+
"description": "MCP server for AI assistants: the Vargov®Design catalogue (605 made-to-order light and decorative compositions), configurator links with room dimensions, how to get IFC4 (BIM) and FBX files, brand facts. Offline: all data is bundled.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "Vargov®Design (https://vargov.ru)",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"bin": {
|
|
11
|
+
"vargov-mcp": "dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"data",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"DATA-LICENSE.md"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc -p tsconfig.json",
|
|
25
|
+
"start": "node dist/index.js",
|
|
26
|
+
"test": "node test/smoke.mjs",
|
|
27
|
+
"update-data": "node scripts/update-data.mjs",
|
|
28
|
+
"prepack": "npm run build"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"mcp",
|
|
32
|
+
"model-context-protocol",
|
|
33
|
+
"lighting-design",
|
|
34
|
+
"interior-design",
|
|
35
|
+
"bim",
|
|
36
|
+
"ifc4",
|
|
37
|
+
"vargov",
|
|
38
|
+
"lighting",
|
|
39
|
+
"architecture",
|
|
40
|
+
"3d-configurator"
|
|
41
|
+
],
|
|
42
|
+
"homepage": "https://vargov.ru/en",
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
48
|
+
"zod": "^4.6.7"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^24.0.0",
|
|
52
|
+
"typescript": "^5.0.0"
|
|
53
|
+
}
|
|
54
|
+
}
|