MediaUse Docs

MCP
Expose MediaUse capabilities to LLM agents as Model Context Protocol (MCP) tools.
Overview
mediause mcp starts a stdio-based MCP server. It maps semantic CLI commands to discrete tools that LLM agents can discover and call automatically.
# Start MCP server locally
mediause mcp

# Limit to specific plugins
mediause mcp --plugins weibo,twitter
Core Tools
The server provides built-in tools for session management:
  • mediause_auth_login: Initialize browser login flow
  • mediause_auth_list: List all stored credentials
  • mediause_auth_health: Verify if a session is still valid
  • mediause_use_account: Securely bind a browser context to an account
Site Plugin Tools
Each dynamic command is mapped to a tool using the site_capability_action naming convention.
# Example tool mappings:
# mediause weibo search hot -> weibo_search_hot
# mediause twitter post feed -> twitter_post_feed
How to call
Agents call these tools using standard MCP JSON-RPC. Arguments mirror the CLI flags (without the -- prefix).
// MCP tools/call example
{
  "method": "tools/call",
  "params": {
    "name": "weibo_search_hot",
    "arguments": {
      "limit": 10
    }
  }
}
Return Structure
MediaUse tools return structured results rather than plain strings. This ensures that agents can reliably extract and use the data without fragile regex or text parsing.
// Structured Data Example
{
  "status": "ok",
  "data": {
    "hot_topics": [
      { "title": "...", "score": 99 }
    ]
  },
  "task_id": "task_123"
}
Agent configuration
Add MediaUse to your agent's config (e.g., Claude Desktop, Cursor, or custom MCP clients).
// Claude Desktop config example
{
  "mcpServers": {
    "mediause": {
      "command": "mediause",
      "args": ["mcp"]
    }
  }
}