Model Context Protocol host server with browser automation via Playwright MCP, LLM-powered tool selection, and natural language command processing for complex web automation tasks.
A Model Context Protocol (MCP) host server that integrates multiple MCP servers with LLM capabilities. This skill provides browser automation via Playwright MCP with intelligent natural language command processing and dynamic tool selection.
This skill helps you set up, develop, and work with an MCP-based browser automation system that:
When working with this MCP browser automation project, follow these steps:
First, understand the project structure:
```bash
```
Verify the environment setup:
```bash
python --version
ls venv/
cat .env
```
If setup is needed:
```bash
venv/Scripts/python.exe setup.py
cp .env.example .env
venv/Scripts/python.exe test_setup.py
```
For interactive mode with natural language processing:
```bash
venv/Scripts/python.exe user_interface.py --interactive
```
For single command execution:
```bash
venv/Scripts/python.exe user_interface.py --command "open google.com"
venv/Scripts/python.exe user_interface.py --command "go to youtube and search for python"
```
For debugging:
```bash
LOG_LEVEL=DEBUG venv/Scripts/python.exe user_interface.py --interactive
```
Run the comprehensive test suite:
```bash
venv/Scripts/python.exe test_setup.py
```
Test individual components:
```bash
venv/Scripts/python.exe -c "from llm_config import llm; print('LLM OK')"
venv/Scripts/python.exe -c "from mcp_client import MCPClient; print('MCP Client OK')"
venv/Scripts/python.exe -c "from mcp_client import MCPClient; c = MCPClient({}); print(c.correct_url('goole.com'))"
```
**Code Patterns:**
**When modifying code:**
The system processes natural language commands dynamically:
**Simple navigation with auto-correction:**
```
"open goole.com" # Auto-corrects to google.com
"visit youtub.com" # Auto-corrects to youtube.com
```
**Multi-step operations:**
```
"go to google and search for python tutorials"
"navigate to amazon and find laptops"
"open github and look for AI repositories"
```
**Complex browsing tasks:**
```
"visit news website and summarize the headlines"
"go to wikipedia and research machine learning"
```
**If browser doesn't open:**
**If LLM calls fail:**
**If MCP tools aren't working:**
**If URL correction fails:**
**System Requirements:**
**Main Python Dependencies:**
```bash
cd custom_mcp
venv/Scripts/python.exe setup.py
cp .env.example .env
venv/Scripts/python.exe test_setup.py
venv/Scripts/python.exe user_interface.py --interactive
```
1. Review existing tools in `custom_mcp_server.py`
2. Add new tool definition following FastMCP patterns
3. Update `mcp_client.py` if new dynamic processing needed
4. Add test cases to `test_setup.py`
5. Update documentation in this file
```bash
LOG_LEVEL=DEBUG venv/Scripts/python.exe user_interface.py --interactive
LOG_LEVEL=DEBUG venv/Scripts/python.exe user_interface.py --command "your complex command here"
venv/Scripts/python.exe -c "from component import function; print(function())"
```
This implementation uses natural language processing instead of hard-coded commands:
| Old Approach | New Natural Language Approach |
|--------------|-------------------------------|
| `navigate https://google.com` | `"open google.com"` |
| `call-tool playwright browser_navigate` | `"go to google.com"` |
| Multiple separate commands | `"go to X and do Y"` (single command) |
The system dynamically interprets intent, corrects URLs, and chains operations automatically.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/mcp-browser-automation/raw