MediaUse
MediaUse is a local-first Web automation CLI for AI agents. It turns requests such as “search today’s hot topics” or “publish this feed post” into semantic commands instead of a long loop of click, type, scroll, wait, and extract decisions.
Website: mediause.dev
What it does
MediaUse is useful when the site and the business action are known:
- Publish text, images, or videos.
- Read feeds, notifications, profiles, and detail pages.
- Search posts, users, and hot topics.
- Log in to an account and check account health.
- Run repeatable site workflows with structured JSON results.
- Expose the same actions through the CLI, inline RPA workflows, Skills, and MCP.
Typical semantic actions include post.feed, post.video, get.detail, search.hot, auth.login, account.health, trace.last, and task.status.
MediaUse is not intended to replace open-ended visual browser agents. It is for workflows that should run the same way each time and produce a result that another program can inspect.
Use the CLI
List available plugins and inspect commands:
mediause plugin list
mediause xhs --help
mediause xhs search --help
Bind an account before using account-specific actions:
mediause auth list --json
mediause use account xhs:main --json
mediause auth health --json
Run semantic actions:
mediause xhs post feed --text "Hello from MediaUse" --json
mediause weibo search hot --limit 20 --json
mediause xhs get detail --url "https://example.com/post/123" --json
mediause trace last --json
The exact commands depend on the installed site plugin. Use --help for the current command schema.
Structured results
Use --json for automation. Results may include:
- business data and artifacts
- task, run, and trace identifiers
- retryability and error codes
- account and platform context
- selected execution layer
- fallback events
- risk flags and
risk_blocked
Unsupported execution layers are reported as unavailable. MediaUse does not silently claim success when a plugin cannot perform an action.
Install from npm
The npm package is published under the MediaUse organization as @mediause/cli. It installs the mediause command:
npm install -g @mediause/cli
mediause --version
mediause --help
The current npm package bundles the Windows native CLI binary. Other platforms require their corresponding native release package.
API key safety
Actions that require cloud authentication use the MediaUse API key configured in the user's secure local environment. The CLI can check whether a key is configured without printing the secret:
mediause manage key --json
Do not place an API key in a prompt, source file, README, log, terminal history, or command argument. If no key is configured, configure it locally through the approved MediaUse setup flow and rerun the status check.
Inline RPA
MediaUse works like inline RPA for AI agents. The agent submits one business intention, and MediaUse runs the known browser workflow locally inside the same execution context. The workflow can include navigation, account binding, selectors, waits, uploads, confirmation checks, extraction, and result validation.
This is different from asking an agent to operate the browser one step at a time. MediaUse keeps the workflow together, so the page state, account session, browser context, and execution policy remain available throughout the task.
The inline RPA model is designed for stable and repeatable automation:
- The agent calls a semantic action instead of choosing every browser operation.
- The workflow runs locally through the browser and CDP runtime.
- Site-specific steps are reused rather than rediscovered for every task.
- Account context and page state remain bound to the task.
- Results include structured data, task status, traces, and risk information.
- Failed or unsupported steps are reported instead of being silently treated as successful.
Applications can connect to the long-running local MediaUse process through its supported local process or JSON-RPC transport, but JSON-RPC is only the transport layer. The user-facing model is inline RPA: one semantic request in, one controlled browser workflow, and one structured result out.
MCP integration
MediaUse provides an MCP server over stdio:
mediause mcp
An MCP client starts this command as a child process and exchanges newline-delimited JSON-RPC messages. For Claude Desktop, the server entry is:
{
"mcpServers": {
"mediause": {
"command": "mediause",
"args": ["mcp"]
}
}
}
To limit the exposed plugin surface, use --plugins:
{
"mcpServers": {
"mediause": {
"command": "mediause",
"args": ["mcp", "--plugins", "weibo,xiaohongshu"]
}
}
}
Local zero-token browser automation
“Zero-token” means that MediaUse does not call an LLM while executing the browser workflow. The upstream agent may still spend tokens deciding which business action to call, but after the call reaches MediaUse, the local execution loop is handled by deterministic plugin steps and browser/CDP operations.
The local flow is:
Agent or application
│ one semantic request
▼
Local MediaUse CLI or inline RPA workflow
│ plugin dispatch
▼
Local browser session and CDP
│ deterministic site workflow
▼
Structured result, trace, and risk status
To use this mode locally:
- Install
@mediause/clior build the CLI locally. - Configure the API key and account session in the user's secure environment.
- Start an account context with
mediause use account <platform:account_id>. - Send one semantic action through the CLI, inline RPA workflow, or MCP.
- Read the JSON result and inspect
trace.lastor the returned task fields when needed.
The agent does not need to see every DOM change or decide every browser operation. The inline RPA workflow handles navigation, selectors, waits, uploads, confirmation checks, and result extraction. If a site requires a human CAPTCHA or unusual-traffic confirmation, MediaUse pauses or reports the risk state instead of pretending that the action succeeded.
This model works best for known sites and stable workflows. Open-ended exploration, unknown sites, and tasks that require visual judgment may still need a browser agent with model participation.
Local development
To run the CLI from the repository:
cargo run -p cli -- --help
cargo run -p cli -- --version
To build a release binary:
cargo build --release -p cli
The Windows binary is generated at target/release/mediause.exe.