Registry / observability / cls-mcp-server

cls-mcp-server

JSON →
library0.3.4jsnpmunverified

CLS MCP Server (v1.0.3) connects LLMs (e.g., Claude, GPT) to Tencent Cloud Log Service via the Model Context Protocol. Provides 17+ tools for log search (CQL), metric queries (PromQL), alarm management, time conversion, and region lookup. Requires Tencent Cloud API credentials. Active development on GitHub (Tencent), supports stdio and SSE transports, Node.js 18–22. Distinct from generic MCP servers by deep CLS integration, natural language query translation, and built-in alarm workflow tools.

npm install cls-mcp-server
INSTALL
IMPORT
SIG · CLS-MCP-SERVER
C
cls-mcp-server
observabilityjavascriptv0.3.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export
import server from 'cls-mcp-server'
import { server } from 'cls-mcp-server'
The package exports a single main function/class as default. Named exports are not available at the top level.
CLSMCPServer
import CLSMCPServer from 'cls-mcp-server'
const { CLSMCPServer } = require('cls-mcp-server')
The primary class is exported as default. For CommonJS, use 'const CLSMCPServer = require("cls-mcp-server").default'.
runServer
import runServer from 'cls-mcp-server'
The default export is a function that runs the server. The name 'runServer' is user-defined; adjust as needed.

Initializes and runs the CLS MCP server with stdio transport, reading Tencent Cloud credentials from environment variables and setting region, max length, and timezone.

import runServer from 'cls-mcp-server'; await runServer({ transport: 'stdio', secretId: process.env.TENCENTCLOUD_SECRET_ID ?? '', secretKey: process.env.TENCENTCLOUD_SECRET_KEY ?? '', region: 'ap-guangzhou', maxLength: 10000, timezone: 'Asia/Shanghai' });
cls-mcp-server --version
Debug
Known issues
gotchaThe transport mode is determined by the TRANSPORT environment variable (default 'stdio'), not by a parameter. Setting it incorrectly will cause the server to not start.
fix
Ensure TRANSPORT is set to 'stdio' or 'sse' in environment, or pass in options if supported.
affects: >=1.0.0
breakingNode.js versions below 18 are not supported. The engine requirement is '>=18 <=22'.
fix
Use Node.js 18, 20, or 22.
affects: >=1.0.0
deprecatedThe 'maxTokenLength' option (if any) is deprecated; use 'maxLength' instead.
fix
Rename parameter to 'maxLength'.
affects: >=1.0.0
gotchaThe 'secretId' and 'secretKey' are required but commonly mistaken as optional. If missing, the server will fail to authenticate with Tencent Cloud API.
fix
Set TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY environment variables.
affects: >=1.0.0
breakingEnvironment variable names changed from old naming (e.g., SECRET_ID) to TENCENTCLOUD_SECRET_ID in v1.0.0.
fix
Use the new prefixed variable names.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Missing required environment variable: TENCENTCLOUD_SECRET_ID
Tencent Cloud API credentials not provided.
fix
Set TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY in the environment.
TypeError: (0 , ...) is not a function
Default import used as named import in CommonJS context.
fix
Use 'const runServer = require('cls-mcp-server').default' for CommonJS.
Error: Invalid transport: http. Must be 'stdio' or 'sse'
TRANSPORT environment variable set to an unsupported value.
fix
Set TRANSPORT to 'stdio' or 'sse'.
Error: connect ETIMEDOUT
Network issue or incorrect TENCENTCLOUD_API_BASE_HOST (e.g., using internal host outside VPC).
fix
Use the default 'tencentcloudapi.com' when not in Tencent Cloud VPC.
Upgrade
Version history
0.3.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
59 hits · last 30 days
node
56
OpenAI (training)
1
Resources
cls-mcp-server — npm install cls-mcp-server · libregistry