fastmcp-server
하는 일
이 스킬은 FastMCP 라이브러리로 Python MCP 서버를 작성하는 과정을 안내합니다. AI 도구가 도구, 리소스, 프롬프트를 표준 방식으로 제공하게 하려는 개발자를 위한 것입니다.
사용하는 경우
- ✓FastMCP로 Python MCP 서버를 새로 만들고 싶을 때.
- ✓기존 FastMCP 서버에 도구, 리소스, 프롬프트를 추가해야 할 때.
- ✓FastMCP 서버의 스키마와 정의에 문제가 없는지 검토하고 싶을 때.
스킬 링크
https://github.com/PrefectHQ/fastmcp/blob/main/docs/.mintlify/skills/fastmcp-server/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“주문 상태를 조회하는 도구를 제공하는 작은 Python MCP 서버를 만들도록 도와주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 프로젝트의 FastMCP 버전을 확인하고, 그 버전에 맞는 문서를 읽은 뒤, Python 타입 힌트와 설명에서 도구 스키마가 만들어지는 서버 코드를 작성합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Authoring MCP servers with FastMCP
Find the current API
Check the project's installed FastMCP version and dependency constraints.
Fetch the documentation index and read the
relevant pages for that version. The index includes versioned documentation;
select /v3/ pages for FastMCP 3 and unversioned pages for FastMCP 4. Read
individual pages through their .md URLs instead of loading llms-full.txt.
For APIs newer than the installed release, check that release's source or
signatures. Preserve the project's dependency constraints unless an upgrade is
part of the request. For a new project, check the current stable release before
choosing a dependency.
Use the standalone fastmcp package. Its API differs from
mcp.server.fastmcp in the Python MCP SDK.
Author the server
Choose the MCP interface to suit what the server exposes: tools for callable
operations, resources for addressable content, and prompts for reusable message
templates. FastMCP derives tool schemas from Python annotations and descriptions;
use Literal or enums for finite choices and Field descriptions for parameter
semantics. SDK wrappers need to preserve signatures and docstrings, for example
with functools.wraps, or discovery loses that information. Inspect the schema
the client receives, especially after transforms or custom discovery rendering:
requiredness, enum values, and nested fields can disappear from a summary.
Let the intended client tasks guide tool boundaries, descriptions, and result shape. Give clients enough context to use results and recover from errors. The right granularity depends on the service; generated API tools, custom tools, and compositions can all be appropriate.
For paginated or bounded results, expose whether the answer is complete and how
to continue. An upstream failure is not an empty result. Return useful recovery
information through tool errors rather than a successful-looking payload. Use
ToolError, ResourceError, or PromptError from fastmcp.exceptions for
intentional client-facing messages. With mask_error_details=True, ordinary
exceptions such as ValueError lose their messages; do not put sensitive backend
details in the explicit error types, whose messages remain visible.
When using tool search or code mode, make exact named operations discoverable and explain the execution contract: what persists between calls and what becomes the result. A short fetch/filter/return example can prevent repeated empty outputs. Check the installed implementation before describing that behavior.
Look up FastMCP's relevant facilities as needed: context and dependencies, lifespan, authentication, composition, and transports. Use the project's runtime and hosting choices to determine configuration.
When clients need a repeatable workflow across the server's capabilities,
consider shipping a skill alongside those capabilities. Put task selection,
operation sequencing, and recovery guidance in the skill; keep tool descriptions
focused on their individual contracts. Read the version-matched Skills Provider
and Experimental Skills Extension docs from the index before implementing it.
SkillsDirectoryProvider exposes skill files as resources; the experimental
extension adds skills/list and skills/get discovery. Check the installed
release and target host's support before selecting either interface. Discovery
does not activate a skill: verify that the host reads and uses it in the intended
workflow. The experimental extension currently requires directly registered
providers and does not support mounted or transformed skill sources.
Verify the server through FastMCP's Client, which can connect directly to a
server instance for in-process testing. Check a representative operation, its
client-visible schema and result, and a meaningful failure. For composed or
transformed servers, verify the public names and URIs through the outer server,
including resource references returned by prompts. Namespace transforms change
component names and resource URIs, but do not rewrite URI text inside prompt
messages. When a prompt must work both standalone and mounted, direct the client
to discover the resource template instead of hardcoding the child's URI.
Exercise the chosen transport when connection or deployment behavior is part
of the change.
Evaluate agent workflows
When the task includes evaluating how agents use the server, test a representative workflow using the proj
자주 묻는 질문
어떤 패키지를 사용하나요?
독립형 fastmcp Python 패키지를 사용하며, 이는 MCP SDK의 래퍼와 API가 다릅니다.
에이전트는 어떻게 올바른 API 버전을 고르나요?
프로젝트에 설치된 버전을 확인하고, 그 버전의 문서를 읽습니다.
도구 스키마는 어떻게 만들어지나요?
FastMCP가 Python 어노테이션과 설명으로 스키마를 만들기 때문에, 명확한 타입 힌트와 독스트링이 중요합니다.
상세 정보
작성자의 원본 설명
Build, extend, or review MCP servers with Python FastMCP, using documentation matched to the project's version.
repo: PrefectHQ/fastmcp
인기도
- GitHub 스타
- 28k
- 순위
- #9867
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
비슷한 스킬
mcporter
394k에이전트가 HTTP나 stdio로 MCP 서버와 그 도구를 목록화하고, 호출하고, 점검하며, 로그인 설정을 관리하도록 돕습니다.
fastmcp
260kAPI, 데이터베이스, 파일에 AI 어시스턴트가 도구로 접근할 수 있도록 Python MCP 서버를 만들고 테스트하고 배포하도록 돕습니다.
mcp-oauth-remote-gateway
260kHermes가 서버에서 실행될 때 일반 브라우저 로그인이 닿지 않는 경우를 위해, 원격 MCP 서버의 OAuth 로그인을 단계별로 안내합니다.