# mcp-client-demo

> MCP Server

This repository provides a demo implementation of a Model Context Protocol (MCP) client using Web Workers and Server-Sent Events, built with Vite, React, and TypeScript, offering interactive testing.

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 8
- **Forks:** 0
- **Owner:** yonaka15
- **GitHub:** https://github.com/yonaka15/mcp-client-demo
- **Created:** 2025-02-03T08:43:25+00:00
- **Updated:** 2025-03-27T09:36:24+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-client-demo-web-workers-sse

## Setup

## Setup

### Prerequisites

- Node.js 18.x or later
- An MCP-compatible server running on `localhost:3020`

### Installation

1. Clone the repository
2. Install dependencies:

```bash
npm install
```

### Development

Start the development server:

```bash
npm run dev
```

### Testing the Worker

1. Open `test.html` in your browser
2. Click "Connect" to establish connection with the MCP server
3. Use "List Tools" to see available tools
4. Select a tool and provide input in JSON format
5. Click "Execute Tool" to run the selected tool

## Tools

## Available Tools

1. Web Worker-based MCP client implementation (Provides the core functionality of the client.)
2. Server-Sent Events (SSE) transport (Enables communication with the MCP server.)
3. Interactive testing UI (Allows for easy testing and interaction with the client.)
4. `connect` (Establishes connection with MCP server)
5. `disconnect` (Closes the connection)
6. `listTools` (Gets list of available tools)
7. `callTool` (Executes a specific tool)
