UNPKG

@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

14 lines (13 loc) 567 B
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { registerTools } from '../tools/index.js'; // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#import-attributes import packageJSON from '../../package.json' with { type: 'json' }; export function createMcpServer(req) { const mcpServer = new McpServer({ name: 'cnb-mcp-server', version: packageJSON.version }); const token = req?.headers['authorization']?.split(' ')[1]; registerTools(mcpServer, token); return mcpServer; }