ScreenMonitorMCP
Enables real-time screen monitoring, UI element analysis, and predictive user behavior learning for AI assistants.
README
🚀 Revolutionary Screen Monitor MCP Server
A REVOLUTIONARY Model Context Protocol (MCP) server! Gives AI real-time vision capabilities, UI intelligence, and predictive behavior learning power. This isn't just screen capture - it gives AI the power to truly "see" and understand your digital world!
🌟 WHY ScreenMonitorMCP?
- 🔥 First & Only: Real-time continuous screen monitoring feature
- 🧠 AI Intelligence: AI that understands UI elements and can interact with them
- 🔮 Predictive: System that learns and predicts user behaviors
- ⚡ Proactive: Assistant that offers help before you need it
- 🎯 Natural: AI that understands commands like "Click the save button"
🔥 REVOLUTIONARY FEATURES
🔄 Real-Time Continuous Monitoring
- AI's Eyes Never Close: 2-5 FPS continuous screen monitoring
- Smart Change Detection: Distinguishes between small, major, and critical changes
- Proactive Analysis: AI automatically analyzes important changes
- Adaptive Performance: Smart frame rate adjustment
🎯 UI Element Intelligence
- Computer Vision UI Detection: Automatically recognizes buttons, forms, menus
- OCR Text Extraction: Reads text from anywhere on the screen
- Smart Click System: Natural language commands like "Click the save button"
- Interaction Mapping: AI knows exactly where and how to interact
🧠 Predictive Intelligence
- Behavior Learning: AI learns your usage patterns and habits
- Intent Prediction: Predicts what you'll do next based on context
- Proactive Help: Offers help before you ask
- Workflow Optimization: Suggests improvements in your work patterns
🛠️ REVOLUTIONARY MCP TOOLS
🔄 Real-Time Monitoring Tools
start_continuous_monitoring()- Starts AI's continuous vision capabilitystop_continuous_monitoring()- Stops continuous monitoringget_monitoring_status()- Real-time status information and statisticsget_recent_changes()- Recently detected screen changes
🎯 UI Intelligence Tools
analyze_ui_elements()- Recognizes and maps all UI elements on screensmart_click()- Smart clicking with natural language commands ("Click the save button")extract_text_from_screen()- OCR text extraction from screen
🧠 Predictive AI Tools
learn_user_patterns()- Learns and analyzes user behavior patternspredict_user_intent()- Predicts user intent based on current contextproactive_assistance()- Offers proactive help before user requestsrecord_user_action()- Records user actions and feeds learning system
📸 Traditional Tools
capture_and_analyze()- Screen capture and AI analysis (enhanced)list_tools()- MCP standard compliant lists all tools (categorized, detailed information)
🎯 USAGE SCENARIOS
🔍 Real-Time Monitoring
# Start AI's continuous vision capability
await start_continuous_monitoring(fps=3, change_threshold=0.1)
# Check monitoring status
status = await get_monitoring_status()
# View recent changes
changes = await get_recent_changes(limit=5)
🎯 UI Intelligence
# Analyze all UI elements on screen
ui_analysis = await analyze_ui_elements()
# Smart clicking with natural language
await smart_click("Click the save button")
# Extract text from screen
text_data = await extract_text_from_screen()
🧠 Predictive AI
# Learn user behavior patterns
patterns = await learn_user_patterns()
# Predict user intent
intent = await predict_user_intent()
# Get proactive assistance
assistance = await proactive_assistance()
🚀 INSTALLATION
1. Prepare Project Files
# Navigate to project directory
cd ScreenMonitorMCP
# Install required libraries
pip install -r requirements.txt
2. Configure Environment Variables
Edit the .env file:
# Server Configuration
HOST=127.0.0.1
PORT=7777
API_KEY=your_secret_key
# AI Configuration
OPENAI_API_KEY=your_openai_api_key
OPENAI_BASE_URL=https://api.openai.com/v1
DEFAULT_OPENAI_MODEL=gpt-4o
3. Standalone Testing (Optional)
# Test the server
python main.py
# Test revolutionary features
python test_revolutionary_features.py
🔧 MCP CLIENT SETUP
Claude Desktop / MCP Client Configuration
Add the following JSON to your MCP client's configuration file:
🎯 Simple Configuration (Recommended)
{
"mcpServers": {
"screenMonitorMCP": {
"command": "python",
"args": ["/path/to/ScreenMonitorMCP/main.py"],
"cwd": "/path/to/ScreenMonitorMCP"
}
}
}
🔧 Advanced Configuration
{
"mcpServers": {
"screenMonitorMCP": {
"command": "python",
"args": [
"/path/to/ScreenMonitorMCP/main.py"
],
"cwd": "/path/to/ScreenMonitorMCP",
"env": {
"OPENAI_API_KEY": "your-api-key-here"
}
}
}
}
🛡️ Secure Configuration
{
"mcpServers": {
"screenMonitorMCP": {
"command": "python",
"args": [
"/path/to/ScreenMonitorMCP/main.py",
"--api-key", "your-secret-key"
],
"cwd": "/path/to/ScreenMonitorMCP"
}
}
}
🪟 Windows Example
{
"mcpServers": {
"screenMonitorMCP": {
"command": "python",
"args": ["C:/path/to/ScreenMonitorMCP/main.py"],
"cwd": "C:/path/to/ScreenMonitorMCP"
}
}
}
⚠️ Important Notes
- File Path: Update
/path/to/ScreenMonitorMCP/main.pypath according to your project directory - Python Path: Make sure Python is in PATH or use full path:
"C:/Python311/python.exe" - Working Directory:
cwdparameter is important for proper.envfile reading - API Keys: All settings are automatically read from
.envfile
🧪 USAGE EXAMPLES
🔄 Starting Real-Time Monitoring
# Start AI's continuous vision capability
result = await start_continuous_monitoring(
fps=3,
change_threshold=0.1,
smart_detection=True
)
# Check monitoring status
status = await get_monitoring_status()
# View recent changes
changes = await get_recent_changes(limit=10)
# Stop monitoring
await stop_continuous_monitoring()
🎯 Using UI Intelligence
# Analyze all UI elements on screen
ui_elements = await analyze_ui_elements(
detect_buttons=True,
extract_text=True,
confidence_threshold=0.7
)
# Smart clicking with natural language
await smart_click("Click the save button", dry_run=False)
# Extract text from specific region
text_data = await extract_text_from_screen(
region={"x": 100, "y": 100, "width": 500, "height": 300}
)
🧠 Predictive Intelligence
# Learn user behavior patterns
patterns = await learn_user_patterns()
# Predict user intent
intent = await predict_user_intent(
current_context={"current_app": "VSCode"}
)
# Get proactive assistance
assistance = await proactive_assistance()
# Record user action
await record_user_action(
action_type="click",
target="save_button",
app_context="VSCode"
)
📸 Traditional Screen Capture
# Enhanced screen capture and analysis
result = await capture_and_analyze(
capture_mode="all",
analysis_prompt="What do you see on this screen?",
max_tokens=500
)
# List all tools
tools = await list_tools()
🚀 REVOLUTIONARY CAPABILITIES
This MCP server gives AI the following capabilities:
- 👁️ Continuous Vision: AI can monitor the screen non-stop
- 🧠 Smart Understanding: Recognizes UI elements and interacts with them
- 🔮 Future Prediction: Learns and predicts user behaviors
- ⚡ Proactive Help: Offers help before you need it
- 🎯 Natural Interaction: Understands commands like "Click the save button"
🔧 TROUBLESHOOTING
Common Issues and Solutions
-
Unicode/Encoding Error (Windows)
UnicodeEncodeError: 'charmap' codec can't encode characterSolution: ✅ This error is fixed! Server automatically uses UTF-8 encoding.
-
JSON Configuration Error
// ❌ Wrong { "command": "python", "args": ["path/to/main.py",] // Trailing comma is wrong } // ✅ Correct { "command": "python", "args": ["path/to/main.py"] } -
Python Path Issue
{ "command": "C:/Python311/python.exe", // Use full path "args": ["C:/path/to/ScreenMonitorMCP/main.py"] } -
Missing Dependencies
cd ScreenMonitorMCP pip install -r requirements.txt -
OCR Issues
# Install Tesseract (optional) # EasyOCR installs automatically -
MCP Connection Closed Error
MCP error -32000: Connection closedSolution: Check file paths and add
cwdparameter.
📝 LICENSE
This project is licensed under the MIT License.
🚀 Revolutionary MCP server that gives AI real "eyes"! 🔥 Next-generation AI-human interaction starts here!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。