VM

virajsharma2000/mcp-websocket

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

31 stars 3 forks 품질 51 트렌드 11MIT

이 서버는 실시간 데이터 업데이트에 대한 WebSocket 향상을 가진 MCP(모델 Context Protocol) 서버를 구현합니다.

개요

이 프로젝트는 실시간 데이터 업데이트에 대한 WebSocket 향상을 가진 MCP(모델 Context Protocol) 서버를 구현합니다. 클라이언트는 WebSocket 기반 구독을 활성화하면서 표준 MCP 요청을 만들 수 있으므로 새 데이터가 사용할 때 푸시 알림을받을 수 있습니다. - 클라이언트에서 표준 MCP 요청을 처리합니다. - 실시간 업데이트를 구독 할 수 있습니다. - 새 데이터가 사용할 때 모든 구독 클라이언트에 업데이트를 보냅니다. - 효율적인 비 차단 작업을 위한 asyncio를 사용합니다. 1. Clone 이 저장소: 2. 의존성을 설치하십시오: 다음 명령을 실행하여 MCP 및 WebSocket 서버 모두 시작하십시오. 클라이언트는 WebSocket 서버 (ws://localhost:8765)에 연결하고 전송하여 업데이트에 가입할 수 있습니다. MCP 클라이언트는 MCP 서버에 요청을 보낼 수 있습니다 http://localhost:8080] 와 같은 페이로드: 이 프로젝트는 MIT 라이센스에 따라 라이센스됩니다. 풀 요청은 환영합니다! 주요 변경 사항은 먼저 문제를 열어서 변경하고 싶습니다.

개요(AI 번역)

이 프로젝트는 실시간 데이터 업데이트에 대한 WebSocket 향상을 가진 MCP(모델 Context Protocol) 서버를 구현합니다. 클라이언트는 WebSocket 기반 구독을 활성화하면서 표준 MCP 요청을 만들 수 있으므로 새 데이터가 사용할 때 푸시 알림을받을 수 있습니다.

특징

  • **MCP 서버 (포트 8080): ** 클라이언트에서 표준 MCP 요청을 처리합니다.
  • WebSocket 서버 (포트 8765): 클라이언트가 실시간 업데이트를 구독 할 수 있습니다.
  • ** 푸시 알림 :** 새로운 데이터가 사용할 때 모든 구독 클라이언트에 대한 업데이트를 보냅니다.
  • Async Architecture: 효율적인 비블록 작업에 대한 asyncio를 사용합니다.

설치

  1. Clone 이 저장소:

  2. 의존성 설치:

사용법

서버 시작

다음 명령을 실행하여 MCP 및 WebSocket 서버 모두 시작하십시오.

WebSockets를 통해 연결하기

Clients는 WebSocket 서버(ws://localhost:8765])에 연결하여 업데이트할 수 있습니다.

MCP 요청 보내기

MCP 클라이언트는 MCP 서버에 요청을 보낼 수 있습니다 http://localhost:8080] 와 같은 페이로드:

서버는 다음과 같이 응답합니다:

라이센스

이 프로젝트는 MIT 라이센스에 따라 라이센스됩니다.

기여

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

MCP WebSocket Server

This project implements an MCP (Model Context Protocol) server with WebSocket enhancements for real-time data updates. It allows clients to make standard MCP requests while also enabling WebSocket-based subscriptions to receive push notifications when new data becomes available.

Features

  • MCP Server (Port 8080): Handles standard MCP requests from clients.
  • WebSocket Server (Port 8765): Allows clients to subscribe for real-time updates.
  • Push Notifications: Sends updates to all subscribed clients when new data is available.
  • Async Architecture: Uses asyncio for efficient non-blocking operations.

Installation

  1. Clone this repository:
    git clone https://github.com/your-repo/mcp-websocket-server.git
    cd mcp-websocket-server
    
  2. Install dependencies:
    pip install websockets mcp-sdk  # Replace with actual MCP SDK package name
    

Usage

Start the Server

Run the following command to start both the MCP and WebSocket servers:

python server.py

Connecting via WebSockets

Clients can connect to the WebSocket server (ws://localhost:8765) and subscribe to updates by sending:

{"action": "subscribe"}

Sending MCP Requests

MCP clients can send requests to the MCP server at http://localhost:8080 with a payload like:

{"method": "get_data"}

The server will respond with:

{"result": "Here is your data!"}

License

This project is licensed under the MIT License.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.

Contact

For questions or suggestions, reach out via [[email protected]].

mcp-websocket

This server implements an MCP (Model Context Protocol) server with WebSocket enhancements for real-time data updates.

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →