
mcp sse client
一个支持服务器发送事件(SSE)的 JavaScript 客户端,用于与 MCP 服务器交互。
Repository Info
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
- Include the client in your project:
import { addNumbers, getGreeting } from './sse_client.js';
- 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 numberb: 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
Clone the repository
git clone https://github.com/rohithtp/mcp-sse-clientInstall dependencies
cd mcp-sse-client
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.