MCP-YNU - FastMCP サーバー
各ディレクトリからツール、リソース、プロンプトを自動的に読み込む FastMCP を使用した動的 MCP サーバー実装。
特徴
tools/
、resources/
、prompts/
ディレクトリからのモジュールの動的ロードモジュールの自動検出と登録
シンプルな構成と拡張性
コードの明確さと静的解析を向上させる型ヒント
サーバーアクティビティを監視するための包括的なログ記録
最近の更新
コードベース全体に型ヒントを追加しました
MCPインスタンス処理の改善
ログ機能の追加
MITライセンスを追加
参照リンクを含むドキュメントを更新しました
ディレクトリ構造
使用法
適切なディレクトリにモジュールを作成する
from mcp_server import mcp
経由で mcp をインポートします。サーバーを実行します。
サンプルモジュール
ツールモジュールの例 (tools/example.py)
リソースモジュールの例 (resources/example.py)
プロンプトモジュールの例 (prompts/example.py)
デバッグ
.env
のMCP_TRANSPORT_TYPE
を更新し、python main.py
を実行して mcp サーバーを起動します。npx @modelcontextprotocol/inspector
を実行してinspectを開きます。URL
http://localhost:<mcp_server_port>/sse
でSSE
トランスポート タイプを選択するか、コマンドpython
と引数/path/to/main.py
でSTDIO
トランスポート タイプを選択します。
要件
Python >= 3.10
ファストMCP
参考リンク
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
ツール、リソース、プロンプトをそれぞれのディレクトリから自動的に読み込み、簡単に拡張および構成できる動的な MCP サーバー実装。
Related MCP Servers
- AsecurityAlicenseAqualityMCP server that builds itself by creating new tools as needed based on user requests (Requires restart of Claude Desktop to use newly created tools).Last updated -427The Unlicense
- -securityFlicense-qualityA configurable MCP server that dynamically loads capabilities from a remote configuration to bridge MCP clients with remote APIs for executing actions, accessing resources, and utilizing prompt templates.Last updated -5965
- AsecurityAlicenseAqualityA tool that dynamically generates and configures MCP servers by automatically creating necessary directories and files according to user specifications.Last updated -11619MIT License