@cnbcool/mcp-server
Version:
CNB MCP Server. A comprehensive MCP server that provides seamless integration to the CNB's API(https://cnb.cool), offering a wide range of tools for repository management, pipelines operations and collaboration features
17 lines (16 loc) • 691 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMcpServer = createMcpServer;
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
const index_js_1 = require("../tools/index.js");
const package_json_1 = require("../../package.json");
function createMcpServer(req) {
var _a;
const mcpServer = new mcp_js_1.McpServer({
name: 'cnb-mcp-server',
version: package_json_1.version
});
const token = (_a = req === null || req === void 0 ? void 0 : req.headers['authorization']) === null || _a === void 0 ? void 0 : _a.split(' ')[1];
(0, index_js_1.registerTools)(mcpServer, token);
return mcpServer;
}