
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@purinton/mcp-client
Advanced tools
A robust Node.js client for connecting to Model Context Protocol (MCP) servers with automatic reconnect, authentication, and flexible transport support.

A robust Node.js client for connecting to Model Context Protocol (MCP) servers with automatic reconnect, authentication, and flexible transport support.
npm install @purinton/mcp-client
import mcpClient from '@purinton/mcp-client';
(async () => {
try {
const client = await mcpClient({
// token: 'your-mcp-token',
// baseUrl: 'http://localhost:1234/',
});
console.log('MCP Client connected:', !!client);
// Use the client as needed...
} catch (err) {
console.error('Failed to connect MCP Client:', err);
}
})();
const mcpClient = require('@purinton/mcp-client');
(async () => {
try {
const client = await mcpClient({
// token: 'your-mcp-token',
// baseUrl: 'http://localhost:1234/',
});
console.log('MCP Client connected:', !!client);
// Use the client as needed...
} catch (err) {
console.error('Failed to connect MCP Client:', err);
}
})();
mcpClient(options?: McpClientOptions): Promise<any>Creates and connects an MCP client. Returns a connected client instance. Automatically reconnects on disconnect.
log (optional): Custom log (default: @purinton/log)port (optional): MCP server port (default: 1234)baseUrl (optional): MCP server URL (default: http://localhost:1234/)token (optional): Authentication token (default: from MCP_TOKEN env)ClientClass (optional): Custom client class (default: SDK Client)TransportClass (optional): Custom transport class (default: SDK StreamableHTTPClientTransport)Type definitions are included:
import mcpClient, { McpClientOptions } from '@purinton/mcp-client';
const client = await mcpClient({
token: 'your-mcp-token',
baseUrl: 'http://localhost:1234/',
} as McpClientOptions);
For help, questions, or to chat with the author and community, visit:
FAQs
A robust Node.js client for connecting to Model Context Protocol (MCP) servers with automatic reconnect, authentication, and flexible transport support.
We found that @purinton/mcp-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.