July 15th, 2025 by Adam Sandman
In this blog series we are introducing our new MCP Server for Spira, and demonstrating how you can use it to turbocharge your development processes. Model Context Protocol (MCP) is a new technology for connecting AI tools with backend services. This is the fifth and final article in the series, that demonstrates in detail some of the specific use cases that you can use the Spira MCP Server for. In the previous article we looked at using the Workspaces and Artifacts MCP tools, in this article we'll look at the Automation tools in depth.
Using the Automations Feature
Following on using the Workspaces and Program/Product Artifacts features in the previous article, we will now explore using the "Automations" MCP feature. For example, as a user I might want to report back the results of a CI/CD software build to Spira, or record the results of an automated test. I can of course do these manually using the Spira REST API, but MCP makes this process so much simpler:
Recording a Test Result
First, lets try recording a new test result in Spira using our MCP Server:
So in this question I tell Cline that I want to record a failed test result against a specific test case (TC:5) that lives in a specific Spira product (PR:1). I also provide the details of the test failure, including the number of errors and a brief description of what was reported. Based on this information, Cline is able to work out that it should be using the record_automated_test_run MCP tool, and that it has all the necessary information:
I need to record a new test result in Spira for a specific test case. Let me analyze what I need to do:
1. The user wants to record an automated test run in Spira
2. The test case is TC:5 in project PR:1
3. The test name is "logging in to the system"
4. The test should be marked as failed with 1 error
5. The reason for the error is that a page was missingLooking at the available MCP tools, I can see that the "inflectra-spira" server has a tool called "record_automated_test_run" which seems perfect for this task. Let me check the required parameters for this tool:
- product_id: The numeric ID of the product. The user mentioned PR:1, so I should use 1.
- test_name: The name of the test being run. This is "logging in to the system".
- short_message: A short description of the result. I can use "Test failed - page missing".
- long_message: The full description. I can use "The test failed because a required page was missing from the system."
- error_count: The number of errors. The user specified 1 error.
- test_case_id: The ID of the test case. The user mentioned TC:5, so I should use 5.
- execution_status_id: The ID of the execution status. Since the test failed, I should use 1 (Failed).I have all the required parameters, so I can proceed with using the tool.
I'll record the failed test result in Spira for test case TC:5 in project PR:1.
As we have seen before, Cline will request our approval to use the appropriate MCP tool (unless we have enabled Auto-approve):
This tool has more extensive parameters than the ones we've seen before, so lets look a bit closer at them:
Note that it has correctly mapped my question into the expected parameters for me. When I Approve the use of the record_automated_test_run tool I will now see this:
Great! The MCP tool has successfully recorded the automated test run in Spira. The result returned is "TR:629", which indicates that a new test run with ID 629 has been created in Spira.
Now I need to complete the task by informing the user that the test result has been successfully recorded. I'll use the attempt_completion tool to present the final result.
Cline now uses the attempt_completion tool to format the answer nicely for me:
If we look inside Spira, we will see that the new test run has been recorded correctly:
It uses the special "MCP Server" as the Automation Engine / Runner Name.
Now if I did not know what the product ID and test case ID were, I could have asked Cline using something like the following instead:
This time Cline needs to analyze my request and see how it can use multiple Spira MCP tools to accomplish what I have asked:
I see that this is a new task, similar to the previous one but with different parameters. The user wants to record a new test result in Spira for a test case called "ability to edit an existing book" in a product called "library information system".
To complete this task, I need to:
1. Find the product ID for "library information system"
2. Find the test case ID for "ability to edit an existing book"
3. Record the test result using the record_automated_test_run toolFirst, I need to get the product ID. I can use the get_products tool to list all products and find the one called "library information system".
It now uses the get_products tool to get the list of products:
Then it needs to get the list of test cases using get_test_cases:
Finally it will use the record_automated_test_run tool to post the results:
using the arguments it deduced from the previous calls:
So this shows you that you don't need to manually use separate MCP tools yourself, you can just ask Cline to solve the problem and it will work out which tools to use in the correct sequence automatically!!
Recording a CI/CD Build Event
Next, lets try recording a new Build CI/CD event in Spira using our MCP Server. This is useful for cases where we want to simulate a new build happening or if we did a build offline and now want to post the results in Spira:
So in this question I tell Cline that I want to record a build entry against a specific Release (RL:4) that lives in a specific Spira product (PR:1). I also provide the details of the build result, including the status of the build (passed) and a brief description of what was reported. Based on this information, Cline is able to work out that it should be using the create_build MCP tool, and that it has all the necessary information:
I need to record a new build entry in Spira for product PR:1 and Release RL:4. The build passed on today's date and included code for implementing the authentication logic.
Looking at the available tools, I can see that there's an MCP server called "inflectra-spira" that provides a tool called "create_build" which seems perfect for this task. Let's analyze the parameters required for this tool:
1. product_id: The numeric ID of the product. The user mentioned PR:1, so I should use 1.
2. release_id: The ID of the release. The user mentioned RL:4, so I should use 4.
3. build_status_id: The status of the build. The user mentioned the build passed, so I should use 2 (Passed).
4. name: The name of the build. I should include the project name and date/time. Since the user didn't specify a project name, I'll use "Authentication Implementation" and today's date.
5. description: The detailed description of the build. The user mentioned it included code for implementing the authentication logic.
6. commits: An optional array/list of the Git hashes of the commits included in the build. The user didn't provide any commit hashes, so I'll use an empty array.I have all the required parameters, so I can proceed with using the create_build tool.
I'll use the MCP tool to record a new build entry in Spira for your product and release.
Note that Cline is making some intelligent decisions, such as how it should name the build, as well as what would be useful to include in the description. It also notices that we didn't include any Git hashes, so the list of commits will be left empty. Based on this analysis it wants to call the Spira MCP tool as follows:
It has correctly filled out the parameters, and which I click Approve, it will create the new build in Spira and make the following observations:
Great! The MCP tool successfully created a new build entry in Spira. The result shows that the build was created with the ID "BL:22". This means the build was successfully recorded in the system with all the details I provided:
1. Product ID: 1 (PR:1)
2. Release ID: 4 (RL:4)
3. Build Status: Passed (build_status_id: 2)
4. Name: "Authentication Implementation Build - 2025-06-20"
5. Description: "This build includes code for implementing the authentication logic."The task has been completed successfully. I'll now use the attempt_completion tool to inform the user of the successful result.
Using the completion tool, it now displays an informative message to let me know it worked successfully:
If we look in Spira, we now see the created Build:
Now if I did not know what the product ID and release ID were, I could have asked Cline using something like the following:
Where I am using the name of the product and the release version number instead of its ID. When I do that, Cline breaks down my request and looks to use multiple Spira MCP tools to accomplish its task:
I see that this is a task resumption, but the user's message has changed. Previously, I was asked to record a build for product PR:1 and Release RL:4, but now I'm being asked to record a build for product "Library Information System" and Release 1.0.0.0.
This is essentially a new task with different parameters. I need to:
1. Record a new build entry in Spira
2. For product "Library Information System"
3. For Release 1.0.0.0
4. The build passed on today's date
5. It included code for implementing the authentication logicTo accomplish this, I need to use the create_build tool from the inflectra-spira MCP server. However, there's a challenge: the create_build tool requires numeric IDs for the product and release, but the user has provided names instead.
I need to first find the product ID for "Library Information System" and the release ID for "1.0.0.0". I should use the get_products tool to find the product ID, and then use the get_releases tool to find the release ID.
Let's start by getting the list of products to find the ID for "Library Information System".
I need to record a new build entry in Spira for the "Library Information System" product. First, I'll need to find the product ID by retrieving the list of available products.
If you look at the bolded text above you can see that Cline has intelligently decided to use the following three MCP tools to complete the task:
- get_products - to get the ID of the product
- get_releases - to get the ID of the release
- create_build - to actually create the build
This is fantastic and means that as a user I don't need to look up IDs or other Spira specific identifiers, but instead I can converse with Cline naturally and it will use whatever tools it needs to accomplish my task.
Conclusion
In this series we have demonstrated how you can setup the Spira MCP Server with an Agentic AI tool such as Cline running in Visual Studio Code (VS Code), and use that server to accomplish a variety of software development and software testing related tasks. Please let us know if you have any questions or are interested in a demonstration of SpiraPlan or Inflectra.ai: