Mcp Aoai Web Browsing
@kimtth
A minimal Model Context Protocol 🖥️ server/client🧑💻with OpenAI and 🌐 web browser control via Playwright.
Overview
What is Mcp Aoai Web Browsing?
Mcp Aoai Web Browsing is a minimal MCP server and client application that combines Playwright-based web browsing with Azure OpenAI or OpenAI. It converts MCP tool responses into the OpenAI function calling format using a custom MCP-LLM Bridge, enabling AI assistants to navigate and interact with web pages programmatically.
How to use Mcp Aoai Web Browsing?
Configure a .env file with your Azure OpenAI endpoint, API key, deployment model, and API version. Install uv, run uv sync to install dependencies, then execute python chatgui.py to launch the chat interface. For external clients (Claude Desktop, VS Code, Claude Code), add a mcp.json configuration pointing to the server script.
Key features of Mcp Aoai Web Browsing
- Built with FastMCP and Playwright for web automation
- Converts MCP tools to OpenAI function calling format
- Supports both Azure OpenAI and standard OpenAI providers
- Works in-process or via external stdio MCP server connections
- Reusable by different clients (Claude Desktop, VS Code, custom scripts)
- Exposes direct tool metadata and execution for custom LLM loops
Use cases of Mcp Aoai Web Browsing
- AI agents that need to navigate websites and extract content
- Automated web form filling and login workflows
- Browser-based testing orchestrated by an LLM
FAQ from Mcp Aoai Web Browsing
What dependencies are required?
The project uses uv for Python library management. During development in December 2024, pip and poetry were not yet fully supported by the MCP CLI. Playwright is used as the web testing framework.
How do I configure for Azure OpenAI vs standard OpenAI?
For Azure OpenAI, set AZURE_OPEN_AI_ENDPOINT, AZURE_OPEN_AI_API_KEY, AZURE_OPEN_AI_DEPLOYMENT_MODEL, and AZURE_OPEN_AI_API_VERSION in .env. For standard OpenAI, use the get_openai_llm_config() function and set OPENAI_API_KEY and OPENAI_MODEL environment variables.
What transport layer does the server use?
The server communicates over stdio (a transport layer) using JSON-RPC as the application protocol. This is commonly described as "JSON-RPC over stdio."
How do I connect external clients?
External clients like Claude Desktop, Claude Code, and VS Code connect via mcp.json configuration. The configuration specifies the uv command to run the FastMCP server script and provides environment variables for Azure OpenAI credentials.
What tools does the server expose?
The server exposes tools such as playwright_navigate, which accepts a URL, optional timeout, and wait condition. Tools are defined using FastMCP's @self.mcp.tool() decorator, and their docstrings provide descriptions used for function calling.