Pure ESM MCP client for SDK v2, Streamable HTTP, stdio, and bearer authentication.
- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- API
- Packaging
- Examples
- Support
- Links
- License
Connect to MCP servers through Streamable HTTP or stdio. Use bearer tokens, custom HTTP headers, token providers, and structured logs.
Use Node.js 26 or later.
Install the package with npm install @eliware/mcp-client.
import { mcpClient } from "@eliware/mcp-client";
const client = await mcpClient({ url: "https://mcp.example.com/mcp" });
try {
console.log(await client.listTools());
} finally {
await client.close();
}Read the documentation index, specifications, and release notes.
Run npm ci to install locked dependencies. Read repository specifications for contributor requirements.
Run npm test for aggregate validation.
Read the troubleshooting guide for connection help.
Keep access tokens, credentials, and private server data out of source files and logs.
Import mcpClient from @eliware/mcp-client. Read the API guide for options and return types.
The package includes src/, docs/, README.md, AGENTS.md, LICENSE, RELEASE_NOTES.md, examples/, specs/, and .env.example.
Use numeric MAJOR.MINOR.PATCH versions and a v<version> tag for each release.
Run npm run pack to check package contents. Publish only after approved release steps.
Read the examples index for commands, results, permissions, and cleanup.
For help, questions, or to chat with the author and community, visit:


