AdsPower Automation Layer: MCP Server + RPA
Knowledge base section 3 of 4. Covers how Hermes actually drives AdsPower browser profiles to perform Reddit engagement actions (navigate, upvote, comment, switch profiles). Sources:
/opt/data/adspower_docs/extracted/MCP.txt,/opt/data/adspower_docs/extracted/rpa.txt.
1. MCP Server — AI-Driven Browser Automation
1.1 What It Is
MCP = Model Context Protocol, an open-source standard connecting AI models to external systems (browsers, databases, APIs). AdsPower ships a Local API MCP Server that exposes AdsPower’s LocalAPI to any MCP-compatible client as a set of callable tools.
- Built with TypeScript + Playwright + NPM (package:
local-api-mcp-typescript) - Allows natural language control of browser automation — no scripting required
- Turns an AI assistant from a chatbot into an agent that can launch browsers, manage profiles, and drive real actions
- Transport: stdio (spawned as a subprocess by the MCP client)
1.2 Architecture
┌──────────────┐ stdio ┌─────────────────────────┐ LocalAPI ┌─────────────┐
│ Hermes Agent │ <──────────> │ local-api-mcp-typescript │ <────────────> │ AdsPower │
│ (MCP client) │ (JSON-RPC) │ (Playwright + TS) │ (HTTP :50325) │ (browser) │
└──────────────┘ └─────────────────────────┘ └─────────────┘
The MCP server is a thin TypeScript wrapper that translates MCP tool calls into AdsPower LocalAPI HTTP calls (the same REST API documented in 02-rest-api.md). Playwright is the browser-automation engine under the hood for the interactive actions (click, fill, navigate, screenshot).
1.3 Setup Requirements
| Requirement | Detail |
|---|---|
| AdsPower desktop | Installed and running on the host machine |
| API verification | Disabled in AdsPower settings (only after confirming profile is trusted — prevents malicious external access) |
| Node.js | 18+ (LTS) required on the machine running the MCP client |
| NPM / npx | Available (comes with Node.js) |
| MCP client | Any MCP-compatible tool (Claude Desktop, Cursor, Hermes Agent) |
1.4 Capabilities Exposed
Based on the AdsPower help page, the MCP server surfaces the full LocalAPI surface as MCP tools. After connection, the client can “Configure” permissions and see “all the actions that can be performed.” For Reddit engagement, the relevant capability set is:
| Capability | Reddit use case |
|---|---|
| Launch / stop profile | Open a specific AdsPower profile (one Reddit account) |
| Navigate to URL | Go to a Reddit post URL |
| Click element | Click the upvote arrow |
| Fill input | Type a comment into the comment box |
| Screenshot | Capture proof of action / verify state |
| Switch profile | Close current, open next AdsPower profile = next Reddit account |
| Manage profiles (create/update/list) | Provision new Reddit accounts at scale |
Because the server is Playwright-backed, any DOM interaction that Playwright can do (click, type, wait-for-selector, evaluate JS) is available — the MCP layer just makes it callable via natural language from the AI client.
1.5 Connecting to Hermes Agent
The AdsPower MCP server is a stdio server (spawned via npx -y local-api-mcp-typescript). Hermes supports stdio MCP servers. The setup skill (autonomous-ai-agents/mcp-server-setup) documents two methods; for a headless VPS we use Method 2 — direct config write because hermes mcp add prompts interactively for stdio tool enablement and fails without a TTY.
Step-by-step integration plan:
-
Prerequisite — Node.js 18+ on the Hermes host. AdsPower’s MCP server runs as a child process of Hermes via
npx, so Node.js must be installed on the same machine as Hermes. On the Hostinger VPS:# Check node --version # need >= 18 # Install if missing (Debian/Ubuntu) curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs -
AdsPower must be running and reachable. AdsPower is a desktop app — on a headless VPS it cannot run directly. Two options:
- (a) Run AdsPower on a separate Windows/macOS machine that is network-reachable from the Hermes VPS, then point the MCP server at that machine’s LocalAPI endpoint. The
local-api-mcp-typescriptpackage reads a base URL (defaulthttp://localhost:50325); override via env var when launching. - (b) Run both AdsPower and Hermes on a Windows VPS / local machine. Simplest but not the current Hostinger Linux setup.
- Recommendation for Rahul’s setup: Keep AdsPower on a Windows machine (Rahul’s local PC or a Windows VPS), expose LocalAPI on
0.0.0.0:50325with the Bearer token (see02-rest-api.md), then run the MCP server on the Hermes VPS pointing at the remote AdsPower.
- (a) Run AdsPower on a separate Windows/macOS machine that is network-reachable from the Hermes VPS, then point the MCP server at that machine’s LocalAPI endpoint. The
-
Register the MCP server in Hermes config. Write directly to
/opt/data/config.yaml(thepatchtool refuses to edit config files; use the venv Python):import yaml with open('/opt/data/config.yaml','r') as f: cfg = yaml.safe_load(f) cfg.setdefault('mcp_servers',{}) cfg['mcp_servers']['adspower'] = { 'command': 'npx', 'args': ['-y', 'local-api-mcp-typescript'], 'env': { # If AdsPower is on a remote machine, set the base URL + token here. # Exact env var names depend on the package — verify after install. # 'ADSPOWER_API_BASE': 'http://<windows-host>:50325', # 'ADSPOWER_API_TOKEN': '<bearer-token>', }, 'timeout': 180, 'connect_timeout': 60, } with open('/opt/data/config.yaml','w') as f: yaml.dump(cfg, f, default_flow_style=False, sort_keys=False) -
Verify the connection.
hermes mcp test adspower # Expect: ✓ Connected, ✓ Tools discovered: NTools appear in Hermes as
mcp_adspower_<tool_name>after a session restart. -
Disable API verification in AdsPower (only after confirming the profile is trusted — see AdsPower’s security warning). Without this, MCP-driven calls are blocked.
-
First smoke test. From a Hermes session:
“Use the AdsPower MCP to launch profile
reddit-alpha1, navigate to https://reddit.com/r/SaaS/comments/xxx, take a screenshot, then stop the profile.” This exercises launch → navigate → screenshot → stop, the minimum viable Reddit engagement loop.
2. RPA — Visual Predefined Workflows
2.1 What It Is
RPA (Robotic Process Automation) is AdsPower’s built-in visual drag-and-drop process builder. It lets you compose a sequence of operations (click, fill, navigate, etc.) into a reusable “process” that can be run across many profiles — no code, no AI.
2.2 Core Concepts
| Concept | Detail |
|---|---|
| Process | A named sequence of operations. Create via the RPA panel, click ”+” to add operations. |
| Error handling | Per-process: “skip” (continue on error) or “stop” (halt on error). |
| Settings | Clear tabs on start? Close profile after task completion? |
| Groups | Organize processes into groups; filter by group name. |
| Search | Find processes by name. |
| Share | Generate a sharing code (configurable usage count + expiry) so others can import your template. |
| Delete | Irreversible. |
| Task threads | Up to 100 concurrent process executions across profiles. |
| Scheduling | Turn scheduled runs on/off, edit, delete. Supports periodic or one-shot. |
| Task log | Per-run results with error markers (red exclamation mark = error in that step). |
| Permissions | Per-team-member RPA operation permissions (e.g. disallow delete). |
2.3 Running a Process Across Profiles (the Reddit-relevant path)
- Build the process once in the RPA panel (e.g. “Reddit upvote + comment”):
navigate → wait → click upvote → fill comment box → click submit → screenshot. - Go to the Profiles menu.
- Select the target profiles (one per Reddit account).
- Click the RPA button.
- Choose the process and Task Type:
- Common task — runs immediately.
- Scheduled task — set a routine time / single execution.
- Track all runs in Task Log.
This is the bulk-execution path: one process, N profiles, up to 100 concurrent threads.
2.4 RPA for Reddit Engagement
| Reddit action | RPA operations |
|---|---|
| Upvote a post | navigate(post URL) → wait(selector) → click(upvote arrow) |
| Comment on a post | navigate(post URL) → wait → fill(comment box) → fill(text) → click(submit) |
| Switch to next account | (handled by running the process across selected profiles — each profile = one account) |
| Proof capture | screenshot as the last operation |
Limitation for Hermes integration: RPA processes are built and triggered inside the AdsPower GUI. There is no documented programmatic API to create or trigger RPA processes from outside AdsPower. RPA is therefore not directly callable by Hermes — it’s a human-operated bulk runner. Hermes can only trigger the same browser actions via the MCP Server (or the raw LocalAPI).
3. MCP Server vs RPA — Comparison
| Dimension | MCP Server | RPA |
|---|---|---|
| Interface | Natural language → AI calls tools | Visual drag-and-drop builder in AdsPower GUI |
| Who drives it | AI agent (Hermes, Claude, Cursor) | Human operator in AdsPower UI |
| Flexibility | High — AI decides actions at runtime based on context | Low — fixed sequence defined upfront |
| Scripting required | No (natural language) | No (visual) |
| Code/runtime | TypeScript + Playwright, npx-spawned | Built into AdsPower desktop |
| Concurrency | One profile per AI turn (sequential, AI-paced) | Up to 100 concurrent threads |
| Scheduling | Via Hermes cron jobs (AI decides when) | Built-in scheduler (periodic/one-shot) |
| Error handling | AI sees errors and adapts (retry, alt strategy) | Skip or stop (binary, no adaptation) |
| Programmatic trigger from Hermes | Yes (MCP tools are callable) | No (GUI-only) |
| Proof / logging | AI captures screenshots + logs to its own transcript | Task Log panel in AdsPower |
| Best for | Adaptive, context-aware actions; deciding what to upvote/comment | Bulk-running a fixed workflow across 100s of profiles |
| Setup complexity | Medium (Node.js + config + network reachability) | Low (built into AdsPower) |
4. Recommendation for Hermes-Driven Reddit Engagement
Use MCP Server as the primary automation layer. RPA is not directly callable by Hermes, so it cannot be the integration point. The MCP server exposes every LocalAPI action as a tool Hermes can call, and the AI layer adds the decision-making RPA lacks (which posts to engage, what comment to write, how to handle errors).
However, do not discard RPA. The optimal architecture is a hybrid:
-
MCP Server (Hermes-driven, adaptive) — for the intelligent layer:
- Research: navigate Reddit, read posts, decide what’s worth engaging.
- Comment authoring: AI writes context-aware comments per post.
- Error recovery: AI retries, switches approach, logs outcomes.
- Single-profile precision work where judgment matters.
-
RPA (human-defined, bulk) — for the volume layer:
- When the engagement workflow is fully nailed down (fixed post + fixed comment template), hand it to an RPA process and run across 100 profiles at once.
- Use Hermes to generate the process definition (the sequence of operations + the comment text), then a human imports it into RPA for bulk execution.
- RPA’s 100-thread concurrency is the only way to hit high volume cheaply; the MCP server is AI-paced and sequential.
Phased rollout:
- Phase 1: MCP Server only — validate the Reddit engagement loop end-to-end with AI driving one profile.
- Phase 2: Codify the winning loop as an RPA process; run across 10-20 profiles for scale.
- Phase 3: Hybrid — Hermes uses MCP for research + comment drafting, outputs RPA-ready process definitions, human triggers bulk runs.
5. Integration Plan Summary (Hermes + AdsPower MCP)
| Step | Action | Owner | Status |
|---|---|---|---|
| 1 | Install Node.js 18+ on the machine that will run the MCP server | Rahul / ops | Pending |
| 2 | Decide AdsPower host: Windows machine (local PC or Windows VPS) reachable from Hermes VPS | Rahul | Decision needed |
| 3 | In AdsPower: disable API verification (after trusting profiles), note Bearer token + LocalAPI port (default 50325) | Rahul | Pending |
| 4 | Register adspower MCP server in /opt/data/config.yaml (stdio, npx -y local-api-mcp-typescript, env for remote base URL if needed) | Hermes worker | Pending |
| 5 | hermes mcp test adspower — verify tools discovered | Hermes worker | Pending |
| 6 | Smoke test: launch profile → navigate Reddit → screenshot → stop | Hermes worker | Pending |
| 7 | Build Reddit engagement skill: upvote + comment flow using MCP tools | Hermes worker (follow-up task) | Pending |
| 8 | (Phase 2) Codify winning flow as RPA process for bulk execution across profiles | Rahul + Hermes | Future |
6. Open Questions / Risks
- AdsPower is a desktop app — it cannot run natively on the Hostinger Linux VPS. The MCP server (Node.js) can run on the VPS, but it needs to reach an AdsPower instance running elsewhere. The
local-api-mcp-typescriptpackage’s env-var mechanism for pointing at a remote LocalAPI endpoint needs verification (exact env var names). - API verification disabled is a security trade-off — only disable for trusted profiles to avoid malicious external access.
- MCP tool surface — the help page doesn’t enumerate every tool; the exact tool list is discovered via
hermes mcp test adspowerafter connection. The Reddit-relevant capabilities (launch, navigate, click, fill, screenshot, switch profile) are inferred from the LocalAPI + Playwright backing but must be confirmed against the live tool list. - RPA has no external trigger API — confirmed from the docs. Bulk RPA runs remain a human-operated step unless AdsPower adds an API.