▲reactivite
/packages/docs/courses/cli/skillpool/promaster/contact
all docs

$ npm view @ubuligan/client

Utility

@ubuligan/client

A thin DX layer over the MCP SDK client — transport helpers, auth, retry, and logging so you can connect to MCP servers without boilerplate.

npm versiondownloads
npm github
$ npm install @ubuligan/client

A thin, ergonomic DX layer over the MCP SDK Client. You get transport selection (stdio or Streamable HTTP), auth, retry and logging from a single config object — and the raw SDK client is always reachable via .raw for anything advanced.

Part of the MCP Toolkit.

Install#

npm install @ubuligan/client

Node only. For the browser/React, use @ubuligan/react (stdio needs child_process, which doesn't exist in the browser).

Quick start#

import { createMCPClient } from "@ubuligan/client";

// Connects immediately and returns a ready client.
const client = await createMCPClient({
  transport: { type: "http", url: "http://localhost:3000/mcp" },
  logger: "info",
});

const { tools } = await client.listTools();
const result = await client.callTool("add", { a: 2, b: 3 });
console.log(result.content);

await client.close();

Connecting to a local stdio server#

const client = await createMCPClient({
  transport: { type: "stdio", command: "node", args: ["dist/index.js"] },
});

Auth + retry#

const client = await createMCPClient({
  transport: { type: "http", url: "https://api.example.com/mcp" },
  auth: { type: "bearer", token: () => getFreshToken() }, // sync or async
  retry: { retries: 5, minDelayMs: 250 },
  logger: "debug",
});

API#

createMCPClient(options): Promise<MCPClient>#

Construct and connect in one call. Same options as the MCPClient constructor.

new MCPClient(options)#

Construct without connecting. Call await client.connect() yourself.

Options

FieldTypeNotes
transportTransportConfigRequired. { type: "stdio", command, args? } or { type: "http", url }.
authAuthConfigApplied to HTTP transports. Bearer or custom headers; values may be async.
retryRetryOptionsWraps every request. { retries: 1 } disables.
loggerLogger | LogLevelA level string ("info") uses the built-in console logger.
name, versionstringClient identity advertised to the server.

Methods — connect(), close(), listTools(), callTool(name, args?), listResources(), readResource(uri), listPrompts(), getPrompt(name, args?). Every method is retry- and log-wrapped. client.raw is the underlying SDK Client.

License#

MIT

  • home
  • packages
  • skillpool
  • docs
  • cli
▲reactivite

// The fastest way to scaffold production-ready React apps. Built by developers, for developers.

$ npm create reactivite@latest

resources/

  • └─ documentation
  • └─ packages
  • └─ cli
  • └─ courses
  • └─ markdown
  • └─ diff
  • └─ run
  • └─ radio
  • └─ tv
  • └─ games
  • └─ about
  • └─ contact

community/

  • └─ github

© 2026 reactivite — all rights reserved