"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMCPServer = createMCPServer;
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
const core_js_1 = require("../core.js");
const prompts_js_1 = require("./prompts.js");
const resources_js_1 = require("./resources.js");
const tools_js_1 = require("./tools.js");
const accessTokensIssueAccessToken_js_1 = require("./tools/accessTokensIssueAccessToken.js");
const accessTokensListAccessTokens_js_1 = require("./tools/accessTokensListAccessTokens.js");
const accessTokensRevokeAccessToken_js_1 = require("./tools/accessTokensRevokeAccessToken.js");
const basinsCreateBasin_js_1 = require("./tools/basinsCreateBasin.js");
const basinsCreateOrReconfigureBasin_js_1 = require("./tools/basinsCreateOrReconfigureBasin.js");
const basinsDeleteBasin_js_1 = require("./tools/basinsDeleteBasin.js");
const basinsGetBasinConfig_js_1 = require("./tools/basinsGetBasinConfig.js");
const basinsListBasins_js_1 = require("./tools/basinsListBasins.js");
const basinsReconfigureBasin_js_1 = require("./tools/basinsReconfigureBasin.js");
const metricsAccountMetrics_js_1 = require("./tools/metricsAccountMetrics.js");
const metricsBasinMetrics_js_1 = require("./tools/metricsBasinMetrics.js");
const metricsStreamMetrics_js_1 = require("./tools/metricsStreamMetrics.js");
const recordsAppend_js_1 = require("./tools/recordsAppend.js");
const recordsCheckTail_js_1 = require("./tools/recordsCheckTail.js");
const recordsRead_js_1 = require("./tools/recordsRead.js");
const streamsCreateOrReconfigureStream_js_1 = require("./tools/streamsCreateOrReconfigureStream.js");
const streamsCreateStream_js_1 = require("./tools/streamsCreateStream.js");
const streamsDeleteStream_js_1 = require("./tools/streamsDeleteStream.js");
const streamsGetStreamConfig_js_1 = require("./tools/streamsGetStreamConfig.js");
const streamsListStreams_js_1 = require("./tools/streamsListStreams.js");
const streamsReconfigureStream_js_1 = require("./tools/streamsReconfigureStream.js");
function createMCPServer(deps) {
    const server = new mcp_js_1.McpServer({
        name: "S2",
        version: "0.15.7",
    });
    const client = new core_js_1.S2Core({
        accessToken: deps.accessToken,
        serverURL: deps.serverURL,
        serverIdx: deps.serverIdx,
    });
    const scopes = new Set(deps.scopes);
    const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
    const tool = (0, tools_js_1.createRegisterTool)(deps.logger, server, client, scopes, allowedTools);
    const resource = (0, resources_js_1.createRegisterResource)(deps.logger, server, client, scopes);
    const resourceTemplate = (0, resources_js_1.createRegisterResourceTemplate)(deps.logger, server, client, scopes);
    const prompt = (0, prompts_js_1.createRegisterPrompt)(deps.logger, server, client, scopes);
    const register = { tool, resource, resourceTemplate, prompt };
    void register; // suppress unused warnings
    tool(accessTokensListAccessTokens_js_1.tool$accessTokensListAccessTokens);
    tool(accessTokensIssueAccessToken_js_1.tool$accessTokensIssueAccessToken);
    tool(accessTokensRevokeAccessToken_js_1.tool$accessTokensRevokeAccessToken);
    tool(basinsListBasins_js_1.tool$basinsListBasins);
    tool(basinsCreateBasin_js_1.tool$basinsCreateBasin);
    tool(basinsGetBasinConfig_js_1.tool$basinsGetBasinConfig);
    tool(basinsCreateOrReconfigureBasin_js_1.tool$basinsCreateOrReconfigureBasin);
    tool(basinsDeleteBasin_js_1.tool$basinsDeleteBasin);
    tool(basinsReconfigureBasin_js_1.tool$basinsReconfigureBasin);
    tool(metricsAccountMetrics_js_1.tool$metricsAccountMetrics);
    tool(metricsBasinMetrics_js_1.tool$metricsBasinMetrics);
    tool(metricsStreamMetrics_js_1.tool$metricsStreamMetrics);
    tool(streamsListStreams_js_1.tool$streamsListStreams);
    tool(streamsCreateStream_js_1.tool$streamsCreateStream);
    tool(streamsGetStreamConfig_js_1.tool$streamsGetStreamConfig);
    tool(streamsCreateOrReconfigureStream_js_1.tool$streamsCreateOrReconfigureStream);
    tool(streamsDeleteStream_js_1.tool$streamsDeleteStream);
    tool(streamsReconfigureStream_js_1.tool$streamsReconfigureStream);
    tool(recordsRead_js_1.tool$recordsRead);
    tool(recordsAppend_js_1.tool$recordsAppend);
    tool(recordsCheckTail_js_1.tool$recordsCheckTail);
    return server;
}
//# sourceMappingURL=server.js.map