Skip to main content
Glama

MCP Bridge Server

v1_0_0.js2.82 kB
import { BaseMigration } from './types.js'; /** * Initial migration to set up storage structure */ export class InitialMigration extends BaseMigration { constructor() { super('1.0.0', 'Initial storage structure'); } /** * Create initial storage structure */ async up(data) { // Validate input if (!this.validate(data)) { throw this.error('Invalid data structure'); } // Create initial structure return { version: this.version, metadata: { version: this.version, lastModified: new Date(), checksum: '' // Will be calculated by storage layer }, users: {} }; } /** * No downgrade possible from initial version */ async down(data) { throw this.error('Cannot downgrade from initial version'); } /** * Additional validation for this version */ validate(data) { if (!super.validate(data)) return false; // For initial migration, we accept empty data if (Object.keys(data).length === 0) return true; // If data exists, validate structure const root = data; return (typeof root.users === 'object' && Object.values(root.users).every(user => typeof user === 'object' && typeof user.id === 'string' && typeof user.machineIds === 'object' && Object.values(user.machineIds).every(machine => typeof machine === 'object' && machine.registeredAt instanceof Date && typeof machine.clients === 'object' && Object.values(machine.clients).every(client => typeof client === 'object' && typeof client.id === 'string' && typeof client.userId === 'string' && typeof client.machineId === 'string' && typeof client.type === 'string' && client.registeredAt instanceof Date && client.lastSeen instanceof Date && typeof client.capabilities === 'object' && Array.isArray(client.capabilities.supportedMethods) && Array.isArray(client.capabilities.supportedTransports) && typeof client.settings === 'object' && typeof client.settings.preferredTransport === 'string' && typeof client.settings.startupTimeout === 'number' && typeof client.settings.healthCheckInterval === 'number')))); } } // Export migration instance export const migration = new InitialMigration(); //# sourceMappingURL=v1_0_0.js.map

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/glassBead-tc/SubspaceDomain'

If you have feedback or need assistance with the MCP directory API, please join our Discord server