Get the FREE Ultimate OpenClaw Setup Guide โ†’

xk6-infobip

k6 extension for Model Context Protocol (MCP) integration

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio infobip-xk6-infobip-mcp npx -y infobip-xk6-infobip-mcp

How to use

This MCP server extension provides a JavaScript API for interacting with MCP servers via k6. It enables performance testing by creating MCP clients, invoking tools on the server, and managing connections within your load tests. Use the NewClient function to establish a connection to your MCP endpoint, callTool to execute server-side tools with a structured set of arguments, and closeConnection when youโ€™re finished to clean up resources. The extension is designed to work with any MCP-compliant server and is particularly aligned with Infobip MCP deployments, though it can be used against any MCP endpoint that follows the MCP protocol.

Within your test script, you initialize a client with endpoint, timeout, transport mode (SSE or HTTP), and optional headers for authentication or custom content types. You can then call a specific tool by name and supply the required parameter object. The client returns the tool response, which you can log or assert against in your test. Remember to close the connection after each virtual user iteration or as appropriate for your scenario to avoid resource leaks. The API exposes metrics for tool call duration, total calls, success and error rates, as well as standard HTTP metrics gathered by k6.

How to install

Prerequisites:

  • Go installed on your machine (for building with xk6)
  • A working Go toolchain and environment
  • Access to the internet to fetch modules

Step-by-step installation:

  1. Install the xk6 tool to build a custom k6 binary with the MCP extension:
go install go.k6.io/xk6/cmd/xk6@latest
  1. Build a custom k6 binary with the xk6-infobip-mcp extension:
xk6 build --with github.com/infobip/xk6-infobip-mcp
  1. Verify the build and ensure the custom k6 binary is executable (the binary will be named k6 in your current directory unless you rename it).
./k6 version
  1. Prepare your test script (e.g., script.js) and run it with the custom binary:
./k6 run script.js

Notes:

  • Ensure you have network access to the MCP endpoint you intend to test.
  • If you need authentication, configure headers in the NewClient config as shown in the README example.

Additional notes

Tips and caveats:

  • The extension is designed to work with MCP servers following the standard MCP protocol. If your server uses a non-standard endpoint path or requires a specific transport, configure isSSE and headers accordingly.
  • Monitor MCP-specific metrics (mcp_call_duration, mcp_calls, mcp_success, mcp_errors) along with standard http metrics to diagnose performance bottlenecks.
  • When using SSE transport (config.isSSE = true), be aware of long-lived connections and potential timeouts; adjust the timeout accordingly in the client configuration.
  • If you encounter connection errors, verify endpoint URLs, TLS settings, and that the server permits the required HTTP methods and headers.
  • Cache or reuse clients where appropriate to reduce connection overhead in high-VU scenarios, but ensure tests donโ€™t carry over state across iterations unexpectedly.

Related MCP Servers

mcp-for-beginners

14.5k

This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.

mcp-language

1.5k

mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.

sandbox

99

A Model Context Protocol (MCP) server that enables LLMs to run ANY code safely in isolated Docker containers.

CanvasMCPClient

67

Canvas MCP Client is an open-source, self-hostable dashboard application built around an infinite, zoomable, and pannable canvas. It provides a unified interface for interacting with multiple MCP (Model Context Protocol) servers through a flexible, widget-based system.

litemcp

7

A minimal, lightweight client designed to simplify SDK adoption into MCP

MCPlex-AI-v1.0

7

๐— ๐—ผ๐—ฑ๐—ฒ๐—น ๐—–๐—ผ๐—ป๐˜๐—ฒ๐˜…๐˜ ๐—ฃ๐—ฟ๐—ผ๐˜๐—ผ๐—ฐ๐—ผ๐—น (๐— ๐—–๐—ฃ) ๐—•๐—ฎ๐˜€๐—ฒ๐—ฑ ๐—–๐—Ÿ๐—œ ๐—”๐—œ | ๐—ง๐—ผ๐—ผ๐—น ๐—œ๐—ป๐˜๐—ฒ๐—ด๐—ฟ๐—ฎ๐˜๐—ถ๐—ผ๐—ป | ๐—š๐—ฒ๐—บ๐—ถ๐—ป๐—ถ ๐Ÿฎ.๐Ÿฌ

Sponsor this space

Reach thousands of developers โ†—