Navigate to a URL.
This MCP server enables AI applications to control web browsers using Playwright, a powerful browser automation library. It bridges the Model Context Protocol with Azure OpenAI, allowing AI models to navigate websites, interact with web elements, and extract information from web pages. The implementation provides a minimal yet functional server/client setup that converts MCP responses to OpenAI function calling format, making it compatible with Azure OpenAI services. This enables seamless integration of web browsing capabilities into AI applications.
This MCP server provides web browser automation capabilities through Playwright, allowing AI models to navigate and interact with websites. It's designed to work with Azure OpenAI and includes a bridge that converts MCP responses to OpenAI function calling format.
Clone the repository:
git clone https://github.com/kimtth/mcp-aoai-web-browsing.git
cd mcp-aoai-web-browsing
Install uv
for Python package management:
pip install uv
Install dependencies:
uv sync
Configure Azure OpenAI credentials:
.env.template
to .env
AZURE_OPEN_AI_ENDPOINT=your_endpoint
AZURE_OPEN_AI_API_KEY=your_api_key
AZURE_OPEN_AI_DEPLOYMENT_MODEL=your_model
AZURE_OPEN_AI_API_VERSION=your_api_version
Start the MCP server and GUI interface:
python chatgui.py
This will launch a chat interface where you can interact with the AI and request web browsing actions.
You can ask the AI to perform various web browsing tasks, such as:
To integrate this MCP server with your AI application, you can use the client bridge provided in the repository. The bridge handles the conversion between MCP responses and OpenAI function calling format.
If you encounter issues with Python processes not terminating properly, you can use:
taskkill /IM python.exe /F
For debugging in Visual Studio Code, use the configuration in .vscode/launch.json
.