All data in Parasoft DTP can be integrated with AI-powered development tools through the built-in MCP Server, which implements the Model Context Protocol (MCP).

For example, GitHub Copilot or Claude Code can use this integration to retrieve data such as:

  • static analysis violations
  • test execution results
  • failed tests

This enables developers to leverage agentic capabilities of LLM to analyze data from DTP and perform tasks.

This functionality is only supported with a DTP license that has "MCP Server" feature.

See the sections below for available MCP tools and example prompts. See Configuring Your MCP Tool for information about configuring your client to access DTP as an MCP server.

MCP Tools Available in DTP

The following tools are available. You can also see a list of available tools in your IDE.

Informational

  • getInfo: Returns DTP server's build version and machine ID.

Filters and Builds

  • getBuild: Returns the latest build.
  • getFilter: Returns a filter ID that corresponds to the provided filter name.

Tests

  • getTestCountResults: Returns test count results for a given build and filter.
  • getFailedTestCases: Returns a list of failed or incomplete test cases.
  • getTestCasesHistory: Provides more details about failed tests. Retrieves the history of test cases based on provided test case IDs and the specified filter ID.
  • getFailedTestCasePredictedLabels: Provides more details about failed tests. Returns a map of test case IDs to their predicted labels for the provided test cases.

Static Analysis

  • getViolations: Returns information about static analysis violations for given filter and build. Supports two output modes: Summary mode, which returns number of violations grouped by severity, and Detailed mode, which returns detailed information for violations by severity, by rule, or for certain files.

Example Prompts

The following table provides some example prompts that you might use with your AI-powered code editing tool, once you have configured it to use DTP as an MCP server, to satisfy common use cases. Notice that you do not have to specify the tools you want to use by name; the AI will usually figure it out from your plain-language request. If it's struggling with this, it can be helpful to use words that point it toward the tool you expect it to use.


Use Case: You want to...Example PromptNotes
1Verify connection to DTP MCP Server"Get the DTP server information."
2Get high-level test results"What are the test results for my-filter?"Replace "my-filter" with the name of your filter in DTP.
3Get insights about test failures"Please provide more details about my failed tests."This is a follow-up prompt to use case 2.
4Get high-level static analysis results"What are the violations for my-filter?"Replace "my-filter" with the name of your filter in DTP.
5Apply a policy to static analysis results"My policy is zero severity 1 and severity 2 violations. Can you tell me if my policy is met for my-filter in a graphical way inside this chat? The only columns should be Filter, Policy, and Policy Met."This is a follow-up prompt to use case 4.
6Get assistance fixing a static analysis violation"Can you suggest a fix for the violation in this opened file? Get the info for the violation for my-filter. Use the rule documentation as it may contain useful information."

This prompt assumes that you have a file with a violation open in your IDE.

Replace "my-filter" with the name of your filter in DTP.

  • No labels