Communitygithub.com

MCP 서버 개발 가이드

LLM이 외부 서비스와 상호작용할 수 있는 고품질 MCP(Model Context Protocol) 서버를 구축하기 위한 가이드입니다. Python(FastMCP) 또는 Node/TypeScript(MCP SDK)로 MCP 서버를 빌드할 때 사용합니다.

MCP 서버 개발 가이드란 무엇인가요?

이 스킬은 고품질 MCP(Model Context Protocol) 서버를 개발하기 위한 종합적인 가이드를 제공합니다. MCP 서버는 LLM이 외부 API나 서비스와 잘 설계된 도구를 통해 상호작용할 수 있도록 해줍니다. 이 가이드는 네 가지 주요 단계로 구성됩니다: 심층 조사 및 계획, 구현, 검토 및 테스트, 평가 생성. TypeScript를 권장 스택으로 제시하며, Python(FastMCP)과 TypeScript(MCP SDK) 두 가지 언어를 모두 지원합니다. 각 단계별로 구체적인 지침과 예제를 제공하여 개발자가 효율적으로 MCP 서버를 구축하고 품질을 보장할 수 있도록 돕습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/agencelutie/LP-lutie/tree/main/skills-export/examples/mcp-builder

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

MCP 서버 개발 가이드은(는) 무엇을 하나요?

개요

LLM이 외부 서비스와 잘 설계된 도구를 통해 상호작용할 수 있는 MCP(Model Context Protocol) 서버를 생성합니다. MCP 서버의 품질은 LLM이 실제 작업을 얼마나 잘 수행할 수 있는지에 따라 측정됩니다.


프로세스

🚀 고수준 워크플로우

고품질 MCP 서버를 생성하는 과정은 네 가지 주요 단계로 구성됩니다.

1단계: 심층 조사 및 계획

1.1 최신 MCP 설계 이해

API 커버리지와 워크플로 도구의 균형: 포괄적인 API 엔드포인트 커버리지와 특화된 워크플로 도구 간의 균형을 맞추세요. 워크플로 도구는 특정 작업에 더 편리할 수 있는 반면, 포괄적인 커버리지는 에이전트가 유연하게 작업을 조합할 수 있게 해줍니다. 성능은 클라이언트에 따라 다릅니다. 일부 클라이언트는 기본 도구를 결합한 코드 실행의 이점을 얻는 반면, 다른 클라이언트는 더 높은 수준의 워크플로와 더 잘 작동합니다. 확실하지 않은 경우 포괄적인 API 커버리지를 우선시하세요.

도구 명명 및 검색 가능성: 명확하고 설명적인 도구 이름은 에이전트가 필요한 도구를 빠르게 찾는 데 도움이 됩니다. 일관된 접두사(예: github_create_issue, github_list_repos)와 동작 중심의 명명을 사용하세요.

컨텍스트 관리: 에이전트는 간결한 도구 설명과 결과를 필터링/페이지 매김할 수 있는 기능의 이점을 얻습니다. 집중되고 관련성 높은 데이터를 반환하는 도구를 설계하세요. 일부 클라이언트는 코드 실행을 지원하여 에이전트가 데이터를 효율적으로 필터링하고 처리할 수 있습니다.

실행 가능한 오류 메시지: 오류 메시지는 구체적인 제안과 다음 단계를 통해 에이전트가 해결책을 찾도록 안내해야 합니다.

1.2 MCP 프로토콜 문서 학습

MCP 사양 탐색:

사이트맵에서 관련 페이지를 찾으세요: https://modelcontextprotocol.io/sitemap.xml

