Responsive

Building AI-Assisted Test Workflows with Testkube MCP and GitHub Copilot

Aug 28, 2025
read
Atulpriya Sharma
Sr. Developer Advocate
Improving
Read more from
Atulpriya Sharma
Atulpriya Sharma
Sr. Developer Advocate
Improving
Transform your testing workflow with Testkube MCP Server and GitHub Copilot. Execute tests, analyze failures, and generate fixes using natural language. Step-by-step setup guide included.

Table of Contents

See Why DevOps Leaders Choose Testkube for Continuous Testing

See Why DevOps Leaders Choose Testkube for Continuous Testing

Subscribe to our monthly newsletter to stay up to date with all-things Testkube.

You have successfully subscribed to the Testkube newsletter.
You have successfully subscribed to the Testkube newsletter.
Oops! Something went wrong while submitting the form.
Aug 28, 2025
read
Atulpriya Sharma
Sr. Developer Advocate
Improving
Read more from
Atulpriya Sharma
Atulpriya Sharma
Sr. Developer Advocate
Improving
Transform your testing workflow with Testkube MCP Server and GitHub Copilot. Execute tests, analyze failures, and generate fixes using natural language. Step-by-step setup guide included.

Table of Contents

Back in the day, debugging a failed test meant diving into long log files, manually correlating the error messages with the source code, and spending hours trying to figure out what happened. Fast-forward to today, and we can just ask AI to do it for us, and that too in a few minutes instead of hours!

Testing is evolving extraordinarily - not as fast as dev or ops practices - but we’ve moved from manual testing to automated test suites, from siloed testing to cloud native testing frameworks running in Kubernetes.

Today, we’re in a new era of testing using AI. AI assistants can write code, explain complex concepts, and debug applications. But the catch was that most AI assistants couldn’t integrate without testing infrastructure. That’s where the Model Context Protocol (MCP) comes in to bridge the gap between AI assistants and our testing tools.

In this blog post, we’ll examine the Testkube MCP Server and understand how we can enhance our testing practices by using it in conjunction with GitHub Co-Pilot. 

Model Context Protocol - A Primer

Traditionally, most AI assistants could analyze your queries and respond to them. For instance, GitHub Co-Pilot could analyze your code and provide suggestions, but it couldn’t directly interact with your infrastructure. You had to copy-paste the code that Co-Pilot gave into a terminal and execute the command. AI only offered advice, but you still had to do the work. 

With MCP, this changed fundamentally. It provides a standardized and secure way for AI assistants to connect with external apps and services. It’s a universal translator that allows your AI to “speak” to your tools, whether they’re testing, deployment, or monitoring infrastructure.

MCP has three core components:

  • MCP Client: Your AI assistant (like Claude, GitHub Co-Pilot)
  • MCP Server: The bridge connects your MCP client with tools
  • Resources & Tools: The actual capabilities exposed to the AI

Below is a sequence diagram showing how MCP servers work.

When you ask Copilot to "run my tests," the MCP client makes a call to the MCP server that translates the request into the appropriate API calls, executes them, and returns the results back to the AI in a format it can understand and act upon.

Benefits:

  • Natural language interfaces to complex tools instead of memorizing CLI commands.
  • Contextual awareness of your infrastructure, as AI can now see your code and infrastructure simultaneously.
  • Unified workflow across multiple systems without context switching

For a deeper dive into MCP architecture and implementation details, check out Anthropic's MCP documentation.

Testkube MCP Server

Testkube is a cloud native testing framework that orchestrates everything from Postman collections to K6 performance tests. With the introduction of Testkube MCP Server, it extends its capabilities into conversational AI. It transforms how developers interact with their testing infrastructure by allowing developers to use natural language to control Test Workflows, identify root causes, and analyze logs. 

Below are some of the benefits of Testkube MCP Server:

  • Direct Test Execution: Allows developers to execute Test Workflows using natural language directly. Eg “Run the Online shopping smoke Test Workflow”
  • Intelligent Result Analysis: It can analyze execution logs, failure reports, and provide contextual insights about what went wrong.
  • Real-time Infrastructure Awareness: The Testkube MCP server provides real-time visibility into your testing infrastructure, including pod status, logs, and execution history.

Learn more about Testkube MCP Server capabilities in the official documentation.

Hands-On Demo of Testkube MCP Server

