
uptrace/mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
A Model Context Protocol (MCP) server for Uptrace, written in Go.
概要
A Model Context Protocol (MCP) server for Uptrace, written in Go. This server implements the Model Context Protocol to expose Uptrace observability data to AI assistants and LLM-powered tools. - Go 1.21+ - Access to an Uptrace instance Edit config.yaml with your Uptrace credentials: Claude Code supports two transport modes for MCP servers: Claude spawns the server as a subprocess. Add to ~/.claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows): Replace /path/to/mcp-server and /path/to/config.yaml with absolute paths. Run the server separately and connect via HTTP. This is useful for: - Sharing one server across multiple clients - Running the server on a remote machine - Development with hot-reload (task dev)
README
以下は原文 README の抜粋です。原文を見る。
Uptrace MCP Server
A Model Context Protocol (MCP) server for Uptrace, written in Go.
Overview
This server implements the Model Context Protocol to expose Uptrace observability data to AI assistants and LLM-powered tools.
Prerequisites
- Go 1.21+
- Access to an Uptrace instance
Getting Started
Clone the repository
git clone [email protected]:uptrace/mcp.git
cd mcp
Initialize submodules
git submodule update --init --recursive
Build
go build -o mcp-server ./cmd/mcp-server
Configure
Create a config file:
cp config.yaml.example config.yaml
Edit config.yaml with your Uptrace credentials:
uptrace:
api_url: "https://api.uptrace.dev"
api_token: ""
project_id: 1
Run
Stdio mode (for Claude Code/Desktop):
./mcp-server --config config.yaml
HTTP mode (for web clients):
./mcp-server --config config.yaml --http :8080
Adding to Claude Code
Claude Code supports two transport modes for MCP servers:
Option 1: Stdio Mode (Recommended)
Claude spawns the server as a subprocess. Add to ~/.claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"uptrace": {
"command": "/path/to/mcp-server",
"args": ["--config", "/path/to/config.yaml"]
}
}
}
Replace /path/to/mcp-server and /path/to/config.yaml with absolute paths.
Option 2: HTTP Mode
Run the server separately and connect via HTTP. This is useful for:
- Sharing one server across multiple clients
- Running the server on a remote machine
- Development with hot-reload (
task dev)
-
Start the server:
./mcp-server --config config.yaml --http :8888 -
Add to Claude Code via CLI:
claude mcp add --transport http uptrace http://localhost:8888/mcpOr configure manually in your config file:
{ "mcpServers": { "uptrace": { "url": "http://localhost:8888/mcp" } } }
Available Tools
| Tool | Description |
|---|---|
list_span_groups |
Aggregate spans using UQL (Uptrace Query Language). Group and analyze spans by attributes. |
list_spans |
List spans from Uptrace. Supports time range filtering, trace ID filtering, and pagination. |
list_monitors |
List monitors from Uptrace. View configured alerts and monitoring rules. |
list_span_groups
Aggregate spans using UQL (Uptrace Query Language) for grouping and analysis.
Parameters:
time_start(optional): Start time in RFC3339 format, defaults to 1 hour agotime_end(optional): End time, defaults to nowquery(optional): UQL query stringsearch(optional): Search filterduration_gte(optional): Filter spans with duration >= value (nanoseconds)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"uptrace": {
"command": "/path/to/mcp-server",
"args": ["--config", "/path/to/config.yaml"]
}
}
}