FastAPI SSE MCP 随机
一个 FastAPI 服务器,它使用服务器发送事件 (SSE) 实现模型上下文协议 (MCP),用于流式通信。该项目提供各种实用工具,包括随机数生成、使用 Azure OpenAI DALL-E 生成图像以及 AI 播客生成。
特征
用于实时流通信的服务器发送事件(SSE)
用于结构化工具使用的**模型上下文协议 (MCP)**实现
多种实用工具:
Echo 工具和资源
随机数生成器
通过 Azure OpenAI DALL-E 3 生成图像
AI播客生成
用于反思性回应的“思考工具”
先决条件
Python 3.10+
Azure OpenAI API 访问(用于图像生成)
安装
克隆存储库:
安装依赖项:
或者使用uv
:
用法
启动服务器
使用以下命令运行服务器:
服务器将从http://0.0.0.0:8000
启动
可用端点
GET /
:健康检查端点GET /sse/
:SSE 连接端点POST /messages/
:客户端消息的端点
可用工具
回声工具
随机数生成器
图像生成
播客一代
思考工具
项目结构
main.py
:主要的 FastAPI 应用程序和 MCP 工具实现sse.py
:服务器发送事件(SSE)实现pyproject.toml
:项目元数据和依赖项requirements.txt
:基本依赖项列表
依赖项
FastAPI:用于构建 API 的 Web 框架
MCP:模型上下文协议实现
OpenAI:Azure OpenAI 服务的客户端
Uvicorn:用于运行 FastAPI 应用程序的 ASGI 服务器
请求:用于 API 调用的 HTTP 库
执照
[在此指定您的许可证]
贡献
[项目贡献指南]
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
一个实现模型上下文协议 (MCP) 以供结构化工具使用的 FastAPI 服务器,提供实用工具,包括随机数生成、通过 Azure OpenAI DALL-E 生成图像以及 AI 播客生成。
Related MCP Servers
- AsecurityFlicenseAqualityA FastMCP server implementation that facilitates resource-based access to AI model inference, focusing on image generation through the Replicate API, with features like real-time updates, webhook integration, and secure API key management.Last updated -16
- -securityAlicense-qualityA high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.Last updated -9MIT License
- -securityFlicense-qualityA production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).Last updated -34
- -securityAlicense-qualityA FastMCP server implementation that provides a standardized interface for accessing AI models hosted on Replicate's API, currently supporting image generation with customizable parameters.Last updated -3MIT License