Building custom MCP infrastructure for QA: Why a TestRail integration was the right place to start

Pavlina Bandak

by Pavlina Bandak

Building an MCP Server for TestRail R1hbib9m

AI-assisted engineering workflows have made one thing crystal clear: model capability is only one part of the solution. The real impact is seen when AI operates within the systems where delivery occurs, and many teams still face challenges here. 

While a large language model (LLM) can summarize requirements, suggest test coverage, or generate automation logic, it often cannot operate effectively across the various tools that store a team’s knowledge. Product requirements, test cases, checklists, traceability data, and automation assets are typically spread across separate systems. The intelligence exists, but workflows remain fragmented.

That gap is precisely where Model Context Protocol (MCP) becomes valuable. MCP creates a bridge between AI agents and external systems, allowing natural language requests to trigger operations on APIs, databases, filesystems, and other services. While the concept is straightforward, most teams still lack this ‘bridge’ for their critical delivery tools.

TestRail was one of those gaps.

Teams exploring how agentic AI connects to operational systems in practice can learn more through our AI Innovation Hub.

It explores the infrastructure, workflows, and governance patterns shaping enterprise AI adoption.

Visit AI Innovation Hub

The problem was workflow friction, not model capability

The decision to build a custom MCP server for TestRail began as a practical response to workflow friction: too much time spent manually maintaining test documentation, too much context trapped in separate systems, and too little connectivity between AI agents and the QA environment where that work actually lives. 

 I realized I needed to build our own solution when nothing suitable existed. There was no official TestRail MCP server, most alternatives were closed-source and raised security concerns, and the open-source options felt more like MVPs than production-ready tools. Reviewing them made it clear that building our own MCP was both achievable and worth the effort. 

The hypothesis was that the MCP server would yield a useful internal utility to significantly reduce the time spent in documentation. It went beyond this, becoming a strong example of how custom MCP infrastructure can turn isolated AI assistance into something operational.

The real bottleneck was not writing test cases, but moving context between systems

A lot of discussion around AI in QA focuses on generation: test ideas, cases, automation, and summaries. But in day-to-day delivery, the larger constraint is often not generation itself. It is the effort required to move context between systems, keep documentation synchronized, and make sure the right information reaches the right place in a usable form.

That was the pain point behind this TestRail integration. QA engineers were already using AI to support documentation work, but the process still depended on manually pulling information from one system, reworking it in another, and then updating TestRail by hand. Product requirements changed. Test documentation needed to change with them. The work was necessary, but repetitive, and time-consuming.

This is what makes the TestRail use case strategically interesting. The value did not come from asking AI to replace QA judgment. It came from removing the mechanical work around that judgment. Engineers still review, validate, and co-create the documentation. What changed was the burden of manually executing the update process inside the tool.

TestRail was a strong MCP candidate 

Not every engineering tool is an equally strong candidate for MCP integration. The best starting points tend to share a few characteristics: they contain high-value information, that information is structurally important to delivery, much of it is text-based, and the system already offers stable public APIs.

TestRail matched those conditions well.

Its data is highly relevant to both humans and AI agents. Test cases, coverage information, test steps, and related documentation are all expressed in language, which makes them a strong fit for large language model workflows. Just as importantly, TestRail already exposes mature public APIs that are actively used in other integrations. That matters because the effort of building an MCP server only pays off if the system behind it is stable enough to support long-term operational use.

In other words, the opportunity was not just that AI could read TestRail content effectively. It was that TestRail already had the technical foundations needed to support a reliable bridge between natural language interaction and production workflow operations.

 TestRail made sense as a starting point because its text-based data plays directly to the strengths of large language models. 

Simple in principle, valuable in practice

At a high level, the architecture is simple. There is an AI client, an MCP server, and a TestRail instance.

The client is the interface where a user interacts with the AI, whether that is Cursor, Claude Code, or another AI-native environment. The MCP server sits in the middle and contains the logic for authentication, tool execution, and API interaction. The TestRail instance remains the system of record. A user writes a natural language request, the AI identifies the relevant tool, the MCP server translates that request into the appropriate API call, and the result returns to the user in a conversational form.

