Skip to content

apexcheng/-MCP-Server

Repository files navigation

YindDao AI Power - RPA MCP Server (Python)

This project is a Python reimplementation of the original aipower-rpa-mcp-server TypeScript project. It keeps the same operating modes and tool names as the original README: Local Mode exposes queryRobotParam, queryApplist, and runApp; Open API Mode exposes uploadFile, queryRobotParam, queryApplist, startJob, queryJob, and queryClientList. It also keeps the same startup semantics: default stdio, and --server for SSE. fileciteturn0file0

Feature matrix

Transport layer

  • stdio mode: default startup mode. Suitable for OpenClaw / MCP host local process integration.
  • SSE mode: start with --server. Default endpoints:
    • GET /sse
    • POST /messages?sessionId=...

Runtime modes

Mode Required env Main use
local SHADOWBOT_PATH, USER_FOLDER Run local YindDao apps through the Windows/macOS desktop client
openApi ACCESS_KEY_ID, ACCESS_KEY_SECRET Use YindDao enterprise open API to start/query jobs remotely

Installation

python -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env

Environment variables

Local Mode

RPA_MODEL=local
SHADOWBOT_PATH={your_shadowbot_path}
USER_FOLDER={your_user_folder}
LANGUAGE=zh
SERVER_PORT=3000

Notes:

  • SHADOWBOT_PATH should point to the YindDao executable.
  • USER_FOLDER should point to the current logged-in ShadowBot/YindDao user directory, not the parent users directory.
  • For WSL calling Windows YindDao, use WSL paths such as:
    • SHADOWBOT_PATH=/mnt/c/Program Files/ShadowBot/ShadowBot.exe
    • USER_FOLDER=/mnt/c/Users/<WindowsUser>/AppData/Local/ShadowBot/users/<CurrentUserId>

Open API Mode

RPA_MODEL=openApi
ACCESS_KEY_ID={your_access_key_id}
ACCESS_KEY_SECRET={your_access_key_secret}
LANGUAGE=zh
SERVER_PORT=3000

Startup

stdio

aipower-rpa-mcp-server

SSE

aipower-rpa-mcp-server --server

Tool reference

1. Local Mode tools

queryApplist

Purpose

  • Enumerate locally published YindDao apps under USER_FOLDER/apps.

Mode

  • local

Input

  • This tool keeps the upstream-compatible query shape, but local mode primarily ignores pagination/search fields and scans the local apps directory.

Output

  • Returns an array of apps, each typically containing:
    • uuid
    • name
    • description

