C/C++test includes an MCP (Model Context Protocol) Server extension that enables seamless integration between C/C++test and AI agents or LLM-based coding assistants (such as GitHub Copilot). This MCP Server can be used within any LLM-enabled development environment that supports MCP integration, including Eclipse and other environments. With this extension, an AI agent can interact directly with C/C++test, delivering context-aware guidance, analysis, and automation.
This extension allows you to use an AI coding assistant to:
With this extension, AI coding agents can also autonomously execute static analysis and fix detected violations in CI/CD pipelines. See Fixing Violations Using AI Coding Agents.
The MCP server launcher is located in the <INSTALL_DIR>/integration/mcp directory.
The Parasoft MCP server uses the stdio transport protocol exclusively. Parasoft MCP tools do not access any external systems or services. |
The get_relevant_rules and search_documentation MCP tools require Java 21.See MCP Server Tools Reference for more details. |
The following procedure demonstrates how to integrate an LLM-based agent (using Copilot as an example) with C/C++test.
<INSTALL_DIR>/integration/mcp/cpptestmcp.exeAfter configuring the MCP server, you can use the provided MCP tools in Copilot Chat.
Example prompts:
Consider using instruction files to explicitly describe your project structure (for example, the location of the report.xml file) or to define more complex workflows.
In some cases, Copilot does not invoke Parasoft MCP tools. To ensure that Parasoft MCP tools are called, you can add custom instructions.
In the Copilot Chat window, click your profile picture, and click Personal instructions.
Add natural language instructions to the text box, for example:
When analyzing a report containing violations, use the get_violations_from_report_file tool to review the report and provide insights or suggestions based on the findings. Use the get_rule_documentation tool to get information about the violations, their severity, and possible remediation steps. |
| Tool | Description | Notes |
|---|---|---|
| get_relevant_rules | Returns a list of static analysis rules matching the user query. Each entry contains the rule header and a comma-separated list of corresponding rule identifiers. | |
| get_rule_documentation | Returns the documentation for the static analysis rule together with a path to the original documentation file for reference. | An exact rule ID must be provided, for example, BD-PB-ARRAY. |
| get_violations_from_report_file | Extracts violations from a report XML file and outputs them in JSON format along with key details. Results are refined using optional filters: rule ID, severity and source file name. | An absolute path to the report XML file must be provided. The server must have local access to the file. Alternatively, you can use the Copy action in the Quality Tasks View to copy selected violation descriptions to the clipboard and paste them into the Copilot Chat window to request fixes. |
| count_violations_in_report_file | Extracts violations count from a report XML file and returns it in JSON format. Results are refined using optional filters: rule ID, severity and source file name. | An absolute path to the report XML file must be provided. The server must have local access to the file. |
| search_documentation | Searches the documentation to retrieve relevant pages matching the user query. Returns the content of each page and its source URL. To search static analysis rule documentation, use get_rule_documentation or get_relevant_rules tools. |