Skip to main content
Glama

MCP Server for Spinnaker

by dion-hagan
ModelContextProtocolServer.js1.35 kB
import { ContextManager } from './ContextManager.js'; import { CommandHandler } from './CommandHandler.js'; import { GateClient } from '../clients/GateClient.js'; export class ModelContextProtocolServer { constructor(gateUrl, applications, environments) { const gateClient = new GateClient(gateUrl); this.contextManager = new ContextManager(gateClient, applications, environments); this.commandHandler = new CommandHandler(gateClient); } async initialize() { await this.contextManager.initialize(); } async handleGetContext(req, res) { const context = this.contextManager.getContext(); const refreshSeconds = this.contextManager.getRecommendedRefreshInterval(); const response = { context, refresh_in_seconds: refreshSeconds }; res.json(response); } async handleSetContext(req, res) { const setContextRequest = req.body; // For now, we don't allow external context updates // Could potentially allow setting of watched applications/environments res.status(200).json({ status: 'success' }); } async handleCommand(req, res) { const result = await this.commandHandler.handleCommand(req.body); res.json(result); } } //# sourceMappingURL=ModelContextProtocolServer.js.map

Latest Blog Posts

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/dion-hagan/mcp-server-spinnaker'

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