그런 다음 .md 접미사를 사용하여 특정 페이지를 가져오세요(예: https://modelcontextprotocol.io/specification/draft.md).

검토해야 할 주요 페이지:

  • 사양 개요 및 아키텍처
  • 전송 메커니즘(스트리밍 가능 HTTP, stdio)
  • 도구, 리소스 및 프롬프트 정의

1.3 프레임워크 문서 학습

권장 스택:

  • 언어: TypeScript(고품질 SDK 지원, MCPB와 같은 여러 실행 환경에서의 좋은 호환성. 또한 AI 모델이 TypeScript 코드를 잘 생성하며, 광범위한 사용, 정적 타이핑 및 좋은 린팅 도구의 이점을 누림)
  • 전송: 원격 서버용 스트리밍 가능 HTTP, 상태 비저장 JSON 사용(상태 저장 세션 및 스트리밍 응답에 비해 확장 및 유지 관리가 더 간편함). 로컬 서버용 stdio.

프레임워크 문서 로드:

TypeScript(권장):

  • TypeScript SDK: WebFetch을 사용하여 https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md 로드
  • ⚡ TypeScript 가이드 - TypeScript 패턴 및 예제

Python:

  • Python SDK: WebFetch을 사용하여 https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md 로드
  • 🐍 Python 가이드 - Python 패턴 및 예제

1.4 구현 계획

API 이해: 서비스의 API 문서를 검토하여 주요 엔드포인트, 인증 요구 사항 및 데이터 모델을 파악하세요. 필요에 따라 웹 검색과 WebFetch을 사용하세요.

도구 선택: 포괄적인 API 커버리지를 우선시하세요. 가장 일반적인 작업부터 시작하여 구현할 엔드포인트를 나열하세요.


2단계: 구현

2.1 프로젝트 구조 설정

프로젝트 설정에 대한 언어별 가이드를 참조하세요:

2.2 핵심 인프라 구현

공유 유틸리티 생성:

  • 인증이 포함된 API 클라이언트
  • 오류 처리 도우미
  • 응답 형식 지정(JSON/Markdown)
  • 페이지 매김 지원

2.3 도구 구현

각 도구에 대해:

입력 스키마:

  • Zod(TypeScript) 또는 Pydantic(Python) 사용
  • 제약 조건과 명확한 설명 포함
  • 필드 설명에 예제 추가

출력 스키마:

  • 가능한 경우 구조화된 데이터를 위해 outputSchema 정의
  • 도구 응답에 structuredContent 사용(TypeScript SDK 기능)
  • 클라이언트가 도구 출력을 이해하고 처리하는 데 도움

도구 설명:

  • 기능의 간결한 요약
  • 매개변수 설명
  • 반환 유형 스키마

구현:

  • I/O 작업에 Async/await 사용
  • 실행 가능한 메시지와 함께 적절한 오류 처리
  • 해당되는 경우 페이지 매김 지원
  • 최신 SDK 사용 시 텍스트 콘텐츠와 구조화된 데이터 모두 반환

어노테이션:

  • readOnlyHint: true/false
  • destructiveHint: true/false
  • idempotentHint: true/false
  • openWorldHint: true/false

3단계: 검토 및 테스트

3.1 코드 품질

다음 사항을 검토하세요:

  • 중복 코드 없음(DRY 원칙)
  • 일관된 오류 처리
  • 전체 유형 커버리지
  • 명확한 도구 설명

3.2 빌드 및 테스트

TypeScript:

  • npm run build 실행하여 컴파일 확인
  • MCP Inspector로 테스트: npx @modelcontextprotocol/inspector

Python:

  • 구문 확인: python -m py_compile your_server.py
  • MCP Inspector로 테스트

자세한 테스트 방법과 품질 체크리스트는 언어별 가이드를 참조하세요.


4단계: 평가 생성

MCP 서버를 구현한 후, 그 효과를 테스트하기 위한 종합적인 평가를 생성하세요.

전체 평가 지침은 ✅ 평가 가이드 를 로드하세요.

4.1 평가 목적 이해

LLM이 MCP 서버를 사용하여 현실적이고 복잡한 질문에 효과적으로 답변할 수 있는지 테스트하기 위해 평가를 사용합니다.

4.2 평가 질문 10개 생성

효과적인 평가를 생성하려면 평가 가이드에 설명된 프로세스를 따르세요.

  1. 도구 검사: 사용 가능한 도구를 나열하고 그 기능을 이해합니다.
  2. 콘텐츠 탐색: READ-ONLY 작업을 사용하여 사용 가능한 데이터를 탐색합니다.
  3. 질문 생성: 10개의 복잡하고 현실적인 질문을 생성합니다.
  4. 답변 확인: 각 질문을 직접 풀어서 답변을 확인합니다.

4.3 평가 요구 사항

각 질문이 다음 조건을 충족하는지 확인하세요:

  • 독립적: 다른 질문에 의존하지 않음
  • 읽기 전용: 비파괴적 작업만 필요
  • 복잡함: 여러 도구 호출과 심층 탐색 필요
  • 현실적: 인간이 관심을 가질 실제 사용 사례 기반
  • 검증 가능: 문자열 비교로 확인할 수 있는 단일하고 명확한 답변
  • 안정적: 시간이 지나도 답변이 변하지 않음

4.4 출력 형식

다음 구조의 XML 파일을 생성하세요:

<evaluation>
  <qa_pair>
    <question>동물 코드명을 가진 AI 모델 출시에 대한 토론을 찾으세요. 한 모델은 ASL-X 형식을 사용하는 특정 안전 지정이 필요했습니다. 점박이 야생 고양이의 이름을 딴 모델에 대해 어떤 숫자 X가 결정되었습니까?</question>
    <answer>3</answer>
  </qa_pair>
<!-- 더 많은 qa_pair... -->
</evaluation>

참조 파일

📚 문서 라이브러리

개발 중 필요에 따라 다음 리소스를 로드하세요.

핵심 MCP 문서(먼저 로드)

  • MCP 프로토콜: https://modelcontextprotocol.io/sitemap.xml의 사이트맵에서 시작한 다음 .md 접미사로 특정 페이지 가져오기
  • 📋 MCP 모범 사례 - 다음을 포함한 범용 MCP 지침:
    • 서버 및 도구 명명 규칙
    • 응답 형식 지침(JSON vs Markdown)
    • 페이지 매김 모범 사례
    • 전송 선택(스트리밍 가능 HTTP vs stdio)
    • 보안 및 오류 처리 표준

SDK 문서(1/2단계 중 로드)

  • Python SDK: https://raw.githubusercontent.com/modelcontextprotocol/python-sdk/main/README.md에서 가져오기
  • TypeScript SDK: https://raw.githubusercontent.com/modelcontextprotocol/typescript-sdk/main/README.md에서 가져오기

언어별 구현 가이드(2단계 중 로드)

  • 🐍 Python 구현 가이드 - 다음을 포함한 완전한 Python/FastMCP 가이드:

    • 서버 초기화 패턴
    • Pydantic 모델 예제
    • @mcp.tool을 사용한 도구 등록
    • 완전한 작동 예제
    • 품질 체크리스트
  • ⚡ TypeScript 구현 가이드 - 다음을 포함한 완전한 TypeScript 가이드:

    • 프로젝트 구조
    • Zod 스키마 패턴
    • server.registerTool을 사용한 도구 등록
    • 완전한 작동 예제
    • 품질 체크리스트

평가 가이드(4단계 중 로드)

  • ✅ 평가 가이드 - 다음을 포함한 완전한 평가 생성 가이드:
    • 질문 생성 지침
    • 답변 확인 전략
    • XML 형식 사양
    • 예제 질문 및 답변
    • 제공된 스크립트로 평가 실행

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

agencelutie/LP-lutie

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

agencelutie/LP-lutie

Submit expense reimbursements through Benepass (app.getbenepass.com). For users whose employer uses Benepass as their benefits platform. Handles login, benefit selection, form filling, receipt upload, and submission. Requires browser/computer-use capabilities.

agencelutie/LP-lutie

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

agencelutie/LP-lutie

Make a phone call to book an appointment or reservation. Checks calendar first, gets explicit consent before dialing, discloses AI identity on the call, and adds the booking to calendar when done.

agencelutie/LP-lutie

Cancel a subscription or unsubscribe from a service. Works from a description, a pasted charge line, a URL, or a photo/screenshot. Can also audit a full statement for recurring charges and cancel several at once. Finds the right contact method and handles the cancellation — including phone calls.

agencelutie/LP-lutie

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

agencelutie/LP-lutie

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

agencelutie/LP-lutie

Help plan an event — from a birthday dinner to a wedding. Scales to the size of the occasion. Handles venue research, guest lists, timelines, vendors, and budgets.

agencelutie/LP-lutie

Help submit an expense or reimbursement on any platform. Detects the right tool (Benepass, Brex, Concur, Expensify, etc.), finds receipts, checks for duplicates, and walks through submission.

agencelutie/LP-lutie

Handle small bureaucratic tasks — jury duty responses, parking tickets, passport renewals, DMV forms, permit applications, and other government or administrative paperwork.

agencelutie/LP-lutie

Run financial calculations and scenario comparisons — tax estimates, loan comparisons, retirement projections, rent vs. buy, investment scenarios, and more. Pure math, no accounts or logins needed.

agencelutie/LP-lutie

Help order groceries for delivery. Concierge-style flow — store selection, occasion-based list building, budget tracking, and cart assembly.

agencelutie/LP-lutie

Help find and book a service provider for a task — cleaning, handyman, moving, assembly, yard work, errands, etc. Searches TaskRabbit, Handy, Thumbtack, and similar platforms.

agencelutie/LP-lutie

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

agencelutie/LP-lutie

Help order food timed to arrive at a specific time. Works backward from target arrival, suggests restaurants, builds cart, and monitors delivery.

agencelutie/LP-lutie

Refill a prescription at a pharmacy. Works from a medication name, an Rx number, a photo of the bottle, or just "I'm running low." Confirms exactly what's being requested, gathers everything the pharmacy will ask for up front, and handles the refill online or by phone — whichever is fastest.

agencelutie/LP-lutie

Help return an item or request a refund from any retailer. Identifies the item, finds the return policy, navigates the process, and handles shipping labels or phone calls.

agencelutie/LP-lutie

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

agencelutie/LP-lutie

Landing page quality assessment for paid advertising campaigns. Evaluates message match, page speed, mobile experience, trust signals, form optimization, and conversion rate potential. Use when user says "landing page", "post-click experience", "landing page audit", "conversion rate", or "landing page optimization".

agencelutie/LP-lutie

Generate structured landing page copy with hero, body, proof, and CTA sections. Framework-agnostic - adapts approach based on awareness level and offer type.

관련 스킬