1. Conduid
  2. AI
  3. Client Kit
MCP server · AI

Client Kit

TypeScript/Node.js client library for connecting to multiple MCP (Model Context Protocol) servers

37Low

Scored 6 months ago · breakdown

About Client Kit

Client Kit is an MCP server in the AI category: typeScript/Node.js client library for connecting to multiple MCP (Model Context Protocol) servers.

Install

Claude Code
claude mcp add client-kit -- npx -y mcp-client-kit
npx
npx -y mcp-client-kit

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Client Kit

Powered by Claude · Grounded in docs

I know everything about Client Kit. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

MCP Client Kit

npm version npm downloads

mcp-client-kit A TypeScript/Node.js client library for connecting to multiple Model Context Protocol (MCP) servers and aggregating their capabilities through a unified interface.

Features

  • Multi-Server Support: Connect to multiple MCP servers simultaneously
  • Multiple Transport Protocols: Support for SSE, HTTP Streaming, and stdio transports
  • JSON-RPC 2.0: Full JSON-RPC 2.0 protocol implementation
  • Aggregated API: Unified interface to interact with all connected servers
  • TypeScript: Full TypeScript support with type definitions
  • Authentication: Built-in support for Bearer token authentication

Installation

npm install mcp-client-kit

Quick Start

1. Create Configuration File

Create a mcp_servers.json file in your project root:

{
  "mcpServers": {
     "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "d:/DevSpaces/MNTWS/CVAWS"
      ]
    },
    "canva-dev": {
      "command": "npx",
      "args": ["-y", "@canva/cli@latest", "mcp"]
    },
    "leo-sse-mcp": {
      "type": "sse",
      "url": "http://localhost:3000/sse",
      "headers": {
        "Authorization": "Bearer leo-dGluaHRkLmluZm9AZ21haWwuY29t"
      }
    }
  }
}

2. Use the Client

import { McpClient } from 'mcp-client-kit';
import * as path from 'path';

async function main() {
  // Initialize the client
  const configPath = path.join(process.cwd(), 'mcp_servers.json');;
  const client = new McpClient(configPath);

  try {
    // Connect to all servers
    await client.connect();

    // List all available tools from all servers
    const tools = await client.listTools();
    console.log(`Found ${tools.length} tools`);

    tools.forEach((tool) => {
      console.log(`- [${tool.serverName}] ${tool.name}`);
    });

    // Call a specific tool
    const result = await client.callTool('leo-sse-mcp', 'my-tool', {
      param1: 'value1',
    });
    console.log('Result:', result);

  } finally {
    // Always disconnect when done
    await client.disconnect();
  }
}

main().catch(console.error);

Transport Types

SSE (Server-Sent Events)

{
  "type": "sse",
  "url": "http://localhost:3000/sse",
  "headers": {
    "Authorization": "Bearer token"
  }
}

HTTP Streaming

{
  "type": "httpStream",
  "url": "http://localhost:3000/stream",
  "headers": {
    "Authorization": "Bearer token"
  }
}

stdio (Local Process)

{
  "type": "stdio",
  "command": "node",
  "args": ["./mcp-server.js"],
  "env": {
    "DEBUG": "mcp:*"
  }
}

API Reference

McpClient

constructor(configPath: string)

Create a new MCP client instance.

  • configPath: Path to the mcp_servers.json configuration file

connect(): Promise<void>

Initialize and connect to all configured servers.

disconnect(): Promise<void>

Disconnect from all servers.

listTools(): Promise<IAggregatedTool[]>

List all tools from all connected servers. Each tool includes a serverName property indicating which server it belongs to.

listResources(): Promise<IAggregatedResource[]>

List all resources from all connected servers.

listPrompts(): Promise<IAggregatedPrompt[]>

List all prompts from all connected servers.

callTool(serverName: string, toolName: string, params?: unknown): Promise<unknown>

Execute a specific tool on a specific server.

  • serverName: Name of the server (from config)
  • toolName: Name of the tool to call
  • params: Optional parameters for the tool

readResource(serverName: string, uri: string): Promise<unknown>

Read a resource from a specific server.

getPrompt(serverName: string, promptName: string, args?: Record<string, unknown>): Promise<unknown>

Get a prompt from a specific server.

getConnectedServers(): string[]

Get list of connected server names.

isServerConnected(serverName: string): boolean

Check if a specific server is connected.

Examples

See the examples directory for more usage examples:

  • basic-usage.ts - Basic client usage
  • advanced-usage.ts - Advanced features and error handling
  • stdio-transport.ts - Using stdio transport for local servers

Testing

The library includes several test scripts in the tests directory:

Quick Test (Single Server)

npm run test:quick

Comprehensive Test (All Servers)

npm run test:all

Local Server Test

npm run test:local

Development

Build

npm run build

Watch Mode

npm run build:watch

Run Unit Tests

npm test

Lint

npm run lint

Architecture

For more detailed architecture information, see PROJECT_STRUCTURE.md.

Documentation

Additional documentation is available in the docs directory:

License

MIT

Contributors

Init by me & Claude and I want to make contributing to this project as easy and transparent as possible. So, just simple do the change then create PR

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Client Kit

How do I install Client Kit?

Run claude mcp add client-kit -- npx -y mcp-client-kit, then add the server to your MCP client's configuration.

Is Client Kit safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Client Kit still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.