@revealui/mcp 0.0.1-pre.0 → 0.1.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.
Files changed (40) hide show
  1. package/LICENSE +22 -202
  2. package/LICENSE.commercial +112 -0
  3. package/README.md +263 -0
  4. package/dist/adapters/db.d.ts +46 -0
  5. package/dist/adapters/db.d.ts.map +1 -0
  6. package/dist/adapters/db.js +127 -0
  7. package/dist/adapters/db.js.map +1 -0
  8. package/dist/config/index.d.ts +11 -0
  9. package/dist/config/index.d.ts.map +1 -0
  10. package/dist/config/index.js +18 -0
  11. package/dist/config/index.js.map +1 -0
  12. package/dist/contracts.d.ts +131 -0
  13. package/dist/contracts.d.ts.map +1 -0
  14. package/dist/contracts.js +153 -0
  15. package/dist/contracts.js.map +1 -0
  16. package/dist/hypervisor.d.ts +132 -0
  17. package/dist/hypervisor.d.ts.map +1 -0
  18. package/dist/hypervisor.js +359 -0
  19. package/dist/hypervisor.js.map +1 -0
  20. package/dist/index.d.ts +25 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/index.js +36 -10985
  23. package/dist/index.js.map +1 -1
  24. package/dist/servers/adapter.d.ts +209 -0
  25. package/dist/servers/adapter.d.ts.map +1 -0
  26. package/dist/servers/adapter.js +503 -0
  27. package/dist/servers/adapter.js.map +1 -0
  28. package/dist/servers/revealui-content.d.ts +21 -0
  29. package/dist/servers/revealui-content.d.ts.map +1 -0
  30. package/dist/servers/revealui-content.js +199 -0
  31. package/dist/servers/revealui-content.js.map +1 -0
  32. package/dist/servers/revealui-email.d.ts +18 -0
  33. package/dist/servers/revealui-email.d.ts.map +1 -0
  34. package/dist/servers/revealui-email.js +185 -0
  35. package/dist/servers/revealui-email.js.map +1 -0
  36. package/dist/servers/revealui-stripe.d.ts +19 -0
  37. package/dist/servers/revealui-stripe.d.ts.map +1 -0
  38. package/dist/servers/revealui-stripe.js +211 -0
  39. package/dist/servers/revealui-stripe.js.map +1 -0
  40. package/package.json +43 -68
