rohithtp
MCP Serverrohithtppublic

mcp sse client

一个支持服务器发送事件(SSE)的 JavaScript 客户端,用于与 MCP 服务器交互。

Repository Info

1
Stars
0
Forks
1
Watchers
0
Issues
HTML
Language
-
License

About This Server

一个支持服务器发送事件(SSE)的 JavaScript 客户端,用于与 MCP 服务器交互。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP SSE Client

A JavaScript client implementation for interacting with the MCP (Model Context Protocol) Server with Server-Sent Events (SSE) support.

Overview

This client provides functionality to:

  • Connect to SSE stream for real-time updates
  • Execute tools (like adding numbers)
  • Fetch resources (like personalized greetings)

The server implementation can be found at mcp-python-sse.

Setup

  1. Include the client in your project:
import { addNumbers, getGreeting } from './sse_client.js';
  1. The SSE connection will be automatically established when the client is loaded.

Usage

Listening to SSE Events

The client automatically sets up an SSE connection and listens for messages:

// The connection is automatically established
// Messages will be logged to console

Using Tools

Add Numbers

const result = await addNumbers(5, 3);
console.log('Sum:', result); // Will output the sum

Using Resources

Get Greeting

const greeting = await getGreeting('Alice');
console.log('Greeting:', greeting); // Will output a personalized greeting

API Reference

Functions

addNumbers(a: number, b: number)

  • Parameters:
    • a: First number
    • b: Second number
  • Returns: Promise with the sum result

getGreeting(name: string)

  • Parameters:
    • name: Name to include in greeting
  • Returns: Promise with the greeting message

Server Configuration

By default, the client connects to http://localhost:8000. The server implementation should be running and accessible at this address.

For server setup and configuration, please refer to the mcp-python-sse repository.

Quick Start

1

Clone the repository

git clone https://github.com/rohithtp/mcp-sse-client
2

Install dependencies

cd mcp-sse-client
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerrohithtp
Repomcp-sse-client
LanguageHTML
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation