Tusk Drift MCP
The Tusk Drift MCP server enables AI assistants to search, analyze, and debug API traffic data captured by Tusk Drift, including HTTP requests, database queries, and distributed traces.
Core Capabilities:
Search and Filter API Traffic (
query_spans) - Find specific API calls using flexible criteria like endpoint names, HTTP methods, status codes, duration, errors, and custom JSON path filters with pagination supportGet Schema Information (
get_schema) - Understand available fields and structure for different instrumentation types (HTTP, database, gRPC, etc.) with example payloadsDiscover Available Data (
list_distinct_values) - List unique and frequently occurring values for fields like endpoints, instrumentation packages, environments, status codes, and JSONB values to assist in query buildingCalculate Aggregated Metrics (
aggregate_spans) - Compute statistics including latency percentiles (p50, p95, p99), error rates, request counts, performance comparisons across endpoints or environments, and time-series trends (hourly, daily, weekly)View Distributed Traces (
get_trace) - Retrieve complete end-to-end traces as hierarchical trees showing the full call chain, timings, and dependencies to identify bottlenecksFetch Specific Spans (
get_spans_by_ids) - Get detailed information and full request/response payloads for individual span recordings by ID
Common Use Cases: Debug failed or slow API requests, analyze endpoint performance patterns, track errors across distributed systems, understand API traffic and usage patterns, monitor database query performance, and investigate specific requests end-to-end.
Setup: Connect via remote server (recommended) or local installation with API key authentication. Supports multiple AI assistants including Cursor and Claude Desktop with easy configuration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Tusk Drift MCP show me the slowest API endpoints from the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tusk Drift MCP
An MCP server for querying API traffic data captured by Tusk Drift. This enables AI assistants to search, analyze, and debug your application's API traffic, including HTTP requests, database queries, and distributed traces.
New to Tusk Drift? Check out our docs and sign up for an account.
Setup
Option 1: Remote MCP Server (Recommended)
Connect directly to the hosted Tusk Drift MCP server. This is the easiest setup and doesn't require running anything locally.
For Cursor:
Add to your Cursor MCP settings (~/.cursor/mcp.json or workspace .cursor/mcp.json):
{
"mcpServers": {
"tusk-drift": {
"url": "https://api.usetusk.ai/api/drift-mcp",
"headers": {
"x-api-key": "YOUR_TUSK_API_KEY"
}
}
}
}For Claude Code:
Option A — CLI command:
claude mcp add --transport http tusk-drift https://api.usetusk.ai/api/drift-mcp \
--header "x-api-key: YOUR_TUSK_API_KEY"Option B — Add to .mcp.json in your project root:
{
"mcpServers": {
"tusk-drift": {
"type": "http",
"url": "https://api.usetusk.ai/api/drift-mcp",
"headers": {
"x-api-key": "YOUR_TUSK_API_KEY"
}
}
}
}For Claude Desktop:
{
"mcpServers": {
"tusk-drift": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.usetusk.ai/api/drift-mcp"],
"env": {
"MCP_HEADERS": "{\"x-api-key\": \"YOUR_TUSK_API_KEY\"}"
}
}
}
}Option 2: Local Installation (via NPX)
Run the MCP server locally. This is useful if you need offline access or custom configuration.
For Claude Desktop / Cursor:
Add to your claude_desktop_config.json or Cursor MCP settings:
{
"mcpServers": {
"tusk-drift": {
"command": "npx",
"args": ["-y", "@use-tusk/drift-mcp"],
"env": {
"TUSK_API_KEY": "YOUR_TUSK_API_KEY"
}
}
}
}Configuration (env vars for local installation)
Variable | Required | Description |
| Yes | Your API token |
| No | Backend base URL (defaults to |
| No | Service ID (auto-discovered from |
| No | Comma-separated workspace roots to search for |
Related MCP server: @originchain/telemetry-mcp
Available Tools
Tool | Description |
| Search API traffic with flexible filters |
| Get structure/schema of captured traffic |
| Discover available endpoints and field values |
| Calculate latency percentiles, error rates, counts |
| View distributed traces as hierarchical trees |
| Fetch specific spans with full payloads |
Support
Need help? Open an issue or contact us at support@usetusk.ai.
License
Available Tools
6 toolsaggregate_spansA
Calculate aggregated metrics and statistics across spans.
Use this tool to:
Get latency percentiles for endpoints (p50, p95, p99)
Calculate error rates by endpoint
Get request counts over time
Compare performance across environments
Examples:
Endpoint latency: groupBy = ["name"], metrics = ["count", "avgDuration", "p95Duration"]
Error rates: groupBy = ["name"], metrics = ["count", "errorCount", "errorRate"]
Hourly trends: timeBucket = "hour", metrics = ["count", "errorRate"]
Inputs: metrics (required), observableServiceId, where, groupBy, +3 more.
get_schemaA
Get schema and structure information for span recordings on Tusk Drift.
Use this tool to:
Understand what fields are available for a specific instrumentation type
See example payloads for HTTP requests, database queries, etc.
Learn what to filter on before querying spans
Common package names:
http: Incoming HTTP requests (has statusCode, method, url, headers)
fetch: Outgoing HTTP calls
pg: PostgreSQL queries (has db.statement, db.name)
grpc: gRPC calls
express: Express.js middleware spans
Inputs: observableServiceId, packageName, instrumentationName, name, +2 more.
get_spans_by_idsA
Fetch specific span recordings by their IDs.
Use this tool when you have span IDs from a previous query and need the full details including payloads.
This is useful for:
Getting full details for spans found via query_spans
Examining specific requests in detail
Comparing multiple specific spans
Inputs: ids (required), observableServiceId, fields, includePayloads, +1 more.
get_traceA
Get all spans in a distributed trace as a hierarchical tree.
Use this tool to:
Debug a specific request end-to-end
See the full call chain from HTTP request to database queries
Understand timing and dependencies between spans
Identify bottlenecks in a request
First use query_spans to find spans, then use the traceId to get the full trace.
Inputs: traceId (required), observableServiceId, includePayloads, maxPayloadLength.
list_distinct_valuesA
List unique values for a field, ordered by frequency.
Use this tool to:
Discover available endpoints (field: "name")
See all instrumentation packages in use (field: "packageName")
Find unique environments (field: "environment")
Explore JSONB values like status codes (field: "outputValue.statusCode")
This helps you understand what values exist before building specific queries.
Inputs: field (required), observableServiceId, where, limit.
query_spansA
Search and filter API traffic span recordings.
Use this tool to:
Find specific API calls by endpoint name, HTTP method, or status code
Search for errors or slow requests
Get recent traffic for a specific endpoint
Debug specific API calls
Examples:
Find failed requests: where = { fields: { "outputValue.statusCode": { gte: 400, access: { castAs: "int" } } } }
Find slow requests: where = { fields: { duration: { gt: 1000 } } }
Recent traffic for endpoint: where = { fields: { name: { eq: "/api/orders" } } }, limit = 10, orderBy = [{ field: "timestamp", direction: "DESC" }]
Inputs: observableServiceId, where, orderBy, limit, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool serves a clear, distinct purpose: aggregation, schema discovery, span detail retrieval, trace tree, field value exploration, and search. No overlap in functionality.
All tool names follow a consistent verb_noun pattern with underscores (e.g., aggregate_spans, list_distinct_values, query_spans). No mixing of styles.
6 tools is well-scoped for a telemetry/observability server, covering all necessary operations without being overwhelming or too sparse.
The tool set covers querying, aggregation, trace retrieval, span details, schema exploration, and field value discovery. No obvious gaps for the domain of analyzing API traffic spans.
Maintenance
Related MCP Connectors
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
AI agent observability for production traces, natural-language insights, and improvement loops.
Manage uptime monitors and incidents and search logs, metrics and traces from an AI assistant.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI coding agents with tools to query, search, and analyze persisted HTTP request logs, enabling efficient debugging without terminal noise.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to query OriginChain's telemetry agent for log patterns, semantic incident analysis, distributed traces, service graphs, and read-only SQL queries over telemetry data.104 npmMIT
- AlicenseAqualityBmaintenanceConnects AI assistants to OpenTelemetry trace backends (Jaeger, Grafana Tempo, Traceloop, Datadog, Sentry, AWS X-Ray, New Relic and Honeycomb) for natural-language trace and span search, error triage, cross-backend correlation, and LLM analytics such as token usage, model performance and the most expensive or slowest traces.19169 PyPI1Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI agents and MCP clients to query and debug trace data, sessions, exceptions, route decisions, metrics, prompts, datasets, and annotation queues. Supports configurable tool groups and read-only safety modes.-