mcp
bitdive mcp server for conenction with AI
claude mcp add --transport stdio bitdive-mcp-server java -jar build/libs/bitdive-mcp-server.jar \ --env VAULT_URL="https://sandbox.bitdive.io/vault" \ --env POSTGRES_URL="jdbc:postgresql://37.27.0.220:5432/data-bitdive" \ --env TOKEN_SECRET="<YOUR_TOKEN_SECRET>" \ --env POSTGRES_PASS="S3cret" \ --env POSTGRES_USER="citizix_user"
How to use
BitDive MCP Server is a Spring Boot-based MCP server that exposes a suite of tools for AI agents to interact with BitDive monitoring data. Once running, it provides trace tooling to fetch call traces by ID or by method and time, as well as monitoring and performance tools to retrieve system-wide or module/service-specific heap maps. These capabilities enable AI agents to analyze traces, diagnose performance bottlenecks, and extract contextual insights from trace data and metrics. To connect from an MCP client, point the client at the server's SSE endpoint and use the provided MCP endpoints to retrieve structured data for traces and metrics. The server integrates with PostgreSQL for data storage and uses Vault for secure configuration.
How to install
Prerequisites: a Java 17+ runtime, Maven (wrapper is provided), and a running PostgreSQL + Vault setup as described in the README.
- Clone the repository or download the source.
- Build the project with Maven Wrapper (the wrapper is included):
./mvnw clean package
- Run the server:
./mvnw spring-boot:run
- By default, the server will listen on port 8089. You can override configuration via application.yml or environment variables (see the table in the README).
- Verify the server is running by hitting the MCP endpoints, e.g.:
- SSE Endpoint: http://localhost:8089/sse
- Message Chat Endpoint: http://localhost:8089/mcp/message
Optional: If you prefer deploying via Docker, you can build a Docker image using the packaged JAR as described in the README deployment note, then run the container and expose port 8089 accordingly.
Additional notes
Tips and notes:
- Ensure PostgreSQL is reachable and the credentials in environment variables are correct; the server stores trace and monitoring data in PostgreSQL.
- Vault configuration (VAULT_URL and TOKEN_SECRET) should be properly set up in your environment to enable secure access to secrets.
- If you encounter port conflicts, you can override the server port via application.yml or an environment variable (e.g., SERVER_PORT).
- The MCP endpoints are designed to be consumed by MCP clients like Cursor; ensure your mcp.json in the client points to http://<server-host>:8089/sse for real-time data streaming.
- The provided tools (findTraceAll, findTraceForMethod, getCurrentHeapMapAllSystem, etc.) require the data model to be present in PostgreSQL; ensure the BitDive infrastructure populates the data before querying.