MCP Client Toolkit
About
TypeScript client library and utilities for remote Model Context Protocol (MCP) servers
Details
- Author
- tileshq
- Downloads
- 258
- Categories
- Developer Tools
Jump to
- OAuth 2.0 authentication support (BrowserOAuthHandler, CustomOAuthHandler)
- Automatic transport fallback (HTTP → SSE)
- Connection management via ConnectionManager
- Tool discovery and execution
- Real-time notifications
- CLI utilities for listing, viewing, and calling tools
Import the library and create an MCPClient instance with an OAuth handler and callback port, then call connect() with the server URL. Use the exported CLI utility functions (listTools, showToolDetails, callTool) to interact with the connected server.
MCP Client Toolkit
TypeScript client library and utilities for remote Model Context Protocol (MCP) servers.
Basic Client
import { MCPClient, BrowserOAuthHandler } from 'mcp-client-toolkit';
const client = new MCPClient({
callbackPort: 8090,
oauthHandler: new BrowserOAuthHandler(8090)
});
await client.connect('http://localhost:3000/mcp');
CLI Utilities
import {
listTools,
showToolDetails,
callTool,
parseToolCallCommand
} from 'mcp-client-toolkit';
const mcpClient = client.getClient();
if (mcpClient) {
await listTools(mcpClient);
await showToolDetails(mcpClient, 'tool-name');
await callTool(mcpClient, 'tool-name', { param: 'value' });
}
Exports
- MCPClient: Main client class
- BrowserOAuthHandler, CustomOAuthHandler: OAuth handlers
- ConnectionManager: Connection management
- listTools, showToolDetails, callTool: CLI utilities
- formatJsonSchema, generateExampleArgs: Schema utilities
- Types: MCPClientConfig, OAuthHandler, TransportType, etc.
Features
- OAuth 2.0 authentication support
- Automatic transport fallback (HTTP → SSE)
- Connection management
- Tool discovery and execution
- Real-time notifications
- Reusable CLI command utilities
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





