@cnbcool/mcp-server 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/index.js +4 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,13 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
CNB(https://cnb.cool) toolkits for LLMs supporting the MCP protocol
|
|
4
4
|
|
|
5
|
+
## Prerequisite
|
|
6
|
+
|
|
7
|
+
1. node >= 18
|
|
8
|
+
2. typescript >=5.5
|
|
9
|
+
|
|
5
10
|
## How to develop
|
|
6
11
|
|
|
7
12
|
1. `npm install`
|
|
8
13
|
2. `npx openapi-typescript@5.4.2 https://api.cnb.cool/swagger.json -o src/schema.d.ts`
|
|
9
14
|
3. Rename `.env.example` to `.env` and fill in the values
|
|
10
15
|
4. `npm build`
|
|
11
|
-
5. `npx @modelcontextprotocol/inspector node dist/index.js`
|
|
16
|
+
5. `npx @modelcontextprotocol/inspector -e API_TOKEN=xxxxxxxxxx node dist/index.js`
|
|
12
17
|
|
|
13
18
|
## How to configure
|
|
14
19
|
|
package/dist/index.js
CHANGED
|
@@ -4,14 +4,16 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
4
4
|
import dotenv from "dotenv";
|
|
5
5
|
import { CnbApiClient } from "./CnbApiClient.js";
|
|
6
6
|
import { registerTools } from "./tools.js";
|
|
7
|
+
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#import-attributes
|
|
8
|
+
import packageJSON from "../package.json" with { type: 'json' };
|
|
7
9
|
dotenv.config();
|
|
8
10
|
const cnbApiClient = new CnbApiClient({
|
|
9
11
|
baseUrl: process.env.API_BASE_URL || "https://api.cnb.cool",
|
|
10
12
|
token: process.env.API_TOKEN || ""
|
|
11
13
|
});
|
|
12
14
|
const server = new McpServer({
|
|
13
|
-
name: "cnb-
|
|
14
|
-
version:
|
|
15
|
+
name: "cnb-mcp-server",
|
|
16
|
+
version: packageJSON.version
|
|
15
17
|
});
|
|
16
18
|
registerTools(server, cnbApiClient);
|
|
17
19
|
async function main() {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cnbcool/mcp-server",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "0.1.
|
|
3
|
+
"description": "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",
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"cnb-mcp-server": "dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://cnb.cool/cnb/tools/mcp-server"
|
|
16
|
+
"url": "https://cnb.cool/cnb/tools/cnb-mcp-server"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"cnb",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|
|
31
31
|
"engines": {
|
|
32
|
-
"node": ">=
|
|
32
|
+
"node": ">= 18",
|
|
33
33
|
"typescript": ">=5.5"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|