Behavior

  • Only published app packages are returned.
  • Typical discovery path is USER_FOLDER/apps/*_Release/xbot_robot/package.json.
  • Only entries whose package metadata indicates app type are included.

queryRobotParam

Purpose

  • Read a local app's input parameter definition.

Mode

  • local

Input

  • robotUuid: target app UUID.

Output

  • Returns the parameter definition list from the app's local metadata / flow definition.

Behavior

  • The Python port improves the upstream local implementation by actually locating the target app by robotUuid before reading parameter metadata.
  • If the app cannot be found or has no parameter definition, an empty list is returned.

runApp

Purpose

  • Launch a local YindDao app.

Mode

  • local

Input

  • appUuid: target app UUID.
  • appParams: upstream-compatible field retained for interface compatibility.

Output

  • Returns a launch result indicating that the local client launch command has been issued.

Behavior

  • Current behavior mirrors the upstream local project: the server launches the desktop client via a shadowbot:Run?robot-uuid=... URI style invocation.
  • This is a launch action, not a full job-tracking API.

Current capability boundary

  • In local mode, this project can start an app, but it does not provide built-in tools for:
    • querying live execution logs
    • retrieving step-by-step run records
    • waiting for completion and returning a final success/failure result
    • querying a local task id / run history produced by the desktop client
  • If you need result backflow in local mode, you should add your own app-side output mechanism, such as writing JSON/log files or posting back to your own service.

2. Open API Mode tools

uploadFile

Purpose

  • Upload a file for downstream job usage.

Mode

  • openApi

Input

  • file: file content
  • fileName: target upload filename

Validation / limits

  • Max filename length: 100
  • Allowed extensions: txt, csv, xlsx
  • Upload request body limit: 10 MB

Output

  • Returns the Open API upload response.

queryRobotParam

Purpose

  • Query robot/app parameter definitions from YindDao Open API.

Mode

  • openApi

Input

  • robotUuid (optional)
  • accurateRobotName (optional)

Output

  • Returns the parameter definition payload from the API.

queryApplist

Purpose

  • Query app list from YindDao Open API.

Mode

  • openApi

Input

  • appId (optional)
  • size (optional)
  • page (optional)
  • ownerUserSearchKey (optional)
  • appName (optional)

Output

  • Returns the API app list response.

startJob

Purpose

  • Start a remote job through YindDao Open API.

Mode

  • openApi

Input

  • robotUuid (required)
  • accountName (optional)
  • robotClientGroupUuid (optional)
  • waitTimeoutSeconds (optional)
  • runTimeout (optional)
  • params (optional key/value object; transformed to the API parameter array format)

Validation

  • robotUuid is required.
  • accountName and robotClientGroupUuid are mutually exclusive.
  • waitTimeoutSeconds and runTimeout must be in 60 ~ 950400.
  • Serialized params length must not exceed 8000.

Output

  • Returns the Open API start-job response, typically including job-level identifiers used for later querying.

queryJob

Purpose

  • Query a started Open API job by jobUuid.

Mode

  • openApi

Input

  • jobUuid (required)

Output

  • Returns job status information, typically including job state and result payload fields returned by the API.

Current capability boundary

  • queryJob is suitable for polling job state and reading summary/result fields returned by YindDao Open API.
  • It is not a full real-time execution log stream.
  • Depending on the upstream API payload, you may get status, remark, timestamps, inputs/outputs, screenshot URL, client info, etc., but not full step-by-step desktop execution logs.

queryClientList

Purpose

  • Query available robot client machines.

Mode

  • openApi

Input

  • status (optional)
  • key (optional)
  • robotClientGroupUuid (optional)
  • page (required)
  • size (required)

Output

  • Returns the client list response from Open API.

Logging / result-query capability summary

Local mode

Supported:

  • enumerate local apps
  • read local parameter definitions
  • launch local apps

Not built in:

  • query running status
  • query execution logs
  • query final result / output from a local launch
  • query local execution history as MCP tools

Open API mode

Supported:

  • start remote jobs
  • query job status / result summary
  • query client list
  • upload files

Not built in:

  • real-time full execution log streaming
  • full desktop-level step trace playback

OpenClaw example

WSL + Windows YindDao

openclaw mcp set yingdao-rpa '{
  "type": "stdio",
  "command": "/home/your-user/path/to/.venv/bin/python",
  "args": ["-m", "aipower_rpa_mcp_server"],
  "env": {
    "RPA_MODEL": "local",
    "SHADOWBOT_PATH": "/mnt/c/Program Files/ShadowBot/ShadowBot.exe",
    "USER_FOLDER": "/mnt/c/Users/<WindowsUser>/AppData/Local/ShadowBot/users/<CurrentUserId>",
    "LANGUAGE": "zh"
  }
}'

Then restart the gateway and test:

调用 yingdao-rpa 的 queryApplist,返回当前影刀应用列表

Troubleshooting

stdio server looks "stuck"

This is expected. In stdio mode the process waits for MCP JSON-RPC messages from the host. Do not press Enter in that terminal; sending a blank line will cause JSON parsing errors.

Missing SHADOWBOT_PATH or USER_FOLDER

You started local mode without the required environment variables.

spawn ... ENOENT

The executable path in your MCP config is wrong. Check:

  • the Python interpreter path in command
  • SHADOWBOT_PATH
  • whether the WSL path actually exists

queryApplist returns empty

Check:

  • USER_FOLDER points to the current logged-in YindDao user directory
  • USER_FOLDER/apps exists
  • the target flow has actually been published as an app

Notes

The original minimal README only documented the mode split, tool list, environment variables, startup options, and a brief OpenClaw example. This updated README adds detailed tool-by-tool behavior descriptions, capability boundaries, and log/result-query expectations. fileciteturn0file0

About

影刀 AI Power 的 Python 版 RPA MCP Server。

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages