npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jonsoku2/mcp-template-ts

v1.0.17

Published

MCP(Model Context Protocol) TypeScript 템플릿 - AI 모델과 상호작용하기 위한 서버 템플릿

Downloads

84

Readme

MCP Server Template

Model Context Protocol(MCP) 서버를 위한 TypeScript 템플릿 프로젝트입니다.

목차

빠른 시작

# npx로 직접 실행
npx @jonsoku2/mcp-template-ts@latest start

# 디버그 모드로 실행
npx @jonsoku2/mcp-template-ts@latest start -d

# 여러 옵션 조합
npx @jonsoku2/mcp-template-ts@latest start -d --no-middleware

프로젝트로 설치

npx로 프로젝트 생성

# 새 프로젝트 생성 (최신 버전)
npx @jonsoku2/mcp-template-ts@latest init my-mcp-server

# 특정 버전으로 프로젝트 생성
npx @jonsoku2/[email protected] init my-mcp-server

# 옵션과 함께 프로젝트 생성
npx @jonsoku2/mcp-template-ts@latest init my-mcp-server --template typescript --port 4000

# 생성된 프로젝트로 이동
cd my-mcp-server

# 의존성 설치
npm install

수동 설치

# 저장소 클론
git clone https://github.com/jonsoku2/mcp-template-ts.git
cd mcp-template-ts

# 의존성 설치
npm install

# TypeScript 컴파일 및 빌드
npm run build

프로젝트 구조

src/
├── bin/
│   └── cli.ts          # CLI 진입점
├── server.ts           # MCP 서버 코어
├── types/
│   └── index.ts        # 타입 정의
├── tools/
│   └── index.ts        # 도구 모음
└── utils/
    └── logger.ts       # 로깅 유틸리티

주요 기능

  • TypeScript 기반 MCP 서버 구현
  • 미들웨어 시스템 지원
  • Winston 기반 로깅 시스템
  • 디버그 모드 지원
  • 환경 변수 기반 설정

CLI 옵션

서버 시작 시 다음 옵션들을 사용할 수 있습니다:

# 디버그 모드 활성화
npm start -- -d
# 또는
npm start -- --debug

# 미들웨어 비활성화
npm start -- --no-middleware

# 여러 옵션 조합
npm start -- -d --no-middleware

환경 변수

서버 실행 시 다음 환경 변수들을 사용할 수 있습니다:

# 기본 설정
export MCP_PORT=3000          # 서버 포트
export MCP_HOST=localhost     # 서버 호스트
export MCP_LOG_LEVEL=info     # 로그 레벨 (debug, info, warn, error)
export MCP_TIMEOUT=5000       # 타임아웃 (ms)
export MCP_MAX_RETRIES=3      # 최대 재시도 횟수
export MCP_API_KEY=           # API 키 (옵션)

시스템 구조

서버 초기화 및 시작 프로세스

sequenceDiagram
    participant CLI as CLI (bin/cli.ts)
    participant Server as MCPServer
    participant Transport as StdioTransport
    participant Logger as Logger

    CLI->>Server: new MCPServer(options)
    Server->>Server: loadConfig()
    Server->>Logger: info("설정 로드")

    CLI->>Server: initialize(initOptions)
    activate Server
    Server->>Server: setupErrorHandling()
    Server->>Server: setupRequestHandlers()
    
    alt initOptions.middleware exists
        Server->>Server: Register Middleware
        Server->>Logger: info("미들웨어 등록")
    end
    
    Server-->>CLI: Initialization Complete
    deactivate Server

    CLI->>Server: start()
    activate Server
    Server->>Transport: new StdioTransport()
    Server->>Transport: connect()
    Server->>Logger: info("서버 시작됨")
    Server-->>CLI: Server Started
    deactivate Server

배포

상세한 배포 방법은 배포 가이드를 참고하세요.

지원하는 배포 방식:

  • Docker 기반 배포 (Kubernetes, ECS, SSH, Heroku)
  • Vercel 배포

라이센스

MIT