@@ -0,0 +1,503 @@
1
+ #!/usr/bin/env tsx
2
+ /**
3
+ * MCP Adapter - Generic Model Context Protocol Integration
4
+ *
5
+ * Provides a unified interface for all MCP server integrations,
6
+ * eliminating code duplication across different service adapters.
7
+ *
8
+ * Usage:
9
+ * const adapter = new MCPAdapter('vercel', config)
10
+ * await adapter.execute(request)
11
+ */
12
+ import { randomBytes } from 'node:crypto';
13
+ import { registerCleanupHandler } from '@revealui/core/monitoring';
14
+ import { logger as coreLogger } from '@revealui/core/observability/logger';
15
+ export var McpErrorCode;
16
+ (function (McpErrorCode) {
17
+ McpErrorCode["VALIDATION_ERROR"] = "VALIDATION_ERROR";
18
+ McpErrorCode["NETWORK_ERROR"] = "NETWORK_ERROR";
19
+ McpErrorCode["TIMEOUT_ERROR"] = "TIMEOUT_ERROR";
20
+ McpErrorCode["CONFIG_ERROR"] = "CONFIG_ERROR";
21
+ })(McpErrorCode || (McpErrorCode = {}));
22
+ export class McpError extends Error {
23
+ code;
24
+ constructor(message, code) {
25
+ super(message);
26
+ this.name = 'McpError';
27
+ this.code = code;
28
+ }
29
+ }
30
+ // Alias for backwards compatibility within this file
31
+ const ErrorCode = McpErrorCode;
32
+ const ScriptError = McpError;
33
+ // =============================================================================
34
+ // Global Adapter Registry
35
+ // =============================================================================
36
+ /**
37
+ * Track all active MCP adapters for cleanup
38
+ */
39
+ const activeAdapters = new Set();
40
+ /**
41
+ * Dispose all active MCP adapters (cleanup on shutdown)
42
+ */
43
+ export function disposeAllAdapters() {
44
+ for (const adapter of activeAdapters) {
45
+ try {
46
+ adapter.dispose();
47
+ }
48
+ catch (error) {
49
+ coreLogger.error('Failed to dispose adapter', error instanceof Error ? error : new Error(String(error)));
50
+ }
51
+ }
52
+ activeAdapters.clear();
53
+ }
54
+ // Register cleanup handler
55
+ let cleanupHandlerRegistered = false;
56
+ function registerAdapterCleanup() {
57
+ if (cleanupHandlerRegistered)
58
+ return;
59
+ registerCleanupHandler('mcp-adapters', () => {
60
+ disposeAllAdapters();
61
+ }, 'Dispose all MCP adapters', 90);
62
+ cleanupHandlerRegistered = true;
63
+ }
64
+ /**
65
+ * In-memory idempotency cache for preventing duplicate operations.
66
+ * Each adapter instance has its own cache.
67
+ */
68
+ class IdempotencyCache {
69
+ cache = new Map();
70
+ cleanupInterval = null;
71
+ // biome-ignore lint/style/useNamingConvention: Constant should be uppercase
72
+ DEFAULT_TTL = 5 * 60 * 1000; // 5 minutes
73
+ constructor() {
74
+ // Cleanup expired entries every minute
75
+ this.cleanupInterval = setInterval(() => this.cleanup(), 60 * 1000);
76
+ }
77
+ /**
78
+ * Get a cached response by idempotency key
79
+ */
80
+ get(key) {
81
+ const cached = this.cache.get(key);
82
+ if (!cached)
83
+ return null;
84
+ if (Date.now() > cached.expiresAt) {
85
+ this.cache.delete(key);
86
+ return null;
87
+ }
88
+ return {
89
+ ...cached.response,
90
+ metadata: {
91
+ ...cached.response.metadata,
92
+ cached: true,
93
+ idempotencyKey: key,
94
+ },
95
+ };
96
+ }
97
+ /**
98
+ * Store a response with idempotency key
99
+ */
100
+ set(key, response, ttl) {
101
+ const expiresAt = Date.now() + (ttl || this.DEFAULT_TTL);
102
+ this.cache.set(key, { response, expiresAt });
103
+ }
104
+ /**
105
+ * Check if a key exists in the cache
106
+ */
107
+ has(key) {
108
+ const cached = this.cache.get(key);
109
+ if (!cached)
110
+ return false;
111
+ if (Date.now() > cached.expiresAt) {
112
+ this.cache.delete(key);
113
+ return false;
114
+ }
115
+ return true;
116
+ }
117
+ /**
118
+ * Remove expired entries
119
+ */
120
+ cleanup() {
121
+ const now = Date.now();
122
+ for (const [key, value] of this.cache.entries()) {
123
+ if (now > value.expiresAt) {
124
+ this.cache.delete(key);
125
+ }
126
+ }
127
+ }
128
+ /**
129
+ * Clear all cached entries
130
+ */
131
+ clear() {
132
+ this.cache.clear();
133
+ }
134
+ /**
135
+ * Stop the cleanup interval
136
+ */
137
+ dispose() {
138
+ if (this.cleanupInterval) {
139
+ clearInterval(this.cleanupInterval);
140
+ this.cleanupInterval = null;
141
+ }
142
+ }
143
+ /**
144
+ * Get cache statistics
145
+ */
146
+ stats() {
147
+ return {
148
+ size: this.cache.size,
149
+ keys: Array.from(this.cache.keys()),
150
+ };
151
+ }
152
+ }
153
+ export class MCPAdapter {
154
+ serviceName;
155
+ config;
156
+ logger = coreLogger;
157
+ idempotencyCache = new IdempotencyCache();
158
+ constructor(serviceName, config) {
159
+ this.serviceName = serviceName;
160
+ this.config = {
161
+ timeout: 30000,
162
+ retries: 3,
163
+ environment: 'development',
164
+ ...config,
165
+ };
166
+ // Register adapter for cleanup
167
+ activeAdapters.add(this);
168
+ registerAdapterCleanup();
169
+ }
170
+ /**
171
+ * Dispose of adapter resources (cleanup idempotency cache)
172
+ */
173
+ dispose() {
174
+ this.idempotencyCache.dispose();
175
+ activeAdapters.delete(this);
176
+ }
177
+ /**
178
+ * Get idempotency cache statistics
179
+ */
180
+ getCacheStats() {
181
+ return this.idempotencyCache.stats();
182
+ }
183
+ /**
184
+ * Clear the idempotency cache
185
+ */
186
+ clearCache() {
187
+ this.idempotencyCache.clear();
188
+ }
189
+ /**
190
+ * Execute an MCP request
191
+ *
192
+ * If an idempotencyKey is provided in options, the request will be checked
193
+ * against the cache. If a cached response exists, it will be returned
194
+ * immediately. Otherwise, the request will be executed and the response
195
+ * will be cached for future duplicate requests.
196
+ */
197
+ async execute(request) {
198
+ const startTime = Date.now();
199
+ let attempts = 0;
200
+ const idempotencyKey = request.options?.idempotencyKey;
201
+ try {
202
+ this.validateRequest(request);
203
+ // Check idempotency cache first
204
+ if (idempotencyKey) {
205
+ const cached = this.idempotencyCache.get(idempotencyKey);
206
+ if (cached) {
207
+ this.logger.info(`[${this.serviceName}] Returning cached response for idempotency key: ${idempotencyKey}`);
208
+ return cached;
209
+ }
210
+ }
211
+ if (request.options?.dryRun) {
212
+ return this.createDryRunResponse(request);
213
+ }
214
+ while (attempts < (request.options?.retries || this.config.retries || 3)) {
215
+ attempts++;
216
+ try {
217
+ this.logger.info(`[${this.serviceName}] Executing ${request.action} (attempt ${attempts})`);
218
+ const result = await this.executeRequest(request);
219
+ const duration = Date.now() - startTime;
220
+ const response = {
221
+ success: true,
222
+ data: result,
223
+ metadata: {
224
+ duration,
225
+ retries: attempts - 1,
226
+ service: this.serviceName,
227
+ ...(idempotencyKey && { idempotencyKey }),
228
+ },
229
+ };
230
+ // Cache successful response if idempotency key provided
231
+ if (idempotencyKey) {
232
+ this.idempotencyCache.set(idempotencyKey, response, request.options?.idempotencyTTL);
233
+ }
234
+ return response;
235
+ }
236
+ catch (error) {
237
+ this.logger.warn(`[${this.serviceName}] Attempt ${attempts} failed: ${error}`);
238
+ if (attempts >= (request.options?.retries || this.config.retries || 3)) {
239
+ throw error;
240
+ }
241
+ // Wait before retry (exponential backoff)
242
+ const delay = Math.min(1000 * 2 ** (attempts - 1), 10000);
243
+ await new Promise((resolve) => setTimeout(resolve, delay));
244
+ }
245
+ }
246
+ throw new ScriptError('All retry attempts exhausted', ErrorCode.TIMEOUT_ERROR);
247
+ }
248
+ catch (error) {
249
+ const duration = Date.now() - startTime;
250
+ const response = {
251
+ success: false,
252
+ error: error instanceof Error ? error.message : String(error),
253
+ metadata: {
254
+ duration,
255
+ retries: attempts,
256
+ service: this.serviceName,
257
+ ...(idempotencyKey && { idempotencyKey }),
258
+ },
259
+ };
260
+ // Also cache failed responses to prevent duplicate attempts
261
+ // This prevents the same failing request from being retried repeatedly
262
+ if (idempotencyKey) {
263
+ this.idempotencyCache.set(idempotencyKey, response, request.options?.idempotencyTTL);
264
+ }
265
+ return response;
266
+ }
267
+ }
268
+ /**
269
+ * Validate the incoming request
270
+ */
271
+ validateRequest(request) {
272
+ if (!request.action) {
273
+ throw new ScriptError('Request must include an action', ErrorCode.VALIDATION_ERROR);
274
+ }
275
+ if (!this.isValidAction(request.action)) {
276
+ throw new ScriptError(`Unsupported action: ${request.action}`, ErrorCode.VALIDATION_ERROR);
277
+ }
278
+ }
279
+ /**
280
+ * Create a dry-run response
281
+ */
282
+ createDryRunResponse(request) {
283
+ return {
284
+ success: true,
285
+ data: {
286
+ dryRun: true,
287
+ action: request.action,
288
+ parameters: request.parameters,
289
+ message: `Would execute ${request.action} on ${this.serviceName}`,
290
+ },
291
+ };
292
+ }
293
+ /**
294
+ * Get authentication headers for API calls
295
+ */
296
+ getAuthHeaders() {
297
+ const headers = {
298
+ 'Content-Type': 'application/json',
299
+ 'User-Agent': `RevealUI-MCP/${this.serviceName}`,
300
+ };
301
+ if (this.config.apiKey) {
302
+ // Different services use different header names
303
+ const headerName = this.getAuthHeaderName();
304
+ headers[headerName] = this.config.apiKey;
305
+ }
306
+ return headers;
307
+ }
308
+ /**
309
+ * Make an HTTP request with proper error handling
310
+ */
311
+ async makeRequest(method, url, data) {
312
+ const headers = this.getAuthHeaders();
313
+ const timeout = this.config.timeout || 30000;
314
+ const controller = new AbortController();
315
+ const timer = setTimeout(() => controller.abort(), timeout);
316
+ try {
317
+ const response = await fetch(url, {
318
+ method,
319
+ headers,
320
+ body: data && (method === 'POST' || method === 'PUT') ? JSON.stringify(data) : undefined,
321
+ signal: controller.signal,
322
+ });
323
+ if (!response.ok) {
324
+ throw new ScriptError(`HTTP ${response.status} ${response.statusText}`, ErrorCode.NETWORK_ERROR);
325
+ }
326
+ const contentType = response.headers.get('content-type') ?? '';
327
+ if (contentType.includes('application/json')) {
328
+ return await response.json();
329
+ }
330
+ return await response.text();
331
+ }
332
+ catch (error) {
333
+ if (error instanceof ScriptError)
334
+ throw error;
335
+ throw new ScriptError(`Request to ${this.serviceName} failed: ${error}`, ErrorCode.NETWORK_ERROR);
336
+ }
337
+ finally {
338
+ clearTimeout(timer);
339
+ }
340
+ }
341
+ }
342
+ // Specific service adapters
343
+ export class VercelAdapter extends MCPAdapter {
344
+ constructor(config) {
345
+ super('vercel', config);
346
+ }
347
+ isValidAction(action) {
348
+ return ['deploy', 'list-deployments', 'get-deployment', 'delete-deployment'].includes(action);
349
+ }
350
+ getAuthHeaderName() {
351
+ return 'Authorization';
352
+ }
353
+ async executeRequest(request) {
354
+ const baseUrl = this.config.baseUrl || 'https://api.vercel.com';
355
+ switch (request.action) {
356
+ case 'deploy':
357
+ return this.makeRequest('POST', `${baseUrl}/v13/deployments`, request.parameters);
358
+ case 'list-deployments':
359
+ return this.makeRequest('GET', `${baseUrl}/v6/deployments`);
360
+ case 'get-deployment': {
361
+ const { id } = request.parameters || {};
362
+ if (!id)
363
+ throw new ScriptError('Deployment ID required', ErrorCode.VALIDATION_ERROR);
364
+ return this.makeRequest('GET', `${baseUrl}/v13/deployments/${String(id)}`);
365
+ }
366
+ case 'delete-deployment': {
367
+ const { deploymentId } = request.parameters || {};
368
+ if (!deploymentId)
369
+ throw new ScriptError('Deployment ID required', ErrorCode.VALIDATION_ERROR);
370
+ return this.makeRequest('DELETE', `${baseUrl}/v13/deployments/${String(deploymentId)}`);
371
+ }
372
+ default:
373
+ throw new ScriptError(`Unsupported action: ${request.action}`, ErrorCode.VALIDATION_ERROR);
374
+ }
375
+ }
376
+ }
377
+ export class StripeAdapter extends MCPAdapter {
378
+ constructor(config) {
379
+ super('stripe', config);
380
+ }
381
+ isValidAction(action) {
382
+ return [
383
+ 'create-payment-intent',
384
+ 'list-payment-intents',
385
+ 'create-customer',
386
+ 'list-customers',
387
+ ].includes(action);
388
+ }
389
+ getAuthHeaderName() {
390
+ return 'Authorization';
391
+ }
392
+ async executeRequest(request) {
393
+ const baseUrl = this.config.baseUrl || 'https://api.stripe.com/v1';
394
+ switch (request.action) {
395
+ case 'create-payment-intent':
396
+ return this.makeRequest('POST', `${baseUrl}/payment_intents`, request.parameters);
397
+ case 'list-payment-intents':
398
+ return this.makeRequest('GET', `${baseUrl}/payment_intents`);
399
+ case 'create-customer':
400
+ return this.makeRequest('POST', `${baseUrl}/customers`, request.parameters);
401
+ case 'list-customers':
402
+ return this.makeRequest('GET', `${baseUrl}/customers`);
403
+ default:
404
+ throw new ScriptError(`Unsupported action: ${request.action}`, ErrorCode.VALIDATION_ERROR);
405
+ }
406
+ }
407
+ }
408
+ export class NeonAdapter extends MCPAdapter {
409
+ constructor(config) {
410
+ super('neon', config);
411
+ }
412
+ isValidAction(action) {
413
+ return ['list-projects', 'create-project', 'get-project', 'delete-project'].includes(action);
414
+ }
415
+ getAuthHeaderName() {
416
+ return 'Authorization';
417
+ }
418
+ async executeRequest(request) {
419
+ const baseUrl = this.config.baseUrl || 'https://console.neon.tech/api/v2';
420
+ switch (request.action) {
421
+ case 'list-projects':
422
+ return this.makeRequest('GET', `${baseUrl}/projects`);
423
+ case 'create-project':
424
+ return this.makeRequest('POST', `${baseUrl}/projects`, request.parameters);
425
+ case 'get-project': {
426
+ const { id } = request.parameters || {};
427
+ if (!id)
428
+ throw new ScriptError('Project ID required', ErrorCode.VALIDATION_ERROR);
429
+ return this.makeRequest('GET', `${baseUrl}/projects/${String(id)}`);
430
+ }
431
+ case 'delete-project': {
432
+ const { projectId } = request.parameters || {};
433
+ if (!projectId)
434
+ throw new ScriptError('Project ID required', ErrorCode.VALIDATION_ERROR);
435
+ return this.makeRequest('DELETE', `${baseUrl}/projects/${String(projectId)}`);
436
+ }
437
+ default:
438
+ throw new ScriptError(`Unsupported action: ${request.action}`, ErrorCode.VALIDATION_ERROR);
439
+ }
440
+ }
441
+ }
442
+ // Factory function to create adapters
443
+ export function createMCPAdapter(service, config) {
444
+ switch (service.toLowerCase()) {
445
+ case 'vercel':
446
+ return new VercelAdapter(config);
447
+ case 'stripe':
448
+ return new StripeAdapter(config);
449
+ case 'neon':
450
+ return new NeonAdapter(config);
451
+ default:
452
+ throw new ScriptError(`Unsupported MCP service: ${service}`, ErrorCode.CONFIG_ERROR);
453
+ }
454
+ }
455
+ /**
456
+ * Generate an idempotency key based on the request content.
457
+ *
458
+ * This creates a deterministic key from the action and parameters,
459
+ * so identical requests will get the same key.
460
+ *
461
+ * @example
462
+ * ```typescript
463
+ * const key = generateIdempotencyKey({
464
+ * action: 'deploy',
465
+ * parameters: { projectId: '123' }
466
+ * })
467
+ * // Returns: "deploy:a1b2c3d4e5f6..."
468
+ * ```
469
+ */
470
+ export function generateIdempotencyKey(request) {
471
+ const content = JSON.stringify({
472
+ action: request.action,
473
+ parameters: request.parameters || {},
474
+ });
475
+ // Simple hash function for generating consistent keys
476
+ let hash = 0;
477
+ for (let i = 0; i < content.length; i++) {
478
+ const char = content.charCodeAt(i);
479
+ hash = (hash << 5) - hash + char;
480
+ hash = hash & hash; // Convert to 32-bit integer
481
+ }
482
+ // Convert to positive hex string
483
+ const hashHex = Math.abs(hash).toString(16).padStart(8, '0');
484
+ return `${request.action}:${hashHex}`;
485
+ }
486
+ /**
487
+ * Generate a unique idempotency key with timestamp.
488
+ *
489
+ * Use this when you want each request to be unique but still
490
+ * want idempotency protection against rapid duplicate submissions.
491
+ *
492
+ * @example
493
+ * ```typescript
494
+ * const key = generateUniqueIdempotencyKey('deploy')
495
+ * // Returns: "deploy:1706536800000:a1b2c3d4"
496
+ * ```
497
+ */
498
+ export function generateUniqueIdempotencyKey(action) {
499
+ const timestamp = Date.now();
500
+ const random = randomBytes(6).toString('hex');
501
+ return `${action}:${timestamp}:${random}`;
502
+ }
503
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/servers/adapter.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAE1E,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,qDAAqC,CAAA;IACrC,+CAA+B,CAAA;IAC/B,+CAA+B,CAAA;IAC/B,6CAA6B,CAAA;AAC/B,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,OAAO,QAAS,SAAQ,KA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,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,EAAE,CAAA;AACvC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,4BAA4B,CAAC,MAAc;IACzD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAC5B,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,OAAO,GAAG,MAAM,IAAI,SAAS,IAAI,MAAM,EAAE,CAAA;AAC3C,CAAC"}
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * RevealUI Content MCP Server
4
+ *
5
+ * Model Context Protocol server that gives AI agents read/write access to
6
+ * RevealUI CMS content via the RevealUI REST API. Useful for agents that need
7
+ * to query site data, list content, manage users, or inspect deployment state.
8
+ *
9
+ * Environment:
10
+ * REVEALUI_API_URL — Base URL of the RevealUI API (e.g. https://api.mysite.com)
11
+ * REVEALUI_API_KEY — API key for authenticating with the RevealUI API
12
+ *
13
+ * Tools:
14
+ * revealui_list_sites — List all sites in the RevealUI instance
15
+ * revealui_list_content — List content entries for a site and collection
16
+ * revealui_get_content — Fetch a single content entry by ID
17
+ * revealui_list_users — List users (admin only)
18
+ * revealui_site_stats — Get user + content counts for a site
19
+ */
20
+ export {};
21
+ //# sourceMappingURL=revealui-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"revealui-content.d.ts","sourceRoot":"","sources":["../../src/servers/revealui-content.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG"}