
kend/mcp_sse
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
kend/mcp sse는 MCP 서버 후보가 https://github.com/kend/mcp_sse.에서 가져온
개요
kend/mcp sse는 MCP 서버 후보가 https://github.com/kend/mcp_sse.에서 가져온
개요(AI 번역)
이 라이브러리는 Server-Sent Events(SSE)에서 Model Context Protocol (MCP)의 간단한 구현을 제공합니다.
Model Context Protocol에 대한 자세한 내용은 다음을 참조하십시오. 모형 Context 의정서 문서.
내용 표
- 특징
- 자체 MCP 서버 만들기
- 설치
- Phoenix 신청
- Bandit와 플러그 응용
- 사용
- MCP 검사기로
- 커서
- 구성
- 포트 및 HTTPS
- 경로
- 유지
- 빠른 데모
- 기타 메모
- example 클라이언트 사용
- 세션 관리
- MCP 응답 포맷
- 기여
특징
- 전체 MCP 서버 구현
- SSE 연결 관리
- JSON-RPC 메시지 처리
- Tool 등록 및 실행
- 세션 관리
- 자동 ping/keepalive
- 오류 처리 및 검증
자체 MCP 서버 만들기
MCPServer] 동작을 실행해야 합니다.
필요한 콜백(handle_ping/1과 handle_initialize/2]])을 구현할 필요가 있으며, 지원하려는 기능에 대한 선택 콜백.
use MCPServer 매크로 제공:
- 내장 메시지 routing
- 프로토콜 버전 검증
- 옵션 콜백에 대한 기본 구현
- JSON-RPC 오류 처리
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP over SSE
This library provides a simple implementation of the Model Context Protocol (MCP) over Server-Sent Events (SSE).
For more information about the Model Context Protocol, visit: Model Context Protocol Documentation.
Table of Contents
- Features
- Create your own MCP server
- Installation
- Usage
- Configuration
- Quick Demo
- Other Notes
- Contributing
Features
- Full MCP server implementation
- SSE connection management
- JSON-RPC message handling
- Tool registration and execution
- Session management
- Automatic ping/keepalive
- Error handling and validation
Create your own MCP server
You must implement the MCPServer behaviour.
You only need to implement the required callbacks (handle_ping/1 and handle_initialize/2) and any optional callbacks for features you want to support.
The use MCPServer macro provides:
- Built-in message routing
- Protocol version validation
- Default implementations for optional callbacks
- JSON-RPC error handling
- Logging
See DefaultServer for a default implementation of the MCPServer behaviour.
Installation
For Phoenix Applications:
- Add the required configuration to
config/config.exs:
# Configure MIME types for SSE
config :mime, :types, %{
"text/event-stream" => ["sse"]
}
# Configure the MCP Server
config :mcp_sse, :mcp_server, YourApp.YourMCPServer
- Add to your dependencies in
mix.exs:
def deps do
[
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"your-mcp-server": {
"url": "http://localhost:4000/sse"
}
}
}