mcp-client

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

65
2

MCP Client

An MCP client for Node.js designed to simplify interaction with MCP servers.

[!TIP]
Tested with FastMCP.

Why?

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).

Usage

The client can connect to an MCP server using stdio or SSE. It supports core MCP functionalities such as:

  • Pinging the server (client.ping()).
  • Calling tools with or without custom result schemas (client.callTool()).
  • Listing tools and resources (client.getAllTools(), client.getAllResources()).
  • Reading resources (client.getResource()).
  • Managing prompts (client.getPrompt(), client.getAllPrompts(), client.complete()).
  • Setting the logging level (client.setLoggingLevel()).
  • Listing resource templates (client.getAllResourceTemplates()).
  • Receiving logging messages via events (client.on("loggingMessage", ...)).

Repository

PU
punkpeye

punkpeye/mcp-client

Created

March 11, 2025

Updated

March 28, 2025

Language

TypeScript

Category

Developer Tools