
punkpeye/fastmcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP 서버 구축을 위한 TypeScript 프레임워크입니다.
개요
클라이언트 세션을 처리할 수 있는 MCP 서버를 구축하기 위한 TypeScript 프레임워크입니다. Python 구현체는 FastMCP를 참조하세요. FastMCP는 공식 SDK 위에 구축되어 있습니다. 공식 SDK는 MCP 구축을 위한 기본 블록을 제공하지만, 많은 구현 세부사항은 여러분에게 맡깁니다: - 모든 서버 구성 요소 시작 및 구성 - 연결 처리 - 도구 처리 - 응답 처리 - 자원 처리 - 프롬프트, 리소스, 리소스 템플릿 추가 - 리소스, 이미지 및 오디오 콘텐츠 블록 삽입 FastMCP는 다음과 같은 의견 있는 프레임워크를 제공함으로써 이러한 복잡성을 제거합니다: - 모든 보일러플레이트 자동 처리 - 일반적인 작업에 대해 간단하고 직관적인 API 제공 - 내장된 모범 사례 및 오류 처리 기능 포함 - MCP의 핵심 기능에 집중할 수 있게 해 줍니다 저수준 구현 세부사항을 다루지 않고 MCP 서버를 빠르게 구축하는 것이 중요합니다.
개요(AI 번역)
클라이언트 세션을 처리할 수 있는 MCP 서버를 구축하기 위한 TypeScript 프레임워크입니다.
[! 중요]
FastMCP> 레거시 핸드셰이크 기반 MCP 개정판(2025-11-25 및 그 이전)을 구현합니다. 현재 명세인 2026-07-28를 지원하지 않으며, 프로토콜을 상태 없이 만들었으며, initialize 핸드셰이크도 Mcp-Session-Id도 없습니다. 현재 사양을 목표로 하는 프레임워크는 ViteMCP를 사용하세요.
특징
- 간단한 도구, 자원, 프롬프트 정의
- OpenAPI에서 MCP로의 변환
- 인증
- 문맥을 통한 헤더 전달
- 세션 ID 및 요청 ID 추적
- 세션
- 이미지 콘텐츠
- 오디오 콘텐츠
- 임베디드
- 로깅
- 오류 처리
- HTTP 스트리밍 (SSE 호환 포함)
- 안전한 연결을 위한 HTTPS 지원
- REST API, 웹훅, 관리자 인터페이스를 위한 맞춤형 HTTP 경로
- Cloudflare Workers, Deno Deploy 등 엣지 런타임 지원
- 서버리스 배포를 위한 상태 없는 모드
- CORS (기본적으로 활성화됨)
- 진행 상황 알림
- 스트리밍 출력
- 타입이 있는 서버 이벤트
- 즉각적인 인자 자동 완성
- 샘플링
- 유도
- 설정 가능한 핑 동작
- 건강 점검 엔드포인트
- 뿌리
- 포트를 바인딩하지 않고 단위 테스트를 위한 메모리 내 전송
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
FastMCP
A TypeScript framework for building MCP servers capable of handling client sessions.
[!IMPORTANT]
FastMCP implements the legacy, handshake-based MCP revisions (
2025-11-25and earlier). It does not support the current specification,2026-07-28, which made the protocol stateless — noinitializehandshake and noMcp-Session-Id. For a framework targeting the current spec, use ViteMCP.
Features
- Simple Tool, Resource, Prompt definition
- OpenAPI to MCP conversion
- Authentication
- Passing headers through context
- Session ID and Request ID tracking
- Sessions
- Image content
- Audio content
- Embedded
- Logging
- Error handling
- HTTP Streaming (with SSE compatibility)
- HTTPS Support for secure connections
- Custom HTTP routes for REST APIs, webhooks, and admin interfaces
- Edge Runtime Support for Cloudflare Workers, Deno Deploy, and more
- Stateless mode for serverless deployments
- CORS (enabled by default)
- Progress notifications
- Streaming output
- Typed server events
- Prompt argument auto-completion
- Sampling
- Elicitation
- Configurable ping behavior
- Health-check endpoint
- Roots
- In-memory transport for unit testing without binding a port
- CLI for testing and debugging
When to use FastMCP over the official SDK?
FastMCP is built on top of the official SDK.
The official SDK provides foundational blocks for building MCPs, but leaves many implementation details to you:
- Initiating and configuring all the server components
- Handling of connections
- Handling of tools
- Handling of responses
- Handling of resources
설치
npx tsx /PATH/TO/YOUR_PROJECT/src/index.ts설정
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": ["tsx", "/PATH/TO/YOUR_PROJECT/src/index.ts"],
"env": {
"YOUR_ENV_VAR": "value"
}
}
}
}