游侠云服务,免实名免备案服务器 游侠云域名,免实名免备案域名

统一声明:

1.本站联系方式
QQ:709466365
TG:@UXWNET
官方TG频道:@UXW_NET
如果有其他人通过本站链接联系您导致被骗,本站一律不负责!

2.需要付费搭建请联系站长QQ:709466365 TG:@UXWNET
3.免实名域名注册购买- 游侠云域名
4.免实名国外服务器购买- 游侠云服务

技术

在AI Agent和MCP(Model Context Protocol)生态快速发展的今天,越来越多优秀的MCP工具涌现出来。今天为大家推荐一个值得关注的项目——fastapi_mcp

项目简介:Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

技术信息:主要语言:Python | GitHub Stars:11,860 | 标签:ai, authentication, authorization, claude, cursor

📖 项目详情

Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

该项目主要使用Python开发。

相关领域:人工智能, authentication, authorization, claude, cursor


以下是项目原始介绍(英文):

fastapi-to-mcp

Built by Tadata

FastAPI-MCP

tadata-org%2Ffastapi_mcp | Trendshift

Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

![PyPI version](https://pypi.org/project/fastapi-mcp/)

![Python Versions](https://pypi.org/project/fastapi-mcp/)

![FastAPI](#)

![CI](https://github.com/tadata-org/fastapi_mcp/actions/workflows/ci.yml)

![Coverage](https://codecov.io/gh/tadata-org/fastapi_mcp)

fastapi-mcp-usage

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

FastAPI-MCP provides [comprehensive doc

…(更多内容请访问项目主页)

🔗 项目地址

https://github.com/tadata-org/fastapi_mcp

⭐ 11,860 Stars | Python