/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { OutpostCore } from "../core.js"; import { SDKOptions } from "../lib/config.js"; import type { ConsoleLogger } from "./console-logger.js"; import { createRegisterPrompt } from "./prompts.js"; import { createRegisterResource, createRegisterResourceTemplate, } from "./resources.js"; import { MCPScope } from "./scopes.js"; import { createRegisterTool } from "./tools.js"; import { tool$attemptsGet } from "./tools/attemptsGet.js"; import { tool$attemptsList } from "./tools/attemptsList.js"; import { tool$attemptsRetry } from "./tools/attemptsRetry.js"; import { tool$destinationsCreate } from "./tools/destinationsCreate.js"; import { tool$destinationsDelete } from "./tools/destinationsDelete.js"; import { tool$destinationsDisable } from "./tools/destinationsDisable.js"; import { tool$destinationsEnable } from "./tools/destinationsEnable.js"; import { tool$destinationsGet } from "./tools/destinationsGet.js"; import { tool$destinationsGetAttempt } from "./tools/destinationsGetAttempt.js"; import { tool$destinationsList } from "./tools/destinationsList.js"; import { tool$destinationsListAttempts } from "./tools/destinationsListAttempts.js"; import { tool$destinationsUpdate } from "./tools/destinationsUpdate.js"; import { tool$eventsGet } from "./tools/eventsGet.js"; import { tool$eventsList } from "./tools/eventsList.js"; import { tool$healthCheck } from "./tools/healthCheck.js"; import { tool$metricsGetAttemptMetrics } from "./tools/metricsGetAttemptMetrics.js"; import { tool$metricsGetEventMetrics } from "./tools/metricsGetEventMetrics.js"; import { tool$publishEvent } from "./tools/publishEvent.js"; import { tool$schemasGetDestinationType } from "./tools/schemasGetDestinationType.js"; import { tool$schemasListDestinationTypes } from "./tools/schemasListDestinationTypes.js"; import { tool$tenantsDelete } from "./tools/tenantsDelete.js"; import { tool$tenantsGet } from "./tools/tenantsGet.js"; import { tool$tenantsGetPortalUrl } from "./tools/tenantsGetPortalUrl.js"; import { tool$tenantsGetToken } from "./tools/tenantsGetToken.js"; import { tool$tenantsList } from "./tools/tenantsList.js"; import { tool$tenantsUpsert } from "./tools/tenantsUpsert.js"; import { tool$topicsList } from "./tools/topicsList.js"; export function createMCPServer(deps: { logger: ConsoleLogger; allowedTools?: string[] | undefined; scopes?: MCPScope[] | undefined; serverURL?: string | undefined; apiKey?: SDKOptions["apiKey"] | undefined; serverIdx?: SDKOptions["serverIdx"] | undefined; }) { const server = new McpServer({ name: "Outpost", version: "0.10.0", }); const client = new OutpostCore({ apiKey: deps.apiKey, serverURL: deps.serverURL, serverIdx: deps.serverIdx, }); const scopes = new Set(deps.scopes); const allowedTools = deps.allowedTools && new Set(deps.allowedTools); const tool = createRegisterTool( deps.logger, server, client, scopes, allowedTools, ); const resource = createRegisterResource(deps.logger, server, client, scopes); const resourceTemplate = createRegisterResourceTemplate( deps.logger, server, client, scopes, ); const prompt = createRegisterPrompt(deps.logger, server, client, scopes); const register = { tool, resource, resourceTemplate, prompt }; void register; // suppress unused warnings tool(tool$healthCheck); tool(tool$tenantsList); tool(tool$tenantsUpsert); tool(tool$tenantsGet); tool(tool$tenantsDelete); tool(tool$tenantsGetPortalUrl); tool(tool$tenantsGetToken); tool(tool$eventsList); tool(tool$eventsGet); tool(tool$attemptsList); tool(tool$attemptsGet); tool(tool$attemptsRetry); tool(tool$destinationsList); tool(tool$destinationsCreate); tool(tool$destinationsGet); tool(tool$destinationsUpdate); tool(tool$destinationsDelete); tool(tool$destinationsEnable); tool(tool$destinationsDisable); tool(tool$destinationsListAttempts); tool(tool$destinationsGetAttempt); tool(tool$publishEvent); tool(tool$schemasListDestinationTypes); tool(tool$schemasGetDestinationType); tool(tool$topicsList); tool(tool$metricsGetEventMetrics); tool(tool$metricsGetAttemptMetrics); return server; }