- 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
Add this skill
npx mdskills install kimtth/mcp-aoai-web-browsingIntegrates Azure OpenAI with Playwright-based MCP server for web automation
1## MCP Server & Client implementation for using Azure OpenAI23<!-- [](https://smithery.ai/server/mcp-web-auto) -->45- A minimal server/client application implementation utilizing the Model Context Protocol (MCP) and Azure OpenAI.67 1. The MCP server is built with `FastMCP`.8 2. `Playwright` is an an open source, end to end testing framework by Microsoft for testing your modern web applications.9 3. The MCP response about tools will be converted to the OpenAI function calling format.10 4. The bridge that converts the MCP server response to the OpenAI function calling format customises the `MCP-LLM Bridge` implementation.11 5. To ensure a stable connection, the server object is passed directly into the bridge.1213## Model Context Protocol (MCP)1415**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.1617### Official Repositories1819- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)20- [Create Python Server](https://github.com/modelcontextprotocol/create-python-server)21- [MCP Servers](https://github.com/modelcontextprotocol/servers)2223### Community Resources2425- [Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers)26- [MCP on Reddit](https://www.reddit.com/r/mcp/)2728### Related Projects2930- [FastMCP](https://github.com/jlowin/fastmcp): The fast, Pythonic way to build MCP servers.31- [Chat MCP](https://github.com/daodao97/chatmcp): MCP client32- [MCP-LLM Bridge](https://github.com/bartolli/mcp-llm-bridge): MCP implementation that enables communication between MCP servers and OpenAI-compatible LLMs3334### MCP Playwright3536- [MCP Playwright server](https://github.com/executeautomation/mcp-playwright)37- [Microsoft Playwright for Python](https://github.com/microsoft/playwright-python)3839### Configuration4041During 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.42431. Rename `.env.template` to `.env`, then fill in the values in `.env` for Azure OpenAI:4445 ```bash46 AZURE_OPEN_AI_ENDPOINT=47 AZURE_OPEN_AI_API_KEY=48 AZURE_OPEN_AI_DEPLOYMENT_MODEL=49 AZURE_OPEN_AI_API_VERSION=50 ```51521. Install `uv` for python library management5354 ```bash55 pip install uv56 uv sync57 ```58591. Execute `python chatgui.py`6061 - The sample screen shows the client launching a browser to navigate to the URL.6263 <img alt="chatgui" src="doc/chatgui_gpt_generate.png" width="300"/>6465### w.r.t. 'stdio'6667`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.6869### Tool description7071```cmd72@self.mcp.tool()73async def playwright_navigate(url: str, timeout=30000, wait_until="load"):74 """Navigate to a URL.""" -> This comment provides a description, which may be used in a mechanism similar to function calling in LLMs.7576# Output77Tool(name='playwright_navigate', description='Navigate to a URL.', inputSchema={'properties': {'url': {'title': 'Url', 'type': 'string'}, 'timeout': {'default': 30000, 'title': 'timeout', 'type': 'string'}78```7980### Tip: uv8182- [features](https://docs.astral.sh/uv/getting-started/features)8384```85uv run: Run a script.86uv venv: Create a new virtual environment. By default, '.venv'.87uv add: Add a dependency to a script88uv remove: Remove a dependency from a script89uv sync: Sync (Install) the project's dependencies with the environment.90```9192### Tip9394- taskkill command for python.exe9596```cmd97taskkill /IM python.exe /F98```99- Visual Code: Python Debugger: Debugging with launch.json will start the debugger using the configuration from .vscode/launch.json.100101<!-- ### Sample query102103Navigate to website http://eaapp.somee.com and click the login link. In the login page, enter the username and password as "admin" and "password" respectively and perform login. Then click the Employee List page and click "Create New" button and enter realistic employee details to create for Name, Salary, DurationWorked, Select dropdown for Grade as CLevel and Email. -->104105
Full transparency — inspect the skill content before installing.