This repository provides a convenient Node.js client for the Model Context Protocol (MCP), abstracting away complexities and offering a more user-friendly API for interacting with MCP servers. This repository provides
An MCP client for Node.js designed to simplify interaction with MCP servers.
[!TIP]
Tested with FastMCP.
This client offers a more convenient API compared to the MCP TypeScript SDK by abstracting away complexities like pagination and Zod schemas. It also uses more idiomatic TypeScript method names (e.g., getTools
instead of listTools
).
The client can connect to an MCP server using stdio
or SSE. It supports core MCP functionalities such as:
client.ping()
).client.callTool()
).client.getAllTools()
, client.getAllResources()
).client.getResource()
).client.getPrompt()
, client.getAllPrompts()
, client.complete()
).client.setLoggingLevel()
).client.getAllResourceTemplates()
).client.on("loggingMessage", ...)
).punkpeye/mcp-client
March 11, 2025
March 28, 2025
TypeScript