Get the FREE Ultimate OpenClaw Setup Guide →

drift

MCP server for querying Tusk Drift API traffic data

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio use-tusk-drift-mcp npx -y @use-tusk/drift-mcp \
  --env TUSK_API_KEY="YOUR_TUSK_API_KEY" \
  --env TUSK_DRIFT_API_URL="https://api.usetusk.ai" \
  --env TUSK_DRIFT_SERVICE_ID=""

How to use

The Drift MCP server enables programmatic access to your Tusk Drift API traffic for analysis, debugging, and research. Once started, the server exposes a set of tools that let you query and inspect captured API traffic, including HTTP requests, database queries, and distributed traces. Tools such as query_spans, get_schema, list_distinct_values, aggregate_spans, get_trace, and get_spans_by_ids allow you to search, summarize, and explore traffic data in structured ways, making it easier to identify performance bottlenecks, failing endpoints, or unusual behavior. To use the local MCP, obtain a TUSK_API_KEY from your Drift account, configure the drift API URL if needed, and run the MCP server. You can then connect your clients (e.g., Claude Desktop, Cursor, or your own tooling) to the MCP endpoint to issue these tools against your captured traffic.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Access to your Tusk Drift API key

Option A: Local installation (recommended for offline access or custom config)

  1. Install the Drift MCP globally using NPX: npm install -g @use-tusk/drift-mcp

  2. Run the MCP locally via NPX (no persistent global install required): npx -y @use-tusk/drift-mcp

  3. Configure your MCP client (example for Claude Desktop or Cursor): { "mcpServers": { "tusk-drift": { "command": "npx", "args": ["-y", "@use-tusk/drift-mcp"], "env": { "TUSK_API_KEY": "your-api-token" } } } }

Option B: Remote MCP server (hosted)

  • Use the remote endpoint provided by Tusk Drift for MCP access. No local server installation needed. See the Drift docs for remote configuration specifics.

Note: If you prefer, you can also install the MCP package in your project and run it as part of your application stack, using the provided environment variables to authenticate and configure the Drift API endpoint.

Additional notes

Tips and common considerations:

  • Always keep your TUSK_API_KEY secure. Do not commit it to public repos.
  • If you change the Drift API URL, set TUSK_DRIFT_API_URL to the correct base URL.
  • If your Drift account uses a specific service ID, you can set TUSK_DRIFT_SERVICE_ID to streamline discovery; otherwise it can be left empty.
  • The available tools (query_spans, get_schema, list_distinct_values, aggregate_spans, get_trace, get_spans_by_ids) cover a broad range of traffic analysis tasks; consult Drift docs for query syntax and field names.
  • When using Claude Desktop or Cursor, you may need to adapt your mcpServers JSON to match their expected schema (especially around command/args/env).

Related MCP Servers

Sponsor this space

Reach thousands of developers