convez.ai
MCP Server
jmagar

rustarr

jmagar/rustarr

Ver no GitHub
InicialPluginScore · de 0 a 100

Rust MCP server for the ARR media automation stack

Instalação

$npx convez-ai jmagar/rustarr

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
17
Forks
5
Acompanhando
0
Saúde
42%
Último commit
há 2 semanas
Versão
v2.2.2
Issues abertas
19
Contribuidores
2

README

A tradução para o português deste README ainda está na fila.

rustarr

Rust MCP and CLI server for a media automation fleet: Sonarr, Radarr, Prowlarr, Tautulli, Overseerr, Bazarr, Tracearr, Lidarr, Readarr, SABnzbd, qBittorrent, Wizarr, Notifiarr, Plex, and Jellyfin.

rustarr is an upstream-client MCP server. It does not try to replace those applications or mirror every REST endpoint as a web UI. Its job is to provide one consistent tool surface for agents and one equivalent CLI surface for operators.

Surfaces

SurfaceStatusPurpose
MCPRequiredAgent-facing tool calls through the rustarr tool
CLIRequiredScriptable parity surface for debugging and automation
RESTNot shippedUpstream-client servers do not expose a local REST action API
WebNot shippedUpstream-client servers do not serve an embedded web UI

Every business action is implemented under src/app/ and exposed through both MCP and CLI. src/mcp/tools.rs and src/cli.rs parse inputs and delegate only.

The CLI is service-grouped (rustarr <service> <command> [flags]); the MCP tool is a single rustarr tool dispatched by action + service. CLI ↔ MCP parity is mechanically enforced by tests/parity.rs.

Generic actions

These work for every configured service kind:

ActionScopeCLIDescription
integrationsrustarr:readrustarr integrationsList supported services and configured service names without secrets
service_statusrustarr:readrustarr <service> statusFetch an upstream service status endpoint
api_getrustarr:writerustarr <service> get --path <path>Proxy a safe credentialed GET request to a configured service
api_postrustarr:writerustarr <service> post --path <path> --body <json> --confirmProxy a confirmed POST request to a configured service
api_putrustarr:writerustarr <service> put --path <path> --body <json> --confirmProxy a confirmed PUT request to a configured service
api_deleterustarr:writerustarr <service> delete --path <path> --confirmProxy a confirmed DELETE request to a configured service
helppublicrustarr helpReturn action reference

Paths must be relative API paths. Query-string secrets such as apikey=, token=, and X-Plex-Token are rejected; credentials belong in config or environment variables.

Curated commands

Beyond the generic passthrough, each capability exposes curated, slimmed, confirm-gated commands. Run rustarr --help for the generated, per-service list, or rustarr help for the JSON action reference. Reads are rustarr:read; mutating commands are rustarr:write. Two confirm behaviors apply:

  • Arr intent commands (set-quality, add, delete, search, refresh, monitor/unmonitor) return a structured dry-run preview when --confirm is absent, and only mutate once you pass --confirm.
  • All other mutating commands (download add/pause/resume/remove, request create/approve/decline, media scan, indexer test, and the generic api_post/api_put/api_delete) require --confirm and error without it.
Capability (kinds)Example commands
ArrManager (sonarr, radarr, lidarr, readarr)rustarr sonarr list, rustarr sonarr set-quality --from X --to Y --confirm, wanted, queue, history, add, delete
Indexer (prowlarr)rustarr prowlarr indexers, search --query X, stats, test --confirm
DownloadClient (sabnzbd, qbittorrent)rustarr qbittorrent queue, add --url X --confirm, pause, resume, remove --hash H --confirm
MediaServer (plex, jellyfin)rustarr plex sessions, libraries, search --query X, scan --library N --confirm
Requests (overseerr)rustarr overseerr requests, request --media-type movie --media-id N --confirm, approve, decline, search
Stats (tautulli)rustarr tautulli activity, history, users, libraries

Tracearr, bazarr, wizarr, and notifiarr have no curated surface yet — use the generic passthrough.

Configuration

Copy .env.example or use config.example.toml as a starting point. Common variables:

RUSTARR_MCP_HOST=127.0.0.1
RUSTARR_MCP_PORT=40070
RUSTARR_MCP_TOKEN=change-me

RUSTARR_SERVICES=sonarr,radarr,prowlarr,tautulli,overseerr,bazarr,tracearr,lidarr,readarr,sabnzbd,qbittorrent,wizarr,notifiarr,plex,jellyfin
RUSTARR_SONARR_URL=http://sonarr:8989
RUSTARR_SONARR_API_KEY=...
RUSTARR_RADARR_URL=http://radarr:7878
RUSTARR_RADARR_API_KEY=...
RUSTARR_QBITTORRENT_URL=http://qbittorrent:8080
RUSTARR_QBITTORRENT_USERNAME=...
RUSTARR_QBITTORRENT_PASSWORD=...
RUSTARR_PLEX_URL=http://plex:32400
RUSTARR_PLEX_TOKEN=...

The *_API_KEY pattern covers most Arr-style services. qBittorrent uses username/password login. Plex and Jellyfin token headers are handled separately.

Run

cargo run -- integrations
cargo run -- radarr status
cargo run -- sonarr get --path /api/v3/system/status
cargo run -- radarr post --path /api/v3/command --body '{"name":"RefreshMovie"}' --confirm

# curated commands
cargo run -- sonarr list
cargo run -- tautulli activity

cargo run -- serve
cargo run -- mcp

HTTP MCP endpoint:

curl -s http://127.0.0.1:40070/mcp \
  -H "Authorization: Bearer $RUSTARR_MCP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"rustarr","arguments":{"action":"integrations"}}}'

MCP Client Configuration

Streamable HTTP:

{
  "mcpServers": {
    "rustarr": {
      "url": "http://127.0.0.1:40070/mcp",
      "headers": {
        "Authorization": "Bearer ${RUSTARR_MCP_TOKEN}"
      }
    }
  }
}

stdio:

{
  "mcpServers": {
    "rustarr": {
      "command": "/path/to/rustarr/target/release/rustarr",
      "args": ["mcp"],
      "env": {
        "RUST_LOG": "info,rustarr=debug"
      }
    }
  }
}

Architecture

RustarrClient  (src/rustarr.rs)   network calls and auth headers
      ↓
RustarrService (src/app.rs)       validation, service lookup, response shaping
      ↓
MCP shim       (src/mcp/tools.rs) JSON args -> service -> Value
CLI shim       (src/cli.rs)       argv -> service -> stdout

The service layer owns business rules:

  • supported service catalog and config lookup
  • safe path validation
  • credential redaction
  • qBittorrent login flow
  • response normalization

Development

cargo fmt --check
cargo test
cargo clippy -- -D warnings
cargo build --release

Useful docs:

  • docs/API.md for action contracts
  • docs/CONFIG.md for environment and config details
  • docs/QUICKSTART.md for local smoke tests
  • docs/MCP_SCHEMA.md for schema drift rules
  • plugins/rustarr/README.md and plugins/rustarr/skills/rustarr/SKILL.md for plugin packaging
Ver o original no GitHub

Bom para

Relacionados