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.
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.
bun install mcp-test-client
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.
The MCPTestClient
class provides methods to interact with the MCP server, including init()
, listTools()
, callTool()
, assertToolCall()
, and cleanup()
.
MIT
Contributions are welcome through pull requests.
crazyrabbitLTC/mcp-test-client
January 2, 2025
March 11, 2025
TypeScript