MT

mcpdotdirect/template-mcp-server

Developer tools공식

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

76 stars 37 forks 품질 72 트렌드 14MIT

mcpdotdirect/template-mcp-server는 MCP 서버 후보가 https://github.com/mcpdotdirect/template-mcp-server.에서 가져온다

개요

mcpdotdirect/template-mcp-server는 MCP 서버 후보가 https://github.com/mcpdotdirect/template-mcp-server.에서 가져온다

개요(AI 번역)

FastMCP를 사용하여 매우 자신의 MCP (모델 Context Protocol) 서버를 구축하는 CLI 도구

사용법

포함 된 것

템플릿은 다음을 포함합니다:

  • FastMCP를 사용하여 stdio 및 HTTP 운송 옵션 모두 기본 서버 설정
  • MCP 도구, 리소스 및 신속한 정의를위한 구조
  • TypeScript 구성
  • 개발 스크립트 및 구성

✨ 특징

  • FastMCP: Simpler 구현을 위한 FastMCP 프레임워크를 사용
  • Dual Transport Support: MCP 서버를 stdio 또는 HTTP로 실행
  • TypeScript: 유형 안전을 위한 Full TypeScript 지원
  • Extensible: 사용자 정의 도구, 리소스 및 프롬프트를 추가하기 쉬운

⭐ 시작하기

당신의 프로젝트를 만들기 후에:

  1. 당신의 선호한 포장 매니저를 사용하여 의존도를 설치하십시오:

  2. 서버 시작:

  3. 자동 부하를 가진 발달을 위해:

Note: package.json use Bun의 기본 스크립트는 runtime(e.g., bun run src/index.ts])로 사용됩니다. 다른 패키지 관리자 또는 런타임을 사용하려면 package.json 파일에서 이러한 스크립트를 수정할 수 있습니다. Node.js 또는 다른 런타임을 사용할 수 있습니다.

. 상세한 사용법

수송 방법

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

README

원문 README의 일부입니다. 원문 보기.

@mcpdotdirect/template-mcp-server

A CLI tool to quickly get started building your very own MCP (Model Context Protocol) server using FastMCP

📋 Usage

# with npx
npx @mcpdotdirect/create-mcp-server

# Or with npm
npm init @mcpdotdirect/mcp-server

🔭 What’s Included

The template includes:

  • Basic server setup with both stdio and HTTP transport options using FastMCP
  • Structure for defining MCP tools, resources, and prompts
  • TypeScript configuration
  • Development scripts and configuration

✨ Features

  • FastMCP: Built using the FastMCP framework for simpler implementation
  • Dual Transport Support: Run your MCP server over stdio or HTTP
  • TypeScript: Full TypeScript support for type safety
  • Extensible: Easy to add custom tools, resources, and prompts

🚀 Getting Started

After creating your project:

  1. Install dependencies using your preferred package manager:

    # Using npm
    npm install
    
    # Using yarn
    yarn
    
    # Using pnpm
    pnpm install
    
    # Using bun
    bun install
    
  2. Start the server:

    # Start the stdio server
    npm start
    
    # Or start the HTTP server
    npm run start:http
    
  3. For development with auto-reload:

    # Development mode with stdio
    npm run dev
    
    # Development mode with HTTP
    npm run dev:http
    

Note: The default scripts in package.json use Bun as the runtime (e.g., bun run src/index.ts). If you prefer to use a different package manager or runtime, you can modify these scripts in your package.json file to use Node.js or another runtime of your choice.

📖 Detailed Usage

Transport Methods

The MCP server supports two transport methods:

  1. stdio Transport (Command Line Mode):

    • Runs on your local machine
    • Managed automatically by Cursor
    • Communicates directly via stdout
    • Only accessible by you locally
    • Ideal for personal development and tools
  2. SSE Transport (HTTP Web Mode):

    • Can run locally or remotely
    • Managed and run by you
    • Communicates over the network
    • Can be shared across machines
    • Ideal for team collaboration and shared tools

Running the Server Locally

stdio Transport (CLI Mode)

Start the server in stdio mode for CLI tools:

# Start the stdio server
npm start
# or with other package managers
yarn start
pnpm start
bun start

# Start the server in development mode with auto-reload
npm run dev
# or
yarn dev
pnpm dev
bun dev

HTTP Transport (Web Mode)

Start the server in HTTP mode for web applications:

# Start the HTTP server
npm run start:http
# or
yarn start:http
pnpm start:http
bun start:http

# Start the HTTP server in development mode with auto-reload
npm run dev:http
# or
yarn dev:http
pnpm dev:http
bun dev:http
GitHub에서 전체 README 보기

설치

npx @mcpdotdirect/create-mcp-server
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "my-mcp-stdio": { "command": "npm", "args": [ "start" ], "env": { "NODE_ENV": "development" } }, "my-mcp-sse": { "url": "http://localhost:3001/sse" } } }