Content
# Human MCP
**AI Agent fully automated image search and social media posting tool.**
From Google Trends / Weibo hot search to grab keywords → Playwright headless image download → Gemini generate captions → automatically post to Facebook + Threads + Instagram.
---
## Core Architecture: Semantic Clicking
### What Problem Does It Solve?
Traditional RPA scripts use coordinate clicking `click(500, 300)`, which breaks when the button changes position/color/style.
Human MCP's approach: **from "coordinate-oriented" to "semantic visual-oriented"**.
### Three-Layer Self-Healing Mechanism
```
┌─────────────────────────────────────────────────────┐
│ Layer 1: DOM Positioning (getByRole / getByText) │
│ → UI changes? As long as role + label are still there │
│ ↓ can't find │
│ Layer 2: JS dispatchEvent (React compatibility fallback) │
│ ↓ no response │
│ Layer 3: Result Verification + Retry (Self-Correction Loop) │
│ → verify_after keyword, incorrect automatically retries up to 3 times │
└─────────────────────────────────────────────────────┘
```
Each click step has verification + retry, effective even after IG/Threads UI updates.
```python
# Core: SemanticClicker
ok = await clicker.click(
label="Post",
role="button",
parent="dialog",
verify_after="Posted", # verify keyword after clicking
max_retries=3, # automatically retry on error
)
```
### Why Not Use CDP Vision?
CDP (Remote Debugging Protocol) relies on DOM to find coordinates, which breaks when UI changes. Semantic clicking uses `getByRole` + `getByText`, which are DOM-level semantic labels, much more stable than coordinates. Vision is only reserved as a last resort fallback.
---
## Independent Chromium Profile
Each platform uses an **independent Chromium Profile**, which does not affect the user's normal browser:
| Script | Profile Directory | Purpose |
|------|------------------|------|
| `post_threads.py` | `/tmp/threads-chromium-profile/` | Threads image and text posting |
| `post_ig_human.py` | `/tmp/ig-chromium-profile/` | Instagram image and text posting |
| `post_facebook.py` | `/tmp/fb-chromium-profile/` | Facebook image and text posting |
First-time login required, then automatically remembers session.
---
## Quick Start
```bash
# First-time (only once per platform)
python3 post_threads.py "Test Post" "/path/to/image.jpg"
python3 post_ig_human.py "Test Post" "/path/to/image.jpg"
python3 post_facebook.py "Test Post" "/path/to/image.jpg"
# Full workflow
python3 social_workflow.py 1 # Weibo hot search → FB + Threads + IG
python3 social_workflow.py 2 # Google Trends HK
python3 social_workflow.py 3 # Google Trends US
```
## API (Image Download)
```bash
uv run python server.py # start server
curl "http://localhost:8080/scrape?query=jimmy+kimmel&engine=bing&max_images=3"
curl "http://localhost:8080/download?url=https://..."
```
## Installation
```bash
cd ~/human-mcp
npm install
pip install fastapi uvicorn
```
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds