
tadata-org/fastapi_mcp
API development이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
FastAPI 엔드포인트를 Auth!를 적용해 모델 컨텍스트 프로토콜(MCP) 도구로 노출하세요.
개요
FastAPI 엔드포인트를 Auth!를 적용해 모델 컨텍스트 프로토콜(MCP) 도구로 노출하세요. - 기존 FastAPI 의존성을 활용해 내장된 것! - 단순한 OpenAPI -> MCP 변환기가 아닙니다 - 필수 - FastAPI 앱에 가리키기만 하면 작동합니다 - 요청 모델과 응답 모델의 경우 - Swagger와 마찬가지로 모든 종점 중 하나입니다 - - MCP 서버를 동일한 앱에 마운트하거나 별도로 배포 - - 효율적인 통신을 위해 FastAPI의 ASGI 인터페이스를 직접 사용합니다
개요(AI 번역)
타다타 제작
FastAPI-MCP
FastAPI 엔드포인트를 Auth!를 적용해 모델 컨텍스트 프로토콜(MCP) 도구로 노출하세요.
특징
-
인증이 내장되어 있으며, 기존 FastAPI 의존성을 활용합니다!
-
FastAPI 네이티브: 단순한 OpenAPI -> MCP 변환기가 아닙니다
-
Zero/Minimal Configuration 필요 - FastAPI 앱에 가리키기만 하면 작동합니다
-
요청 모델과 응답 모델의 스키마 보존
-
**Swagger와 마찬가지로 모든 엔드포인트의 문서를 보존하세요
-
유연한 배포 - MCP 서버를 동일한 앱에 마운트하거나 별도로 배포할 수 있습니다
-
ASGI 전송 - 효율적인 통신을 위해 FastAPI의 ASGI 인터페이스를 직접 사용합니다
호스팅 솔루션
관리형 호스팅 솔루션을 선호한다면 tadata.com 확인해 보세요.
설치
우리는 빠른 Python 설치 프로그램인 uv를 사용할 것을 권장합니다:
또는 PIP로 설치할 수도 있습니다:
기본 사용법
FastAPI-MCP를 사용하는 가장 간단한 방법은 FastAPI 애플리케이션에 MCP 서버를 직접 추가하는 것입니다:
그게 전부입니다! 자동 생성된 MCP 서버가 이제 https://app.base.url/mcp에서 이용 가능합니다.
문서, 예제 및 고급 사용
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
FastAPI-MCP
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
Features
-
Authentication built in, using your existing FastAPI dependencies!
-
FastAPI-native: Not just another OpenAPI -> MCP converter
-
Zero/Minimal configuration required - just point it at your FastAPI app and it works
-
Preserving schemas of your request models and response models
-
Preserve documentation of all your endpoints, just as it is in Swagger
-
Flexible deployment - Mount your MCP server to the same app, or deploy separately
-
ASGI transport - Uses FastAPI’s ASGI interface directly for efficient communication
Hosted Solution
If you prefer a managed hosted solution check out tadata.com.
Installation
We recommend using uv, a fast Python package installer:
uv add fastapi-mcp
Alternatively, you can install with pip:
pip install fastapi-mcp
Basic Usage
The simplest way to use FastAPI-MCP is to add an MCP server directly to your FastAPI application:
from fastapi import FastAPI
from fastapi_mcp import FastApiMCP
app = FastAPI()
mcp = FastApiMCP(app)
# Mount the MCP server directly to your FastAPI app
mcp.mount()
That’s it! Your auto-generated MCP server is now available at https://app.base.url/mcp.
Documentation, Examples and Advanced Usage
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →