# mcp-client

> MCP Client

This repository provides a TypeScript implementation of a Model Context Protocol (MCP) client, enabling LLM agents to interact with MCP servers through stdio or HTTP+SSE transports, supporting resources, tools, prompts, and sampling.

## Overview

- **Category:** AI
- **Language:** TypeScript
- **Stars:** 30
- **Forks:** 0
- **Owner:** edanyal
- **GitHub:** https://github.com/edanyal/mcp-client
- **Created:** 2024-12-02T04:05:46+00:00
- **Updated:** 2025-03-24T22:44:42+00:00
- **Source:** https://model-context-protocol.com/clients/typescript-mcp-client-library-llm-agents

## Setup

## Setup

1.  Install the package: `npm install mcp-client`
2.  Create a configuration file (`mcp-config.json`) defining your MCP servers.
3.  Use the `MCPConnectionManager` to connect to your servers, initialize it with the config file path: `await manager.initialize('./mcp-config.json')`.
4.  Get clients for specific servers using `manager.getClient('serverName')`.
5.  Clean up resources when done using `await manager.cleanup()`.

## Tools

## Available Tools

1. Full implementation of the MCP specification.
2. Support for both stdio and HTTP+SSE transports.
3. Built-in MCP server process management.
4. Integration with Claude's native tool calling.
5. Type-safe API.
6. Event-based architecture.
7. Promise-based async/await API.
8. Support for Resources operations.
9. Support for Tools operations.
10. Support for Prompts operations.
11. Support for Sampling operations.
12. `@modelcontextprotocol/server-memory` - Knowledge graph operations.
13. `@modelcontextprotocol/server-filesystem` - File system operations.
14. `@modelcontextprotocol/server-brave-search` - Web search capabilities.
15. `@modelcontextprotocol/server-puppeteer` - Web automation.
16. `@modelcontextprotocol/server-fetch` - HTTP requests.
