MCP Hub
Back to servers

mcp-server

BitDive Model Context Protocol (MCP) server. The Autonomous Quality Loop for AI agents. Provides real runtime context, before/after trace comparison, and integration testing workflows.

GitHub
Stars
86
Forks
20
Updated
Apr 29, 2026
Validated
May 1, 2026

BitDive MCP Server

Python MCP Transport BitDive

Python MCP server for BitDive trace analysis, request reproduction, and regression management.

This repository exposes BitDive monitoring and QA operations to MCP clients such as Cursor, Claude Desktop, and other agent runtimes. The implementation lives in server.py and connects to the BitDive Monitoring API while adding its own formatting, normalization, and comparison logic on top.

Use this repository from the python-mcp-server branch.

Demo

Watch the BitDive demo

Watch the BitDive product demo on YouTube:

Overview

This server is not just a thin API proxy.

It wraps BitDive API endpoints and makes them usable for agent workflows:

  • compact heatmap summaries for discovery
  • readable trace summaries instead of raw JSON only
  • Bash and PowerShell reproduction commands from captured requests
  • before/after trace comparison with payload and contract drift reporting
  • SQL normalization and volatile-field filtering to reduce noisy diffs
  • test-group inspection and regression-management flows

What It Is For

Use this server when an AI agent or developer needs to:

  • discover which module, service, class, or entrypoint is active
  • fetch recent or historical traces
  • inspect a trace without manually parsing BitDive JSON
  • reproduce a captured web request locally
  • compare two traces after a code change
  • track how behavior evolved across multiple runs
  • inspect and update BitDive test groups

Tool Inventory

The current server exposes 23 MCP tools.

GroupTools
Discoveryget_heatmap_all_system, get_heatmap_for_module, get_heatmap_for_service
Recent tracesget_last_calls
Trace lookupfind_trace_all, find_trace_for_method, find_trace_between_time, get_trace_names_batch
Reproductionget_reproduction_command
Method docssearch_methods_short, search_methods_full
Test managementcreate_test_group, get_all_test_scripts, get_script_data, get_script_data_test, get_tests_by_call_for_test_script, delete_test_script, enabled_test_script, regenerate_tests_by_call_for_test_script, get_test_failure_details
Trace intelligencefind_trace_summary, compare_traces, compare_trace_evolution

What The Code Adds

Several important behaviors are implemented inside server.py, not just delegated to the backend API.

Trace readability

  • find_trace_summary builds a readable execution tree
  • SQL, REST, queue calls, timings, return values, and errors are formatted for direct MCP output

Trace comparison

  • compare_traces detects method-path drift
  • payload and contract changes are compared after normalizing Java-serialized structures
  • volatile fields such as IDs, UUIDs, timestamps, traceId, and callId can be ignored for cleaner diffs
  • SQL execution deltas are grouped and normalized to surface likely N+1 patterns

Reproduction workflow

  • captured request URLs are normalized so internal Docker hostnames can be replayed from the host shell
  • curl and PowerShell commands are generated from recorded headers, method, URL, and body

Test-management helpers

  • the server can rebuild replacement payloads through MCP-accessible APIs when direct helper data is not available
  • test-group inspection is formatted for quick agent use instead of raw response browsing

Runtime Model

LayerResponsibility
BitDive backendStores traces, monitoring data, and test metadata
mcp-serverExposes MCP tools and adds comparison, normalization, and formatting logic
MCP clientCursor, Claude Desktop, or another runtime invoking the tools

Requirements

  • Python 3.11+
  • httpx
  • mcp
  • a valid BitDive MCP token

Install dependencies:

pip install -r requirements.txt

Configuration

Environment variables

VariablePurposeDefault
BITDIVE_MCP_TOKENDefault token when a tool call does not pass mcp_tokennone
BITDIVE_API_URLBase BitDive Monitoring API URLhttps://cloud.bitdive.io/monitoring-api
BITDIVE_SKIP_VERIFYDisable TLS certificate verification when set to truefalse
MCP_TRANSPORTMCP transport modestdio
MCP_HOSTHost for HTTP mode0.0.0.0
MCP_PORTPort for HTTP mode8000

Every tool also accepts an optional mcp_token parameter. If omitted, the server falls back to BITDIVE_MCP_TOKEN.

Running The Server

stdio mode

python server.py

streamable-http mode

MCP_TRANSPORT=streamable-http MCP_HOST=0.0.0.0 MCP_PORT=8000 python server.py

Example MCP Client Configuration

{
  "mcpServers": {
    "bitdive": {
      "command": "python",
      "args": [
        "/absolute/path/to/server.py"
      ],
      "env": {
        "BITDIVE_MCP_TOKEN": "your-token"
      }
    }
  }
}

Repository Contents

PathPurpose
server.pyMCP server implementation
requirements.txtPython dependencies

Notes

  • The server fails fast if no MCP token is available.
  • Fresh traces may not appear in the hot cache immediately after replay; the built-in workflow expects a short wait before checking recent calls again.
  • This repository is the MCP bridge and trace-intelligence layer. It does not capture JVM events itself and it does not execute JUnit replay tests by itself.

Reviews

No reviews yet

Sign in to write a review