/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { S2Core } from "../core.js";
import { createRegisterPrompt } from "./prompts.js";
import { createRegisterResource, createRegisterResourceTemplate, } from "./resources.js";
import { createRegisterTool } from "./tools.js";
import { tool$accessTokensIssueAccessToken } from "./tools/accessTokensIssueAccessToken.js";
import { tool$accessTokensListAccessTokens } from "./tools/accessTokensListAccessTokens.js";
import { tool$accessTokensRevokeAccessToken } from "./tools/accessTokensRevokeAccessToken.js";
import { tool$basinsCreateBasin } from "./tools/basinsCreateBasin.js";
import { tool$basinsCreateOrReconfigureBasin } from "./tools/basinsCreateOrReconfigureBasin.js";
import { tool$basinsDeleteBasin } from "./tools/basinsDeleteBasin.js";
import { tool$basinsGetBasinConfig } from "./tools/basinsGetBasinConfig.js";
import { tool$basinsListBasins } from "./tools/basinsListBasins.js";
import { tool$basinsReconfigureBasin } from "./tools/basinsReconfigureBasin.js";
import { tool$metricsAccountMetrics } from "./tools/metricsAccountMetrics.js";
import { tool$metricsBasinMetrics } from "./tools/metricsBasinMetrics.js";
import { tool$metricsStreamMetrics } from "./tools/metricsStreamMetrics.js";
import { tool$recordsAppend } from "./tools/recordsAppend.js";
import { tool$recordsCheckTail } from "./tools/recordsCheckTail.js";
import { tool$recordsRead } from "./tools/recordsRead.js";
import { tool$streamsCreateOrReconfigureStream } from "./tools/streamsCreateOrReconfigureStream.js";
import { tool$streamsCreateStream } from "./tools/streamsCreateStream.js";
import { tool$streamsDeleteStream } from "./tools/streamsDeleteStream.js";
import { tool$streamsGetStreamConfig } from "./tools/streamsGetStreamConfig.js";
import { tool$streamsListStreams } from "./tools/streamsListStreams.js";
import { tool$streamsReconfigureStream } from "./tools/streamsReconfigureStream.js";
export function createMCPServer(deps) {
    const server = new McpServer({
        name: "S2",
        version: "0.15.7",
    });
    const client = new 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 = 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$accessTokensListAccessTokens);
    tool(tool$accessTokensIssueAccessToken);
    tool(tool$accessTokensRevokeAccessToken);
    tool(tool$basinsListBasins);
    tool(tool$basinsCreateBasin);
    tool(tool$basinsGetBasinConfig);
    tool(tool$basinsCreateOrReconfigureBasin);
    tool(tool$basinsDeleteBasin);
    tool(tool$basinsReconfigureBasin);
    tool(tool$metricsAccountMetrics);
    tool(tool$metricsBasinMetrics);
    tool(tool$metricsStreamMetrics);
    tool(tool$streamsListStreams);
    tool(tool$streamsCreateStream);
    tool(tool$streamsGetStreamConfig);
    tool(tool$streamsCreateOrReconfigureStream);
    tool(tool$streamsDeleteStream);
    tool(tool$streamsReconfigureStream);
    tool(tool$recordsRead);
    tool(tool$recordsAppend);
    tool(tool$recordsCheckTail);
    return server;
}
//# sourceMappingURL=server.js.map