That may sound like a thin abstraction layer, but its practical value is much larger than that. It changes how people access and act on test documentation. Instead of learning the structure of the TestRail UI, navigating manually, and performing repetitive updates field by field, teams can retrieve, inspect, and modify testing assets through the same conversational interface they are already using elsewhere in their workflows.

The architectural lesson here is an important one. Custom MCP servers do not need to be conceptually complex to be high-impact. If they remove repeated friction at a critical point in delivery, even a relatively lean service can have disproportionate operational value.

content-flexible- 0

Our AI Innovation Hub includes additional perspectives on building operational AI systems, from agentic workflows and MCP infrastructure to scalable enterprise implementation patterns.

Start with the basics: CRUD over complexity

One of the more telling parts of this implementation is that the most valuable API capabilities were not unusual or experimental. They were the fundamentals of test case management: retrieve information, update existing cases, create new ones, and remove obsolete artifacts.

That is significant because it reframes the starting point: The most useful AI integrations are often not the most ambitious ones. They are the ones that connect a high-frequency workflow to a dependable set of operations. In this case, the core value came from enabling AI to work across the basic CRUD lifecycle of test documentation, because that is where so much of the daily maintenance burden sits.

content-flexible- 1

This is also why the integration proved useful beyond narrow documentation support. Once the MCP server could reliably access and manipulate TestRail content, it became useful for coverage analysis, requirement alignment, and automated test development workflows. The same bridge that helped update a test case could also help an AI agent pull a section of cases and begin implementing automation logic against them.

The move from MCP server MVP to deployed service changed the nature of the problem

The original implementation was built locally, for one user, to validate whether the workflow improvement was real. That is a sensible pattern. It keeps the scope manageable, proves the value quickly, and avoids overengineering too early.

But, as we found out, what works as a local tool does not automatically work as a shared service.

Once the MCP server was deployed and adoption expanded, the architectural requirements changed. User management became necessary. Authentication needed to be more robust than a single set of credentials stored locally. Integration expectations widened. The system also had to support usage patterns beyond the original developer’s own environment.

The difficult transition was not from “no AI” to “AI.” It was from “single-user helper” to “multi-user operational service.” That is the point where an integration stops being a personal productivity win and starts behaving like shared infrastructure.

 I initially built the MCP server as a personal tool to test whether it could meaningfully reduce the time spent on documentation. At that stage, I was using Cursor as my primary client, and within that setup, the integration worked exactly as intended. 

Interoperability turned out to be harder than the basic implementation

One of the more revealing lessons was not about the core logic of the MCP server itself. These lessons were learned when other people started using it in different environments.

That exposed a common misconception around early MCP adoption: that once a server conforms to the protocol, clients will behave consistently. In reality, different MCP clients may support the protocol differently or impose their own integration constraints. A local implementation that works well in one setup may require additional refinement before it behaves reliably across a broader set of tools and user types.

 The real turning point came when the tool moved beyond my own setup. Once people started connecting through different MCP clients, it became clear that protocol support was not as universal as I had assumed. Then deployment introduced a second lesson: a local single-user tool and a shared multi-user service are fundamentally different things. 

This matters because it points to a more mature way of thinking about MCP. The server is not the whole product. The usable product is the combination of server behavior, client compatibility, deployment model, authentication design, and ease of setup. Underestimate this and you’ll mistake a working prototype for a deployable capability.

The same applies to multi-user support. Once more, people use the system, questions of credentials, ownership, traceability, and access control become far more important. In this case, one of the non-negotiables was that users should operate through their own TestRail credentials rather than a shared account. That was a security and accountability decision. In collaborative QA workflows, knowing who made a change, when, and why, matters.

The strongest proof of value was speed, but the broader effect was organizational

For daily test documentation work, the MCP server effectively doubled QA engineers’ speed. But the broader effect may be even more important. 

 What surprised me most was not how the MCP server was used, but who started using it. I expected engineers to adopt it, but not the level of interest from product owners and managers. That was the moment it became clear that a good abstraction does more than help developers. It opens the service to a much broader audience. 

Once access to TestRail data became conversational and low-friction, people outside QA began using it too. Product roles and managers engaged with testing information more directly. Developers could use test cases more easily when diagnosing regressions. TestRail stopped being a specialist interface and became a more accessible source of product knowledge.

