cls-mcp-server 0.2.0 → 0.2.1

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 CHANGED
@@ -10,7 +10,7 @@ Follow [Node.js](https://nodejs.org/) instructions to install Node.js.
10
10
 
11
11
  ### MCP Server Setup
12
12
 
13
- #### Stdio
13
+ #### Stdio (Recommend)
14
14
 
15
15
  To configure `cls-mcp-server` as an MCP service in stdio transport, add the following JSON configuration to your `mcpServers` settings:
16
16
 
@@ -39,9 +39,11 @@ To configure `cls-mcp-server` as an MCP service in stdio transport, add the foll
39
39
  }
40
40
  }
41
41
  ```
42
+
42
43
  Go to [Environment value explanation](#environment-value-explanation) for detail explanation.
43
44
 
44
45
  #### SSE
46
+
45
47
  1. Create `.env` in current path, config environment values:
46
48
 
47
49
  ```
@@ -51,14 +53,23 @@ TENCENTCLOUD_SECRET_KEY=YOUR_TENCENT_SECRET_KEY
51
53
  TENCENTCLOUD_API_BASE_HOST=tencentcloudapi.com
52
54
  TENCENTCLOUD_REGION=ap-guangzhou
53
55
  MAX_LENGTH=15000
56
+ PORT=3000
54
57
  ```
55
58
 
56
- 2. Run command
59
+ 2. Install `cls-mcp-server` globally by npm
60
+
57
61
  ```
58
- npm run start:sse
62
+ npm install -g cls-mcp-server@latest
59
63
  ```
60
64
 
61
- 3. Config your `mcpServers` settings
65
+ 3. Run `cls-mcp-server` command to start sse server
66
+
67
+ ```
68
+ cls-mcp-server
69
+ ```
70
+
71
+ 4. Config your `mcpServers` settings
72
+
62
73
  ```json
63
74
  {
64
75
  "mcpServers": {
@@ -85,3 +96,5 @@ Replace `TENCENTCLOUD_API_BASE_HOST` value if you need to change base host of Te
85
96
  Replace `TENCENTCLOUD_REGION` value with your desired default region. Will only take effect if no region input from AI.
86
97
 
87
98
  Replace `MAX_LENGTH` value to fit token length requirement of your AI model. If not provided, will send entire response to AI model.
99
+
100
+ Replace `PORT` value to change sse server port. Default `3000`. Will only take effect in sse transport.
package/dist/index.js CHANGED
@@ -295,7 +295,7 @@ function main() {
295
295
  transport.handlePostMessage(req, res);
296
296
  }
297
297
  });
298
- app.listen(3000);
298
+ app.listen(process.env.PORT ? Number(process.env.PORT) : 3000);
299
299
  }
300
300
  else {
301
301
  const stdioTransport = new stdio_js_1.StdioServerTransport();
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "cls-mcp-server",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "main": "index.js",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
8
  "bin": {
9
- "cls-mcp-server": "./dist/index.js"
9
+ "cls-mcp-server": "dist/index.js"
10
10
  },
11
11
  "scripts": {
12
12
  "build": "tsc && chmod 755 dist/index.js",