@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
18 lines (17 loc) • 538 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createHeaders = createHeaders;
const cnb_1 = require("./cnb");
const baseURL = process.env.API_BASE_URL || 'https://api.cnb.cool';
const timeout = 10000; // 客户端10秒超时
const CnbFetcher = new cnb_1.CnbRequest({
baseURL,
timeout
});
exports.default = CnbFetcher;
function createHeaders(token) {
return {
Authorization: `Bearer ${process.env.API_TOKEN || token || ''}`,
Accept: 'application/vnd.cnb.api+json'
};
}