AI Clients


This guide explains how to connect your AI clients to the MCP servers provided by Develocity. To enable the MCP servers on your Develocity installation, see the Installation Manual.

Permissions

Both MCP servers require an access key with the Access build data via the API permission.

The Develocity Analytics MCP Server additionally requires Access all data with or without an associated project for instances with project-level access control enabled.

You can check your permissions by visiting the /settings/access page when logged in to Develocity.

For detailed instructions on generating access keys, see the Develocity API user manual.

MCP Client Configuration

Configure the Develocity MCP Server using the URL of your Develocity instance with the path /mcp, for example, https://develocity.example.com/mcp.

Configure the Develocity Analytics MCP Server using the path /drv-mcp appended to either your Develocity instance URL (if using Athena Data Export) or your Reporting Kit instance URL. For example, https://develocity.example.com/drv-mcp or https://reporting-kit.example.com/drv-mcp.

  • Claude Code CLI

  • GitHub Copilot (IntelliJ IDEs)

  • GitHub Copilot (Visual Studio Code)

  • Gemini CLI

  • Gemini in Android Studio

  • Claude Desktop (via mcp-proxy)

Use the Claude Code CLI to add the MCP servers (guide):

claude mcp add --transport http develocity --scope user <base-url>/mcp --header "Authorization: Bearer <Develocity Access Key>"
claude mcp add --transport http develocity-analytics --scope user <base-url>/drv-mcp --header "Authorization: Bearer <Develocity Access Key>"

Use the GitHub Copilot plugin for IntelliJ IDEs to connect to the MCP servers (guide):

mcp.json
{
  "servers": {
    "develocity": {
      "type": "http",
      "url": "<base-url>/mcp",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer <Develocity Access Key>"
        }
      }
    },
    "develocity-analytics": {
      "type": "http",
      "url": "<base-url>/drv-mcp",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer <Develocity Access Key>"
        }
      }
    }
  }
}

Use GitHub Copilot for Visual Studio Code to connect to the MCP servers (guide).

Using inputs is recommended to avoid hardcoding the Develocity access key within the JSON configuration. You will be prompted for your access key the first time you start the server.

mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "develocity-access-key",
      "description": "Develocity Access Key",
      "password": true
    }
  ],
  "servers": {
    "develocity": {
      "type": "http",
      "url": "<base-url>/mcp",
      "headers": {
        "Authorization": "Bearer ${input:develocity-access-key}"
      }
    },
    "develocity-analytics": {
      "type": "http",
      "url": "<base-url>/drv-mcp",
      "headers": {
        "Authorization": "Bearer ${input:develocity-access-key}"
      }
    }
  }
}

Add the following JSON configuration to your Gemini settings file, typically located at ~/.gemini/settings.json. More details can be found in the documentation.

settings.json
{
  "mcpServers": {
    "develocity": {
      "httpUrl": "<base-url>/mcp",
      "headers": {
        "Authorization": "Bearer <Develocity Access Key>"
      }
    },
    "develocity-analytics": {
      "httpUrl": "<base-url>/drv-mcp",
      "headers": {
        "Authorization": "Bearer <Develocity Access Key>"
      }
    }
  }
}

Use Gemini in Android Studio to connect to the MCP servers (guide):

mcp.json
{
  "mcpServers": {
    "develocity": {
      "httpUrl": "<base-url>/mcp",
      "headers": {
        "Authorization": "Bearer <Develocity Access Key>"
      }
    },
    "develocity-analytics": {
      "httpUrl": "<base-url>/drv-mcp",
      "headers": {
        "Authorization": "Bearer <Develocity Access Key>"
      }
    }
  }
}

Claude Desktop doesn’t support connecting to MCP servers using an access key for authentication, which is required by the Develocity MCP servers. To use the MCP servers with Claude Desktop, configure a local MCP proxy that converts the streamable HTTP API into the STDIO protocol.

A popular proxy server for this purpose is mcp-proxy.

Gradle isn’t affiliated with or involved in the development of mcp-proxy.

Please ensure that any third-party software you install complies with your organization’s security policies.

Once mcp-proxy is installed, modify the Claude Desktop configuration file (Developer  Edit Config in settings) with the following, replacing <base-url> and <Develocity Access Key>:

{
  "mcpServers": {
    "develocity": {
      "command": "mcp-proxy",
      "args": [
        "--transport",
        "streamablehttp",
        "--stateless",
        "<base-url>/mcp"
      ],
      "env": {
        "API_ACCESS_TOKEN": "<Develocity Access Key>"
      }
    },
    "develocity-analytics": {
      "command": "mcp-proxy",
      "args": [
        "--transport",
        "streamablehttp",
        "--stateless",
        "<base-url>/drv-mcp"
      ],
      "env": {
        "API_ACCESS_TOKEN": "<Develocity Access Key>"
      }
    }
  }
}

Other Clients

The Develocity MCP servers follow the standard MCP protocol and will work with any clients that support:

  • Remote MCP servers

  • Streamable HTTP transport

  • Bearer authentication with static credentials

Usage Tips

After testing the MCP servers against a variety of different models, our recommendation is to use the latest or frontier version of your selected model where possible.

Testing has shown the "light" versions of these models are capable of basic analysis, however they’re more prone to making mistakes and generally provide worse results than the frontier versions of the models.

Avoiding Common Issues With LLMs

When using the Develocity Analytics MCP Server, briefly inspect the SQL queries submitted by the LLM to the MCP server to catch obvious errors.

Long conversations with many different lines of questioning or analysis may lead to the model’s responses becoming gradually worse. Consider starting a new session or clearing the model’s context to fix this when it happens.

Authentication Troubleshooting

Authentication or access key errors may be interpreted by client applications as a trigger to initiate the OAuth access flow. If you begin to see messages or errors related to authentication or OAuth, verify that your access key configuration is correct, the key is valid, and the associated Develocity user has the required permissions.

Some clients may need a restart for MCP configuration to be correctly updated.

Example Usage

Develocity MCP Server

Here are some example prompts you can use with Develocity MCP Server:

  • What are the most flaky tests from this week?

  • What different kinds of failures happened on CI on my branch?

  • What was the cause of the most recent failed build?

  • How can I make builds for this project faster?

Develocity Analytics MCP Server

Here are some example prompts you can use with Develocity Analytics MCP Server:

  • Are any projects using a version of log4j earlier than 2.17.1?

  • Which projects are using a non-LTS JDK version?

  • What tasks should I prioritize fixing to stabilize my CI builds?

  • Can you identify whether some users are impacted more by locally failing builds than others?

  • What’s the typical configuration time for local builds?

  • Which are the longest-running tasks in my CI builds?

  • What are the top 5 slowest builds in the last week?