SuperAPI AI Directory

mcp-aoai-web-browsing

Minimal MCP server and client implementation using Azure OpenAI and Playwright.

Open website

About this tool

Purpose: This is a Model Context Protocol (MCP) hands-on project that uses Playwright to control a visible Chromium browser, together with Azure OpenAI/OpenAI Chat Completions function calling, to implement LLM-driven web browsing and page element extraction, and provides a Tkinter chat interface. The repository also additionally contains MCP v1/v2, local OAuth, and Prefab-based interactive MCP Apps learning examples.

Main capabilities: Provides browser tools via fastmcp (such as playwright_navigate, with the docstring "Navigate to a URL."), maintaining the current page across multiple tool calls; the local client_bridge adapts MCP tool definitions into OpenAI function calls, supporting an in-process FastMCP server or an external stdio server; the GUI uses Azure OpenAI, and Python callers can also configure the bridge as standard OpenAI.

Usage: Requires Python 3.13 or above, Tkinter, a graphical desktop session, and uv. In the repository root, run uv sync and uv run playwright install chromium to install dependencies and Chromium, then use uv run python chatgui.py to start the GUI. You need to copy .env.template to .env and configure an Azure OpenAI deployment that supports tool calling, involving AZURE_OPEN_AI_ENDPOINT, AZURE_OPEN_AI_API_KEY, AZURE_OPEN_AI_DEPLOYMENT_MODEL, AZURE_OPEN_AI_API_VERSION; if the endpoint ends with /openai/v1, fill in the full URL and no API version is needed, and a short-term Entra token can also be provided via AZURE_OPENAI_AD_TOKEN. External clients (Claude Desktop, Claude Code, VS Code) start this server via stdio, and the above configuration must be completed first; the server still requires Azure settings.

Applicable scenarios and limitations: Suitable for learning the MCP protocol,stdio and JSON-RPC message formats, tool description generation, and client integration. Limitations: only these capabilities are provided as described in the materials; no information on fees, pricing, effectiveness, or production readiness is provided; tokens are not automatically refreshed; the example environment uses FastMCP 3.2.0, MCP SDK 1.27.0, Prefab 0.20.2, and the root dependencies are declared as minimum versions rather than compatibility upper bounds; in the v2 and OAuth examples, mode="2026-07-28" is the expected path in the code, not a verified integration result; these Prefab examples have not been proven to run in the supported hosts; the original Tkinter GUI is not an MCP Apps host; the support information in the official client support matrix does not mean these examples have been verified.