sychev-lab-mcp-server 1.0.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/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # Sychev Lab MCP Server
2
+
3
+ Servidor MCP (Model Context Protocol) para Sychev Lab - proporciona acceso a productos, artículos, tutoriales y funciones de comercio electrónico.
4
+
5
+ ## Características
6
+
7
+ - **Catálogo de Productos**: Listar, buscar y obtener detalles de productos STL para impresión 3D
8
+ - **Artículos**: Acceso a artículos técnicos y de blog
9
+ - **Tutoriales**: Tutoriales paso a paso con información de dificultad y duración
10
+ - **Categorías**: Navegación por categorías de productos
11
+ - **Usuarios**: Registro de nuevos usuarios
12
+ - **Checkout**: Creación de sesiones de pago con Stripe
13
+
14
+ ## Herramientas Disponibles
15
+
16
+ | Herramienta | Descripción |
17
+ |-------------|-------------|
18
+ | `list_products` | Lista todos los productos disponibles |
19
+ | `get_product_details` | Obtiene información detallada de un producto |
20
+ | `search_products_by_category` | Busca productos por categoría o término |
21
+ | `get_categories` | Obtiene todas las categorías disponibles |
22
+ | `list_articles` | Lista todos los artículos |
23
+ | `get_article` | Obtiene el contenido completo de un artículo |
24
+ | `list_tutorials` | Lista todos los tutoriales |
25
+ | `get_tutorial` | Obtiene el contenido completo de un tutorial |
26
+ | `register_user` | Registra un nuevo usuario |
27
+ | `create_stripe_checkout` | Crea una sesión de checkout de Stripe |
28
+
29
+ ## Instalación
30
+
31
+ ```bash
32
+ npm install
33
+ npm run build
34
+ ```
35
+
36
+ ## Uso
37
+
38
+ ### Modo stdio (para Claude Desktop)
39
+
40
+ ```bash
41
+ npm start
42
+ # o
43
+ node dist/index.js
44
+ ```
45
+
46
+ ### Modo HTTP
47
+
48
+ ```bash
49
+ npm run start:http
50
+ # o
51
+ node dist/index.js --http 3000
52
+ ```
53
+
54
+ ### Variables de Entorno
55
+
56
+ | Variable | Descripción | Default |
57
+ |----------|-------------|---------|
58
+ | `SYCHEV_LAB_URL` | URL base de la API | `https://lab.sychev.xyz` |
59
+ | `MCP_API_KEY` | API key para modo HTTP | `dev-key-change-in-production` |
60
+
61
+ ## Configuración con Claude Desktop
62
+
63
+ Añade a tu configuración de Claude Desktop (`claude_desktop_config.json`):
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "sychev-lab": {
69
+ "command": "node",
70
+ "args": ["/ruta/al/mcp-server/dist/index.js"],
71
+ "env": {
72
+ "SYCHEV_LAB_URL": "https://lab.sychev.xyz"
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ## Endpoints HTTP
80
+
81
+ Cuando se ejecuta en modo HTTP:
82
+
83
+ - `POST /mcp/v1/tools/list` - Lista herramientas disponibles
84
+ - `POST /mcp/v1/tools/call` - Ejecuta una herramienta
85
+
86
+ Headers requeridos:
87
+ ```
88
+ Authorization: Bearer <MCP_API_KEY>
89
+ Content-Type: application/json
90
+ ```
91
+
92
+ ## Scripts
93
+
94
+ | Script | Descripción |
95
+ |--------|-------------|
96
+ | `npm run build` | Compila TypeScript |
97
+ | `npm run dev` | Compila en modo watch |
98
+ | `npm start` | Inicia el servidor (stdio) |
99
+ | `npm run start:http` | Inicia el servidor HTTP |
100
+ | `npm run inspector` | Ejecuta el inspector MCP |
101
+ | `npm run lint` | Ejecuta ESLint |
102
+ | `npm run typecheck` | Verifica tipos sin emitir |
103
+
104
+ ## Estructura del Proyecto
105
+
106
+ ```
107
+ src/
108
+ ├── index.ts # Punto de entrada y servidor MCP
109
+ ├── tools.ts # Definiciones e implementaciones de herramientas
110
+ ├── client.ts # Cliente HTTP para la API de Sychev Lab
111
+ └── config.ts # Configuración del servidor
112
+ ```
113
+
114
+ ## Licencia
115
+
116
+ MIT
@@ -0,0 +1,111 @@
1
+ /**
2
+ * HTTP Client for Sychev Lab API
3
+ */
4
+ export interface Product {
5
+ id: string;
6
+ name: string;
7
+ description: string;
8
+ price: number;
9
+ currency: string;
10
+ images: string[];
11
+ category: string;
12
+ tags: string[];
13
+ slug?: string;
14
+ thumbnail?: string;
15
+ type?: string;
16
+ featured?: boolean;
17
+ }
18
+ export interface Article {
19
+ id: string;
20
+ title: string;
21
+ content: string;
22
+ author: string;
23
+ published_at: string;
24
+ tags: string[];
25
+ slug?: string;
26
+ description?: string;
27
+ thumbnail?: string;
28
+ type?: string;
29
+ featured?: boolean;
30
+ path?: string;
31
+ }
32
+ export interface Tutorial {
33
+ id: string;
34
+ title: string;
35
+ content: string;
36
+ author: string;
37
+ published_at: string;
38
+ tags: string[];
39
+ difficulty: string;
40
+ duration: string;
41
+ slug?: string;
42
+ description?: string;
43
+ thumbnail?: string;
44
+ type?: string;
45
+ featured?: boolean;
46
+ path?: string;
47
+ }
48
+ export interface Category {
49
+ id: string;
50
+ name: string;
51
+ slug: string;
52
+ description?: string;
53
+ parent?: string;
54
+ children?: Category[];
55
+ }
56
+ export interface CheckoutSession {
57
+ sessionId: string;
58
+ url: string;
59
+ }
60
+ export interface CheckoutItem {
61
+ id: string;
62
+ title: string;
63
+ price: number;
64
+ quantity?: number;
65
+ }
66
+ declare class ApiClient {
67
+ private baseUrl;
68
+ constructor(baseUrl: string);
69
+ private fetch;
70
+ private post;
71
+ getProducts(): Promise<Product[]>;
72
+ getProduct(id: string, lang?: string): Promise<Product>;
73
+ getArticles(): Promise<Article[]>;
74
+ getArticle(id: string, lang: string): Promise<Article>;
75
+ getTutorials(): Promise<Tutorial[]>;
76
+ getTutorial(id: string, lang: string): Promise<Tutorial>;
77
+ getCategories(): Promise<{
78
+ data: {
79
+ categories: Category[];
80
+ };
81
+ }>;
82
+ searchProductsByCategory(searchTerm: string, limit?: number): Promise<Product[]>;
83
+ createCheckout(items: CheckoutItem[], options?: {
84
+ guestEmail?: string;
85
+ locale?: string;
86
+ }): Promise<CheckoutSession>;
87
+ createCheckoutSecure(productId: string, quantity?: number, options?: {
88
+ guestEmail?: string;
89
+ guestName?: string;
90
+ locale?: string;
91
+ }): Promise<CheckoutSession & {
92
+ product: {
93
+ id: string;
94
+ name: string;
95
+ price: number;
96
+ currency: string;
97
+ type: string;
98
+ };
99
+ }>;
100
+ registerUser(email: string, password: string, displayName?: string): Promise<{
101
+ message: string;
102
+ user: {
103
+ uid: string;
104
+ email: string;
105
+ displayName?: string;
106
+ };
107
+ }>;
108
+ }
109
+ export declare const apiClient: ApiClient;
110
+ export {};
111
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACrB,EA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EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;CAO9F;AAED,eAAO,MAAM,SAAS,WAAgC,CAAC"}
package/dist/client.js ADDED
@@ -0,0 +1,143 @@
1
+ /**
2
+ * HTTP Client for Sychev Lab API
3
+ */
4
+ import { config } from './config.js';
5
+ class ApiClient {
6
+ baseUrl;
7
+ constructor(baseUrl) {
8
+ this.baseUrl = baseUrl.replace(/\/$/, '');
9
+ }
10
+ async fetch(endpoint) {
11
+ const url = `${this.baseUrl}${endpoint}`;
12
+ const response = await fetch(url);
13
+ if (!response.ok) {
14
+ throw new Error(`API error: ${response.status} ${response.statusText}`);
15
+ }
16
+ return response.json();
17
+ }
18
+ async post(endpoint, body) {
19
+ const url = `${this.baseUrl}${endpoint}`;
20
+ const response = await fetch(url, {
21
+ method: 'POST',
22
+ headers: {
23
+ 'Content-Type': 'application/json',
24
+ },
25
+ body: JSON.stringify(body),
26
+ });
27
+ if (!response.ok) {
28
+ const error = await response.json().catch(() => ({ message: 'Unknown error' }));
29
+ throw new Error(error.message || `API error: ${response.status}`);
30
+ }
31
+ return response.json();
32
+ }
33
+ // Products
34
+ async getProducts() {
35
+ return this.fetch('/api/lab/products/index.json');
36
+ }
37
+ async getProduct(id, lang = 'es') {
38
+ return this.fetch(`/api/lab/products/${id}.${lang}.json`);
39
+ }
40
+ // Articles
41
+ async getArticles() {
42
+ return this.fetch('/api/lab/index.articles.json');
43
+ }
44
+ async getArticle(id, lang) {
45
+ return this.fetch(`/api/lab/articles/${id}.${lang}.json`);
46
+ }
47
+ // Tutorials
48
+ async getTutorials() {
49
+ return this.fetch('/api/lab/index.tutorials.json');
50
+ }
51
+ async getTutorial(id, lang) {
52
+ return this.fetch(`/api/lab/tutorials/${id}.${lang}.json`);
53
+ }
54
+ // Categories
55
+ async getCategories() {
56
+ return this.fetch('/api/lab/categories.json');
57
+ }
58
+ // Search products by category (fuzzy search)
59
+ async searchProductsByCategory(searchTerm, limit = 20) {
60
+ const response = await this.getProducts();
61
+ // Handle case where API returns an object with products or data property
62
+ const products = Array.isArray(response) ? response :
63
+ (response && typeof response === 'object' && 'products' in response) ?
64
+ response.products :
65
+ (response && typeof response === 'object' && 'data' in response) ?
66
+ response.data : [];
67
+ const searchLower = searchTerm.toLowerCase();
68
+ const filtered = products.filter((p) => {
69
+ // Search in multiple fields (API uses 'title' instead of 'name')
70
+ const nameMatch = p.name?.toLowerCase().includes(searchLower) ||
71
+ p.title?.toLowerCase().includes(searchLower);
72
+ const descriptionMatch = p.description?.toLowerCase().includes(searchLower);
73
+ // category puede ser string, objeto o array - manejar todos los casos
74
+ let categoryValue = '';
75
+ if (typeof p.category === 'string') {
76
+ categoryValue = p.category;
77
+ }
78
+ else if (p.category && typeof p.category === 'object') {
79
+ // Es un objeto con propiedad name
80
+ categoryValue = p.category.name || '';
81
+ }
82
+ else if (Array.isArray(p.category)) {
83
+ categoryValue = p.category.join(' ');
84
+ }
85
+ const categoryMatch = categoryValue.toLowerCase().includes(searchLower);
86
+ const tagsMatch = p.tags?.some((tag) => tag.toLowerCase().includes(searchLower));
87
+ const slugMatch = p.slug?.toLowerCase().includes(searchLower);
88
+ return nameMatch || descriptionMatch || categoryMatch || tagsMatch || slugMatch;
89
+ });
90
+ // Sort by relevance (exact matches first, then partial matches)
91
+ const sorted = filtered.sort((a, b) => {
92
+ const aName = (a.name || a.title || '').toLowerCase();
93
+ const bName = (b.name || b.title || '').toLowerCase();
94
+ const aExact = aName === searchLower;
95
+ const bExact = bName === searchLower;
96
+ if (aExact && !bExact)
97
+ return -1;
98
+ if (!aExact && bExact)
99
+ return 1;
100
+ // Then prioritize name starts with search term
101
+ const aStarts = aName.startsWith(searchLower);
102
+ const bStarts = bName.startsWith(searchLower);
103
+ if (aStarts && !bStarts)
104
+ return -1;
105
+ if (!aStarts && bStarts)
106
+ return 1;
107
+ return 0;
108
+ });
109
+ return sorted.slice(0, limit);
110
+ }
111
+ // Checkout (legacy - mantenido para compatibilidad)
112
+ async createCheckout(items, options) {
113
+ return this.post('/api/stripe/checkout', {
114
+ items,
115
+ guestEmail: options?.guestEmail,
116
+ locale: options?.locale || 'es',
117
+ successUrl: `${this.baseUrl}/checkout/success`,
118
+ cancelUrl: `${this.baseUrl}/checkout/cancel`,
119
+ });
120
+ }
121
+ // Checkout seguro - solo recibe productId, obtiene datos desde Firestore
122
+ async createCheckoutSecure(productId, quantity = 1, options) {
123
+ return this.post('/api/stripe/checkout-secure', {
124
+ productId,
125
+ quantity,
126
+ guestEmail: options?.guestEmail,
127
+ guestName: options?.guestName,
128
+ locale: options?.locale || 'es',
129
+ successUrl: `${this.baseUrl}/checkout/success`,
130
+ cancelUrl: `${this.baseUrl}/checkout/cancel`,
131
+ });
132
+ }
133
+ // User Registration
134
+ async registerUser(email, password, displayName) {
135
+ return this.post('/api/register', {
136
+ email,
137
+ password,
138
+ displayName,
139
+ });
140
+ }
141
+ }
142
+ export const apiClient = new ApiClient(config.baseUrl);
143
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAsErC,MAAM,SAAS;IACH,OAAO,CAAS;IAExB,YAAY,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,KAAK,CAAI,QAAgB;QACnC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,cAAc,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAA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AAI,CAAC,IAAI,CAA6G,6BAA6B,EAAE;YACxJ,SAAS;YACT,QAAQ;YACR,UAAU,EAAE,OAAO,EAAE,UAAU;YAC/B,SAAS,EAAE,OAAO,EAAE,SAAS;YAC7B,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;YAC/B,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,mBAAmB;YAC9C,SAAS,EAAE,GAAG,IAAI,CAAC,OAAO,kBAAkB;SAC/C,CAAC,CAAC;IACP,CAAC;IAED,oBAAoB;IACpB,KAAK,CAAC,YAAY,CACd,KAAa,EACb,QAAgB,EAChB,WAAoB;QAEpB,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YAC9B,KAAK;YACL,QAAQ;YACR,WAAW;SACd,CAAC,CAAC;IACP,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Configuration for Sychev Lab MCP Server
3
+ */
4
+ export interface ServerConfig {
5
+ baseUrl: string;
6
+ name: string;
7
+ version: string;
8
+ }
9
+ export declare const config: ServerConfig;
10
+ export declare function validateConfig(): void;
11
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAGD,eAAO,MAAM,MAAM,EAAE,YAIpB,CAAC;AAGF,wBAAgB,cAAc,IAAI,IAAI,CAUrC"}
package/dist/config.js ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Configuration for Sychev Lab MCP Server
3
+ */
4
+ // Load from environment or use defaults
5
+ export const config = {
6
+ baseUrl: process.env.SYCHEV_LAB_URL || 'https://lab.sychev.xyz',
7
+ name: 'sychev-lab-mcp',
8
+ version: '1.0.0',
9
+ };
10
+ // Validate configuration
11
+ export function validateConfig() {
12
+ if (!config.baseUrl) {
13
+ throw new Error('SYCHEV_LAB_URL environment variable is required');
14
+ }
15
+ try {
16
+ new URL(config.baseUrl);
17
+ }
18
+ catch {
19
+ throw new Error(`Invalid base URL: ${config.baseUrl}`);
20
+ }
21
+ }
22
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,wCAAwC;AACxC,MAAM,CAAC,MAAM,MAAM,GAAiB;IAChC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,wBAAwB;IAC/D,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,OAAO;CACnB,CAAC;AAEF,yBAAyB;AACzB,MAAM,UAAU,cAAc;IAC1B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,IAAI,KAAK,CAAC,qBAAqB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC"}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Sychev Lab MCP Server
4
+ *
5
+ * Supports both stdio (for Claude Desktop) and HTTP (for remote clients) transports
6
+ *
7
+ * Usage:
8
+ * node dist/index.js # Run with stdio transport (default)
9
+ * node dist/index.js --http # Run with HTTP transport
10
+ * node dist/index.js --http 3000 # Run HTTP on port 3000
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG"}