Overview
@xsmcp/client-shared
is the basis for all clients and implements a common client architecture.
npm i @xsmcp/client-shared
pnpm add @xsmcp/client-shared
yarn add @xsmcp/client-shared
bun add @xsmcp/client-shared
You can create a client like this:
import { createClient } from '@xsmcp/client-shared'
import { createHttpTransport } from '@xsmcp/client-http'
const client = createClient({
name: 'example-client',
version: '1.0.0',
transport: createHttpTransport({ url: 'http://localhost:3000/mcp' }),
})
All subsequent content is based on this client.