https://github.com/kimtth/mcp-aoai-web-browsing
A minimal Model Context Protocol 🖥️ server/client🧑💻with Azure OpenAI and 🌐 web browser control via Playwright.
https://github.com/kimtth/mcp-aoai-web-browsing
azure-openai mcp mcp-client mcp-server model-context-protocol playwright web-automation
Last synced: about 1 month ago
JSON representation
A minimal Model Context Protocol 🖥️ server/client🧑💻with Azure OpenAI and 🌐 web browser control via Playwright.
- Host: GitHub
- URL: https://github.com/kimtth/mcp-aoai-web-browsing
- Owner: kimtth
- License: mit
- Created: 2024-12-13T12:12:08.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-04-07T08:27:05.000Z (7 months ago)
- Last Synced: 2025-08-18T08:45:37.725Z (3 months ago)
- Topics: azure-openai, mcp, mcp-client, mcp-server, model-context-protocol, playwright, web-automation
- Language: Python
- Homepage:
- Size: 429 KB
- Stars: 27
- Watchers: 1
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - kimtth/mcp-aoai-web-browsing - A minimal MCP server/client implementation using Azure OpenAI and Playwright for web browsing. ([Read more](/details/kimtthmcp-aoai-web-browsing.md)) `mcp` `web` `playwright` `azure` `openai` (Code Execution & Automation MCP Servers)
- awesome-mcp-list - @kimtth/mcp-aoai-web-browsing - aoai-web-browsing?style=social)](https://github.com/kimtth/mcp-aoai-web-browsing): Implements minimal web browsing using Azure OpenAI and Playwright. (Uncategorized / Uncategorized)
- awesome-mcp-zh - kimtth/mcp-aoai-web-browsing
- awesome-mcp-servers - **mcp-aoai-web-browsing** - A minimal Model Context Protocol 🖥️ server/client🧑💻with Azure OpenAI and 🌐 web browser control via Playwright. `python` `azure-openai` `mcp` `mcp-client` `mcp-server` `pip install git+https://github.com/kimtth/mcp-aoai-web-browsing` (🤖 AI/ML)
- awesome-mcp-servers - @kimtth/mcp-aoai-web-browsing - A `minimal` server/client MCP implementation using Azure OpenAI and Playwright. (Legend / 📂 <a name="browser-automation"></a>Browser Automation)
- awesome-mcp-servers - kimtth/mcp-aoai-web-browsing - Azure OpenAIとPlaywrightを使用した「最小限の」サーバー/クライアントMCP実装 (スター履歴 / 📂 <a name="browser-automation"></a>ブラウザ自動化)
- awesome-mcp-servers - MCP-AOAI Web Browser - A minimal Model Context Protocol 🖥️ server/client🧑💻with Azure OpenAI and 🌐 web browser control via Playwright. (Table of Contents / AI Services)
- awesome-devops-mcp-servers - kimtth/mcp-aoai-web-browsing - A `minimal` server/client MCP implementation using Azure OpenAI and Playwright. (CI/CD & DevOps Pipelines / 📂 Browser Automation)
- awesome-mcp - @kimtth/mcp-aoai-web-browsing - A `minimal`server/client MCP implementation using Azure OpenAI and Playwright. (MCP Servers / 📂 Browser Automation)
- metorial-index - AOAI Web Browsing - An MCP server for web browsing automation that integrates Azure OpenAI to facilitate interactions with web applications through an automated interface. It utilizes Playwright for end-to-end testing and customizes responses to fit the OpenAI function calling format. (Cloud Services)
README
## MCP Server & Client implementation for using Azure OpenAI
- A minimal server/client application implementation utilizing the Model Context Protocol (MCP) and Azure OpenAI.
1. The MCP server is built with `FastMCP`.
2. `Playwright` is an an open source, end to end testing framework by Microsoft for testing your modern web applications.
3. The MCP response about tools will be converted to the OpenAI function calling format.
4. The bridge that converts the MCP server response to the OpenAI function calling format customises the `MCP-LLM Bridge` implementation.
5. To ensure a stable connection, the server object is passed directly into the bridge.
## Model Context Protocol (MCP)
**Model Context Protocol (MCP)** MCP (Model Context Protocol) is an open protocol that enables secure, controlled interactions between AI applications and local or remote resources.
### Official Repositories
- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)
- [Create Python Server](https://github.com/modelcontextprotocol/create-python-server)
- [MCP Servers](https://github.com/modelcontextprotocol/servers)
### Community Resources
- [Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers)
- [MCP on Reddit](https://www.reddit.com/r/mcp/)
### Related Projects
- [FastMCP](https://github.com/jlowin/fastmcp): The fast, Pythonic way to build MCP servers.
- [Chat MCP](https://github.com/daodao97/chatmcp): MCP client
- [MCP-LLM Bridge](https://github.com/bartolli/mcp-llm-bridge): MCP implementation that enables communication between MCP servers and OpenAI-compatible LLMs
### MCP Playwright
- [MCP Playwright server](https://github.com/executeautomation/mcp-playwright)
- [Microsoft Playwright for Python](https://github.com/microsoft/playwright-python)
### Configuration
During the development phase in December 2024, the Python project should be initiated with 'uv'. Other dependency management libraries, such as 'pip' and 'poetry', are not yet fully supported by the MCP CLI.
1. Rename `.env.template` to `.env`, then fill in the values in `.env` for Azure OpenAI:
```bash
AZURE_OPEN_AI_ENDPOINT=
AZURE_OPEN_AI_API_KEY=
AZURE_OPEN_AI_DEPLOYMENT_MODEL=
AZURE_OPEN_AI_API_VERSION=
```
1. Install `uv` for python library management
```bash
pip install uv
uv sync
```
1. Execute `python chatgui.py`
- The sample screen shows the client launching a browser to navigate to the URL.

### w.r.t. 'stdio'
`stdio` is a **transport layer** (raw data flow), while **JSON-RPC** is an **application protocol** (structured communication). They are distinct but often used interchangeably, e.g., "JSON-RPC over stdio" in protocols.
### Tool description
```cmd
@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'}
```
### Tip: uv
- [features](https://docs.astral.sh/uv/getting-started/features)
```
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.
```
### Tip
- taskkill command for python.exe
```cmd
taskkill /IM python.exe /F
```
- Visual Code: Python Debugger: Debugging with launch.json will start the debugger using the configuration from .vscode/launch.json.