
用光标、 Claude 桌面或任何其他 MCP 兼容客户端连接您的 Signoz 实例
概览
[T0] (中文(简体) ). Watch Working Demo on Cursor QQ https://youtube.com/shorts/jxjmGyXXz7A. 下列工具可通过MCP服务器提供: - 验证您的 Signoz 实例和配置的连接 。 - 列出Signoz所有可用的仪表板。 - 以身份证获取关于特定仪表板的详细资料。 这些信息包含仪表板的元数据,而不是活面板数据. - :按名称和时间范围获取特定仪表板的所有面板数据。 - 为给定服务和时间范围检索标准APM指标(请求率、出错率、延迟率、最高限值等)。 - :通过可选的时间范围过滤从Signoz获取所有仪器服务。 - 执行自定义的 Clickhouse SQL 查询,通过 Signoz API 提供时间范围支持。 - 执行Signoz 构建器查询自定义度量衡和集合,并提供时间范围支持。 - 使用 ClickHouse SQL 从 SigNoz 获取痕迹或日志 。 指定数据类型(“跟踪”或“日志”)、时间范围、服务名称和限制.
概述(AI 翻译)
[T0] (中文(简体) ). Watch Working Demo on Cursor QQ https://youtube.com/shorts/jxjmGyXXz7A.
□ 可用的工具
下列工具可通过MCP服务器提供:
- ** test connect**:验证连接到您的 Signoz 实例和配置 。
- 牵线板: 列出Signoz所有可用的仪表板.
- fetch dashboard details: -=需要含有url= (帮助) 以身份证获取关于特定仪表板的详细资料。 这些信息包含仪表板的元数据,而不是活面板数据.
- fetch dashboard data:按名称和时间范围获取特定仪表板的所有面板数据。
- fetch apm meterics:为给定的服务和时间范围检索标准APM度量衡(请求率,出错率,延迟率,最高限量等).
- 服务**: 通过可选的时间范围过滤从 Signoz 获取所有仪器服务 。
- 执行 点击之家 克里: 通过 Signoz API 执行自定义 Clickhouse SQL 查询,并提供时间范围支持 。
- 执行 建设者 克里: 执行 Signoz 构建器查询自定义的度量和集合,并提供时间范围支持.
- fetch traces 或 logs:使用ClickHouse SQL从SigNoz取出痕迹或日志.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Signoz MCP Server
Watch Working Demo on Cursor 📽️ https://youtube.com/shorts/jxjmGyXXz7A
Available Tools
The following tools are available via the MCP server:
- test_connection: Verify connectivity to your Signoz instance and configuration.
- fetch_dashboards: List all available dashboards from Signoz.
- fetch_dashboard_details: Retrieve detailed information about a specific dashboard by its ID. This information contains the metadata of the dashboard, not the live panel data.
- fetch_dashboard_data: Fetch all panel data for a given dashboard by name and time range.
- fetch_apm_metrics: Retrieve standard APM metrics (request rate, error rate, latency, apdex, etc.) for a given service and time range.
- fetch_services: Fetch all instrumented services from Signoz with optional time range filtering.
- execute_clickhouse_query: Execute custom Clickhouse SQL queries via the Signoz API with time range support.
- execute_builder_query: Execute Signoz builder queries for custom metrics and aggregations with time range support.
- fetch_traces_or_logs: Fetch traces or logs from SigNoz using ClickHouse SQL. Specify
data_type(‘traces’ or ‘logs’), time range, service name, and limit. Returns tabular results for traces or logs.
🚀 Usage & Requirements
1. Get Your Signoz API Endpoint & (Optional) API Key
- Ensure you have a running Signoz instance (self-hosted or cloud).
- (Optional) If your Signoz instance requires an API key for the health endpoint, generate or obtain it from your Signoz UI.
2. Installation & Running Options
2A. Install & Run with uv (Recommended for Local Development)
2A.1. Install dependencies with uv
uv venv .venv
source .venv/bin/activate
uv sync
2A.2. Run the server with uv
uv run -m src.signoz_mcp_server.mcp_server
- You can also use
uvto run any other entrypoint scripts as needed. - Make sure your
config.yamlis in the same directory asmcp_server.pyor set the required environment variables (see Configuration section).
2B. Run with Docker Compose (Recommended for Production/Containerized Environments)
- Edit
src/signoz_mcp_server/config.yamlwith your Signoz details (host, API key if needed). - Start the server:
docker-compose up -d- The server will run in HTTP (SSE) mode on port 8000 by default.
- You can override configuration with environment variables (see below).
3. Configuration
The server loads configuration in the following order of precedence:
- Environment Variables (recommended for Docker/CI):
SIGNOZ_HOST: Signoz instance URL (e.g.https://your-signoz-instance.com)SIGNOZ_API_KEY: Signoz API key (optional)SIGNOZ_SSL_VERIFY:trueorfalse(default:true)MCP_SERVER_PORT: Port to run the server on (default:8000)MCP_SERVER_DEBUG:trueorfalse(default:true)
安装
docker run --rm -i -e SIGNOZ_HOST -e SIGNOZ_API_KEY -e SIGNOZ_SSL_VERIFY drdroidlab/signoz-mcp-server -t stdio配置
{
"mcpServers": {
"signoz": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"SIGNOZ_HOST",
"-e",
"SIGNOZ_API_KEY",
"-e",
"SIGNOZ_SSL_VERIFY",
"drdroidlab/signoz-mcp-server",
"-t",
"stdio"
],
"env": {
"SIGNOZ_HOST": "https://your-signoz-instance.com",
"SIGNOZ_API_KEY": "your-signoz-api-key-here",
"SIGNOZ_SSL_VERIFY": "true"
}
}
}
}