Skip to main content
Glama

Azure OpenAI

by kimtth

Azure OpenAI を使用するための MCP サーバーとクライアントの実装

  • モデル コンテキスト プロトコル (MCP) と Azure OpenAI を活用した最小限のサーバー/クライアント アプリケーション実装。
    1. MCP サーバーはFastMCPを使用して構築されます。
    2. Playwrightは、最新の Web アプリケーションをテストするための、Microsoft によるオープン ソースのエンドツーエンドのテスト フレームワークです。
    3. ツールに関する MCP 応答は、OpenAI 関数呼び出し形式に変換されます。
    4. MCP サーバー応答を OpenAI 関数呼び出し形式に変換するブリッジはMCP-LLM Bridge実装をカスタマイズします。
    5. 安定した接続を確保するために、サーバー オブジェクトはブリッジに直接渡されます。

モデルコンテキストプロトコル(MCP)

モデル コンテキスト プロトコル (MCP) MCP (モデル コンテキスト プロトコル) は、AI アプリケーションとローカルまたはリモート リソース間の安全で制御された相互作用を可能にするオープン プロトコルです。

公式リポジトリ

コミュニティリソース

関連プロジェクト

  • FastMCP : MCP サーバーを構築するための高速な Python の方法。
  • チャットMCP :MCPクライアント
  • MCP-LLM ブリッジ: MCP サーバーと OpenAI 互換 LLM 間の通信を可能にする MCP 実装

MCP劇作家

構成

2024年12月の開発フェーズでは、Pythonプロジェクトは「uv」で開始される予定です。「pip」や「poetry」などの他の依存関係管理ライブラリは、MCP CLIではまだ完全にサポートされていません。

  1. .env.templateの名前を.envに変更し、Azure OpenAI の.envに値を入力します。
    AZURE_OPEN_AI_ENDPOINT= AZURE_OPEN_AI_API_KEY= AZURE_OPEN_AI_DEPLOYMENT_MODEL= AZURE_OPEN_AI_API_VERSION=
  2. Pythonライブラリ管理用のuvをインストールする
    pip install uv uv sync
  3. python chatgui.pyを実行する
    • サンプル画面では、クライアントがブラウザを起動して URL に移動する様子が示されています。

'stdio' に関して

stdioトランスポート層(生データフロー)であり、 JSON-RPCは アプリケーションプロトコル(構造化通信)です。これらは明確に区別できるものですが、プロトコルでは「JSON-RPC over stdio」のように、しばしば互換的に使用されます。

ツールの説明

@self.mcp.tool() async def playwright_navigate(url: str, timeout=30000, wait_until="load"): """Navigate to a URL.""" -> This comment provides a description, which may be used in a mechanism similar to function calling in LLMs. # Output Tool(name='playwright_navigate', description='Navigate to a URL.', inputSchema={'properties': {'url': {'title': 'Url', 'type': 'string'}, 'timeout': {'default': 30000, 'title': 'timeout', 'type': 'string'}

ヒント: uv

uv run: Run a script. uv venv: Create a new virtual environment. By default, '.venv'. uv add: Add a dependency to a script uv remove: Remove a dependency from a script uv sync: Sync (Install) the project's dependencies with the environment.

ヒント

  • python.exe の taskkill コマンド
taskkill /IM python.exe /F
  • Visual Code: Python デバッガー: launch.json を使用してデバッグすると、.vscode/launch.json の構成を使用してデバッガーが起動します。
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

モデル コンテキスト プロトコル (MCP) と Azure OpenAI を活用した最小限のサーバー/クライアント アプリケーション実装。

  1. モデルコンテキストプロトコル(MCP)
    1. 公式リポジトリ
    2. コミュニティリソース
    3. 関連プロジェクト
    4. MCP劇作家
    5. 構成
    6. 'stdio' に関して
    7. ツールの説明
    8. ヒント: uv
    9. ヒント

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    A Model Context Protocol (MCP) server that provides JSON-RPC functionality through OpenRPC.
    Last updated -
    2
    7
    33
    JavaScript
    Apache 2.0
    • Apple
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol (MCP) server that lets you seamlessly use OpenAI's models right from Claude.
    Last updated -
    1
    24
    28
    JavaScript
    MIT License
    • Apple
  • -
    security
    A
    license
    -
    quality
    An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
    Last updated -
    2
    Python
    MIT License
  • -
    security
    A
    license
    -
    quality
    A Model Context Protocol (MCP) server implementation for the OpenLedger API. This server provides structured context to AI models according to the MCP specification.
    Last updated -
    8
    TypeScript
    Apache 2.0

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kimtth/mcp-aoai-web-browsing'

If you have feedback or need assistance with the MCP directory API, please join our Discord server