That is a meaningful shift. A well-designed abstraction layer does not just make an expert faster. It broadens participation. It allows more of the organization to engage with the underlying system without needing to master the system itself.

This is one of the clearest strategic implications of custom MCP work. The value is not limited to workflow compression inside one team. It can also change who is able to access operational knowledge, and how easily that knowledge moves across functions.

In some cases, test documentation becomes the most reliable source of truth

One of the most interesting use cases is not about editing test cases at all, it is about retrieval.

In large projects, formal requirements are not always the easiest or most reliable place to understand how a feature currently behaves. Requirements may be scattered, outdated, or difficult to locate. Test cases, by contrast, are often kept closer to reality because they are exercised repeatedly through manual checks and automated runs. In that context, TestRail can serve as living documentation.

That makes the MCP integration more strategically useful than a narrow QA tool. It turns TestRail into a queryable knowledge layer for the wider team. An AI agent can retrieve current behavior, summarize likely coverage, identify gaps, and help teams reason about the product using the testing artifacts already being maintained.

This is a strong example of a broader pattern in enterprise AI. Some of the highest-value AI integrations do not create new knowledge. They unlock operational access to knowledge that the business already has, but cannot use efficiently enough.

The right starting point is not a platform vision, but a narrow operational problem

There is a useful discipline in how this was built. It did not begin with an attempt to create a universal QA intelligence layer. It began with a straightforward decision: solve one painful workflow first.

That is the most practical lesson: Start with a small MVP. Choose one clear operational problem. Put the server into real use. Then let actual usage reveal what needs to come next. This matters because early MCP work can easily become overframed. Teams start thinking in terms of future ecosystems, cross-platform orchestration, or broad internal AI platforms before they have proven that a single integration improves real work. The more durable path is to begin with immediate friction, deliver a useful bridge, and expand only once the workflow value is visible.

In this case, that path has worked well. The solution started local, proved itself, expanded across departments, and is now being considered as part of a broader internal AI infrastructure. 

content-flexible- 8

What this points to next

The long-term implication is not limited to TestRail. The same pattern can be applied anywhere a company relies on structured, high-value information stored in third-party systems with usable APIs.

That includes engineering systems, but it does not stop there. The broader idea is that many businesses already have the data they need. What they lack is a practical conversational bridge between AI and the systems where that data lives. MCP, or similar integration patterns, can provide that bridge.

But as usage expands, they take on a different role. What starts as a lightweight connection becomes part of how teams access, trust, and act on information. At that point, the integration shifts from optional infrastructure to an operationally significant tool. The value is not in connecting AI to a system, but in making that connection dependable enough to support daily work.

 Teams that adopt agentic workflows early will gain a significant competitive advantage in how they leverage their human capital. While other teams are still bogged down by mechanical tasks, these early adopters are already operating at a higher level of efficiency. Because the AI handles certain orchestrations, the team can focus entirely on innovation and long-term strategy. And this directly influences talent attraction and retention. 

Explore more thinking on agentic systems, AI-enabled delivery workflows, and enterprise AI infrastructure through our AI Innovation Hub.

FAQs

MCP (Model Context Protocol) is a standardized bridge between an AI agent and external systems such as databases, filesystems, and APIs. In practice, the AI agent acts as a client that connects via the protocol to an MCP server. That server contains the specific logic needed to authenticate with and interact with an external tool - in this case, TestRail. When a user makes a natural language request, the MCP server translates it into the appropriate API call, retrieves the data, and returns it to the user in a conversational format. The result is that engineers can interact with their tools without leaving their AI workflow.

Share

Building an MCP Server for TestRail R5dkbib9m
Pavlina Bandak
Engineering Manager, Quality Assurance

Pavlina is a Quality Assurance Engineering Manager with more than a decade of experience in software quality assurance, test automation, and team leadership. She has led QA initiatives across embedded systems, web platforms, and enterprise applications, helping teams build reliable and scalable products. Throughout her career, Pavlina has combined strong technical expertise with stakeholder communication, cross-functional collaboration, and leadership in international environments.

Harness the future of technologies

Star uses top-notch technology solutions to create innovative digital experiences for our clients.

Explore our work
Loading...