cls-mcp-server
v0.3.2
Published
This project is a Node.js server that integrates with Tencent Cloud Log Service (CLS) and supports the Model Context Protocol (MCP).
Readme
CLS MCP Server
This project is a Node.js server that integrates with Tencent Cloud Log Service (CLS) and supports the Model Context Protocol (MCP).
Configuration
Install Node.js
Follow Node.js instructions to install Node.js. LTS version is recommended.
MCP Server Setup
Stdio (Recommend)
To configure cls-mcp-server as an MCP service in stdio transport, add the following JSON configuration to your mcpServers settings:
{
"mcpServers": {
"cls-mcp-server": {
"isActive": true,
"name": "cls-mcp-server",
"type": "stdio",
"registryUrl": "",
"command": "npx",
"args": [
"-y",
"cls-mcp-server@latest"
],
"env": {
"TRANSPORT": "stdio",
"TENCENTCLOUD_SECRET_ID": "YOUR_TENCENT_SECRET_ID",
"TENCENTCLOUD_SECRET_KEY": "YOUR_TENCENT_SECRET_KEY",
"TENCENTCLOUD_API_BASE_HOST": "tencentcloudapi.com",
"MAX_LENGTH": "15000",
"TZ": "Asia/Shanghai"
}
}
}
}Go to Environment value explanation for detail explanation.
SSE
- Create
.envin current path, config environment values:
TRANSPORT=sse
TENCENTCLOUD_SECRET_ID=YOUR_TENCENT_SECRET_ID
TENCENTCLOUD_SECRET_KEY=YOUR_TENCENT_SECRET_KEY
TENCENTCLOUD_API_BASE_HOST=tencentcloudapi.com
MAX_LENGTH=15000
PORT=3000
TZ=Asia/Shanghai- Run command to start sse server
npx -y cls-mcp-server@latest- Config your
mcpServerssettings
{
"mcpServers": {
"cls-mcp-server": {
"name": "cls-mcp-server",
"type": "sse",
"isActive": true,
"baseUrl": "http://localhost:3000/sse"
}
}
}Go to Environment value explanation for detail explanation.
Environment value explanation
Replace TRANSPORT value to config MCP transport, stdio or sse. Default stdio.
Replace YOUR_TENCENT_SECRET_ID and YOUR_TENCENT_SECRET_KEY with your actual Tencent Cloud credentials.
Replace TENCENTCLOUD_API_BASE_HOST value if you need to change base host of Tencent Cloud API. Default "tencentcloudapi.com".
Replace MAX_LENGTH value to fit token length requirement of your AI model. If not provided, will send entire response to AI model.
Replace PORT value to change sse server port. Default 3000. Will only take effect in sse transport.
Replace TZ value to change timezone. Will use server timezone if not provided.
