🔐 JWT 인증을 사용한 SSE MCP 서버
이는 JWT 기반 인증을 갖춘 MCP(Model Context Protocol) SSE 서버입니다.
이를 통해 여러 AI 도구를 SSE 전송을 통해 노출할 수 있으며, 안전한 Bearer Token 흐름을 통해 보호됩니다.
다음으로 구성됨:
- 🚀 Node.js + 익스프레스
- 🧩 @modelcontextprotocol/sdk
- 🔒 인증을 위한 JSON 웹 토큰(JWT)
- ⚙️ 입력 검증을 위한 Zod
✅
@modelcontextprotocol/inspector
로 완벽하게 테스트됨
📂 프로젝트 구조
지엑스피1
✨ 특징
- ✅ Bearer JWT 토큰을 사용한 안전한 SSE 연결
- ✅ 동적 도구 등록(에코, 시간, 난수 등)
- ✅ MCP Inspector로 테스트됨
- ✅ 모든 요청 라이프사이클 이벤트를 기록합니다
- ✅ /message 엔드포인트에 대한 세션 관리
- 🚀 프로덕션 용도로 확장할 준비가 되었습니다.
⚙️ 설정
1. 저장소를 복제합니다.
2. 종속성 설치
3. .env
파일 생성
4. 서버를 실행하세요
✅ 서버는 다음에서 실행됩니다.
🧪 MCP Inspector로 서버 테스트
1단계 - MCP Inspector 설치
📖 공식 문서: MCP 검사관
2단계 - 토큰 생성
cURL을 사용하여 JWT 토큰을 받으세요.
✅ 응답 예시:
3단계 - MCP Inspector 연결
- Inspector UI 열기
- 전송 유형 설정: SSE
- URL:
- 승인 헤더 추가:
- 연결을 클릭하세요
🎉 성공! 서버가 연결되었습니다.
4단계 - 테스트 도구
검사기의 도구 탭으로 가서 목록 도구를 클릭합니다.
당신은 볼 수 있습니다:
- ✅
test
- ✅
echo
- ✅
get-time
- ✅
random-number
테스트해 보고 즐겨보세요!
📖 API 참조
🔑 토큰 생성
🔌 SSE 엔드포인트(토큰 필요)
📩 활성 세션에 메시지 보내기
🧩 도구 참조
도구 이름 | 설명 |
---|---|
test | 연결 테스트(보안 확인) |
echo | 에코백 제공 메시지 |
get-time | 현재 서버 시간을 반환합니다 |
random-number | 난수(최소/최대)를 반환합니다. |
🗓️ 예정된 변경 사항
- [ ] 토큰 취소 목록(블랙리스트)
- [ ] 역할 기반 도구 액세스(범위 검사)
- [ ] 세션 하트비트 / keep-alive
- [ ] 속도 제한 및 로깅
- [ ] 배포를 위한 Dockerization
📚 유용한 자료
👨💻 유지 관리자
아니켓
📄 라이센스
이 프로젝트는 오픈 소스이며 무료로 사용할 수 있습니다.
🚀 구축. 보안. 권한 부여.
This server cannot be installed
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.
JWT 기반 보안 인증을 통해 SSE 전송을 통해 여러 AI 도구를 노출하는 모델 컨텍스트 프로토콜 서버로, 동적 도구 등록 및 세션 관리가 가능합니다.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that allows secure execution of pre-approved commands, enabling AI assistants to safely interact with the user's system.Last updated -1318JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.Last updated -2PythonMIT License
- -securityFlicense-qualityA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.Last updated -16TypeScript
- -securityAlicense-qualityA Model Context Protocol server that provides AI agents with secure access to local filesystem operations, enabling reading, writing, and managing files through a standardized interface.Last updated -1603TypeScriptApache 2.0