FastAPI SSE MCP ランダム
ストリーミング通信にServer-Sent Events (SSE)を用いたModel Context Protocol (MCP)を実装したFastAPIサーバー。このプロジェクトでは、乱数生成、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 -1815Python
- -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 -9PythonMIT 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 -32Python
- -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 -3PythonMIT License