Having learnt about the Testkube MCP Server, let us now build a scenario to showcase the power of Testkube MCP Server with GitHub Co-Pilot. 

We’ll deploy a simple calculator service that exposes REST API endpoints for basic mathematical operations. We will introduce a subtle bug in the /add endpoint that multiples the numbers instead of adding them. We’ll then use the Testkube MCP server to execute a Test Workflow to test the /add endpoint, detect the failure from the logs, pinpoint the exact root cause in the source code, and raise a PR that fixes this issue. 

Prerequisites

Before diving into the demo, ensure you have the following components set up:

Infrastructure Requirements:

  • Kubernetes Cluster: A running cluster (minikube, kind, or cloud-managed cluster)
  • Testkube Installation: Testkube is deployed and configured in your cluster
  • kubectl Access: Configured to communicate with your cluster

Development Environment:

  • Visual Studio Code: Latest version installed
  • GitHub Copilot Pro: Subscription and extension installed in VSCode
  • Testkube MCP Server: Configured and connected to VSCode - reference

Application Components:

  • Calculator Microservice: Our demo app with the intentional bug deployed to Kubernetes
  • Test Workflow Definition: Postman-based test that validates the /add endpoint
  • Source Code Access: Calculator service code available in your VSCode workspace

You can find the code for this use case in this Testkube MCP Server demo repo.

Setting Up Testkube MCP Server

Launch VS Code, click on the “Search” panel and hit Ctrl + Shift + P and in the drop down, choose “MCP: Open User Configuration”. This will open the mcp.json file. 

Modify your mcp.json and add the following lines.

{
  "servers": {
    "testkube": {
      "command": "testkube",
      "args": [
        "mcp",
        "serve"
      ],
      "type": "stdio"
    }
  },
  "inputs": []
}

Restart VS Code for the changes to take effect.

Configure Agent Mode 

In VSCode, open GitHub CoPilot and switch to the agent mode.

Post this, ask Copilot to validate if it can see the Testkube MCP Server configured or not.

We can see that CoPilot can see the Testkube MCP server configured. We can also ask it to list all the Test Workflows currently in our Testkube account.

Executing Test Workflow

After validation, ask CoPilot to execute the Postman Test Workflow that we’ve written to validate the /add  endpoint. 

Validating Execution

Once the Test Workflow is executed, the Testkube MCP server can access the execution report and list the execution's status. Since our code has a bug, you can see that the /add Test Workflow has failed. 

If you observe closely, it also performed the root cause analysis and told where exactly the issue is. 

Applying Fix

Now that it has identified the exact issue in the code, we can ask it to fix it as well. As you can see in the screenshot below, it has changed the code from return a * b to return a + b.

Raising the PR

Once the fix is provided, CoPilot can also use the underlying GitHub MCP server and raise a PR to fix this issue in the repo. 

It also generates relevant and detailed comments for the PR that explain the problem, solution, files changed, and even how to test the changes. 

You can confirm if the PR was raised or not by visiting the GitHub repo

We have successfully used the Testkube MCP server with VS Code and GitHub Copilot. In this demo, we saw how it could identify the failure of the Test Workflow, provide a fix, and even raise a PR. Further, if there’s an issue with the Test Workflow, it can fix that and do the same things. 

Summary

In this post, we got a glimpse of how developers will interact with their testing infrastructure in the future. Using Testkube’s cloud native testing capabilities with the conversational abilities of GitHub CoPilot through Testkube MCP Server, we’ve minimized the time from identifying problems to fixing them. 

The Testkube MCP Server isn't just about making testing faster – it's about making testing more intelligent and accessible. Junior developers get the debugging insights of senior engineers, senior engineers can focus on architecture instead of log analysis, and everyone benefits from the reduced cognitive load of conversational interfaces.

The future of testing isn't just automated -  it's conversational, intelligent, and seamlessly integrated into the natural flow of software development. And with tools like Testkube MCP Server, that future is available today.

Check out the our Testkube MCP Server documentation, and follow the setup guide to get started with it in your own environment.

About Testkube

Testkube is a test execution and orchestration framework for Kubernetes that works with any CI/CD system and testing tool you need. It empowers teams to deliver on the promise of agile, efficient, and comprehensive testing programs by leveraging all the capabilities of K8s to eliminate CI/CD bottlenecks, perfecting your testing workflow. Get started with Testkube's free trial today.