Skip to main content

BitDive MCP (Model Context Protocol) - User Documentation

What is BitDive MCP?​

BitDive MCP (Model Context Protocol) is an advanced debugging and observability interface designed for modern Java microservices applications. It provides runtime insights by combining call traceability, performance monitoring, and real-time heap dataβ€”enabling developers, SREs, and QA engineers to diagnose issues, optimize code, and validate application behavior without invasive tools or guesswork.

Available MCP Tools​

Call Tracing Tools​

Tool NameDescription
mcp_bitdive_getLastCallServiceRetrieves a list of recent service call runs, including their trace IDs, for a specified module and service. Useful for tracking recent activity and debugging.
mcp_bitdive_findTraceAllReturns the full call trace for a specified call ID. This provides a detailed view of the execution path for a particular service call.
mcp_bitdive_findTraceForMethodReturns the call trace for a specific method within a given call ID, class, and method name. Useful for pinpointing issues in method-level execution.
mcp_bitdive_findTraceForMethodBetweenTimeReturns the call trace for a specific class and method between given start and end timestamps. Useful for analyzing method behavior over a time range.

Performance Monitoring Tools​

Tool NameDescription
mcp_bitdive_getCurrentHeapMapAllSystemReturns system performance metrics for all modules and services in the system. Provides a holistic view of system health and resource allocation.
mcp_bitdive_getCurrentHeapMapForModuleReturns system performance metrics for a specific module. Useful for module-level resource monitoring.
mcp_bitdive_getCurrentHeapMapForModuleAndForServiceReturns system performance metrics (such as heap usage) for a specific module and service. Useful for monitoring resource usage and performance bottlenecks.
mcp_bitdive_getCurrentHeapMapForModuleAndForServiceClassReturns system performance metrics for a specific module, service, and class. Enables fine-grained monitoring and troubleshooting.

Common Use Cases​

BitDive MCP tools excel in several critical scenarios:

Root Cause Analysis - Analyze full call chains with findTraceAll to identify the source of issues.

Debugging Complex Problems - Drill into method behavior via findTraceForMethod to understand execution flow.

N+1 Query Detection - Compare SQL volumes across traces to identify inefficient database access patterns.

Performance Bottleneck Identification - Monitor system/module/class heap and timing metrics to locate slowdowns.

Regression Testing - Use trace replays to validate fixes by comparing before and after behavior.

CI/CD Observability - Integrate MCP for live trace checks before deployment to catch issues early.

Connecting to BitDive MCP Server​

To use BitDive MCP tools, connect your client or observability UI to the MCP server using this configuration:

{
"mcpServers": {
"bitdive": {
"url": "http://sandbox.bitdive.io:8089/sse",
"name": "BitDive MCP Server"
}
}
}

The connection uses HTTP(S) with Server-Sent Events (SSE) protocol and can be integrated into local tools, IDEs like Cursor, BitDive UI, or automated scripts.

Setup Process​

  1. Create or update your MCP configuration file at ~/.cursor/mcp.json (or your system's equivalent) with the connection details shown above.

  2. Restart Cursor completely after updating the configuration.

  3. Verify the connection by asking Cursor to use BitDive tools, for example: "Analyze system performance using BitDive tools"

  4. Successful connection will show MCP tool calls in the response, like: > Called MCP tool: getCurrentHeapMapAllSystem

Example Workflow: Diagnosing an N+1 Query Problem​

A typical workflow for diagnosing and fixing an N+1 query problem involves:

  1. Using findTraceAll to explore the full call context of a slow endpoint
  2. Identifying excessive SQL volume by examining the trace details
  3. Implementing a fix in code (for example, using @EntityGraph in JPA)
  4. Replaying with the same conditions to confirm query reduction
  5. Comparing before/after traces to quantify performance improvements

Case Study: Performance Optimization​

In a real-world application, BitDive MCP helped identify and fix an N+1 query problem with impressive results:

Before optimization: 243 SQL queries in a single endpoint call (typical N+1 pattern) After optimization: 1 optimized query using EntityGraph Improvement: 99.6% reduction in queries, 86% faster response time

The complete traces were compared using:

  • deb61f9e-3f2f-11f0-bda4-4f2e85a73b5e (before optimization)
  • d2e4f42a-3f30-11f0-98c8-b9eeeeb12adb (after optimization)

Integration with Development Workflow​

BitDive MCP integrates seamlessly into development workflows:

Code Review Process - Use BitDive MCP during reviews to analyze performance impacts of changes and provide data-driven feedback on optimization opportunities.

CI/CD Pipeline - Monitor deployment performance in real-time, detect performance regressions automatically, and validate optimization improvements with concrete metrics.

Bug Investigation - Trace issue reproduction with complete call flows, analyze historical data to identify patterns, and provide actionable insights for fixes.

Security Considerations​

BitDive MCP is designed with security in mind. It uses secure communication protocols with server-side authentication. The MCP server handles all authentication, and there is no direct database access from AI. All tool usage is logged for audit purposes.

Performance Best Practices​

When using BitDive MCP, consider these performance optimization strategies:

  • Start with broad system analysis before narrowing to specific components
  • Use time-based analysis for behavioral patterns during specific windows
  • Combine monitoring and tracing tools for complete understanding
  • Schedule periodic system-wide performance analysis for baseline comparisons
  • Use selective monitoring with granular tools to focus on specific areas
  • Consider batching operations by combining related queries when possible

BitDive MCP transforms application monitoring from a reactive, manual process into a proactive, data-driven experience. By providing comprehensive runtime insights with minimal configuration, it enables developers to identify, diagnose, and fix issues with unprecedented precision and efficiency.