mcp-test-client

The MCP Test Client is a testing utility for Model Context Protocol servers, offering an easy interface to test server implementations by making tool calls and validating responses with type-safe assertions.

10
0

MCP Test Client

This is a testing utility for Model Context Protocol (MCP) servers. It assists in testing MCP server implementations by providing a straightforward interface for making tool calls and validating responses.

Features

  • User-friendly testing interface for MCP servers.
  • Built-in support for listing tools and making tool calls.
  • Type-safe implementation using TypeScript.
  • Assertion utilities for validating server responses.
  • Mock calculator server implementation for examples.

Installation

bun install mcp-test-client

Usage

The client can be used to list available tools and assert tool calls. The package includes a mock calculator server for testing and learning purposes.

API Reference

The MCPTestClient class provides methods to interact with the MCP server, including init(), listTools(), callTool(), assertToolCall(), and cleanup().

Development

Prerequisites

  • Bun (v1.0.0 or higher)

License

MIT

Contributing

Contributions are welcome through pull requests.

Repository

CR
crazyrabbitLTC

crazyrabbitLTC/mcp-test-client

Created

January 2, 2025

Updated

March 11, 2025

Language

TypeScript

Category

Developer Tools