Skip to main content
Glama

MCP SSE Server

by aihes

MCP SSE 서버 및 클라이언트 예제

이 저장소에는 SSE(Server-Sent Events) 기반 MCP(Model Context Protocol) 서버와 클라이언트의 완전한 예제 구현이 포함되어 있습니다.

개요

모델 컨텍스트 프로토콜(MCP)은 AI 시스템을 위해 설계된 통신 프로토콜입니다. 이 구현은 클라이언트와의 실시간 통신을 위해 서버 전송 이벤트(SSE)를 사용하는 MCP 서버를 생성하는 방법을 보여줍니다.

특징

  • SSE 기반 MCP 서버 : Express.js와 MCP SDK의 SSEServerTransport를 사용하여 서버를 구현합니다.
  • 대화형 MCP 클라이언트 : SSE 서버에 연결하는 클라이언트 구현을 제공합니다.
  • 도구 구현 : 적절한 설명과 함께 예시 도구(추가, 곱하기)가 포함됩니다.
  • 동적 리소스 : URI 패턴을 사용하여 동적 리소스 템플릿을 보여줍니다.
  • 디버깅 지원 : 자세한 로깅 및 디버깅 구성 포함

구성 요소

  • server.js - StdioServerTransport를 사용하는 기본 MCP 서버
  • sse-server.js - Express.js와 함께 SSEServerTransport를 사용하는 MCP 서버
  • client.js - 기본 서버용 클라이언트
  • sse-client.js - SSE 서버용 클라이언트

시작하기

  1. 종속성 설치:지엑스피1
  2. SSE 서버를 시작합니다.
    npm run sse-server
  3. 다른 터미널에서 SSE 클라이언트를 실행합니다.
    npm run sse-client

서버 기능

SSE 서버는 다음을 제공합니다.

  • 덧셈과 곱셈을 위한 도구 끝점
  • 템플릿 지원이 포함된 동적 인사말 리소스
  • 여러 클라이언트에 대한 적절한 세션 관리
  • 디버깅을 위한 자세한 로깅

클라이언트 기능

SSE 클라이언트는 다음을 보여줍니다.

  • SSE 서버에 연결
  • 사용 가능한 도구 및 리소스 나열
  • 매개변수를 사용하여 도구 호출
  • 동적 매개변수를 사용하여 리소스 읽기

URI 템플릿

서버는 URI 템플릿을 클라이언트에 노출하는 방법을 보여주며, 이를 통해 클라이언트가 리소스 URI를 동적으로 구성하는 방법을 이해할 수 있도록 합니다.

greeting://{name} - Replace {name} with any name to get a personalized greeting

특허

MIT

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Tools

실시간 통신을 위한 SSE(Server-Sent Events)를 사용하는 MCP(Model Context Protocol) 서버 구현으로, 계산 및 동적 리소스 템플릿을 위한 도구를 제공합니다.

  1. 개요
    1. 특징
      1. 구성 요소
        1. 시작하기
          1. 서버 기능
            1. 클라이언트 기능
              1. URI 템플릿
                1. 특허

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.
                    Last updated -
                    4
                    3
                    TypeScript
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    This server implements the Model Context Protocol (MCP) to handle asynchronous tasks with real-time status tracking, robust error handling, and automatic resource management.
                    Last updated -
                    2
                    1
                    JavaScript
                    MIT License
                  • -
                    security
                    -
                    license
                    -
                    quality
                    A specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.
                    Last updated -
                    1
                    TypeScript
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.
                    Last updated -
                    21
                    42
                    JavaScript

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/aihes/mcp-sse-server'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server