Skip to main content
Glama

cleanuparr-mcp

Part of the arr-mcps collection. An MCP server exposing Cleanuparr's REST API as tools for inspecting status, history, statistics, jobs, and configuration.

Requirements

  • Cleanuparr with its REST API enabled

  • An API key from Cleanuparr

  • Python 3.11+ and uv for source development

Related MCP server: job-search-mcp

Configuration

Variable

Required

Description

CLEANUPARR_URL

Yes

Cleanuparr URL, including any reverse-proxy BASE_PATH; the server appends /api.

CLEANUPARR_API_KEY

Usually

API key sent as X-Api-Key. Health endpoints can be used without it when permitted.

Install a built wheel and register it with Claude Code:

uv tool install cleanuparr_mcp-*.whl
claude mcp add cleanuparr \
  --env CLEANUPARR_URL=https://cleanuparr.example.com \
  --env CLEANUPARR_API_KEY=your-api-key \
  -- cleanuparr-mcp

For a source checkout:

uv sync
claude mcp add cleanuparr \
  --env CLEANUPARR_URL=https://cleanuparr.example.com \
  --env CLEANUPARR_API_KEY=your-api-key \
  -- uv run --directory /path/to/cleanuparr-mcp cleanuparr-mcp

Tools

8 resource-scoped tools, each covering multiple Cleanuparr REST endpoints (84 total) via an operation parameter. Call a tool with operation set to one of its listed operations and an arguments dict matching that operation's parameters — the tool's own description (visible to your MCP client) lists every operation, its signature, and a one-line doc. This keeps the full API surface available while costing a fraction of the context budget of registering all 84 endpoints as separate tools.

Tool

Operations

Covers

cleanuparr_cleaner_config

19

Queue/download cleaners, dead torrents, orphaned/unlinked files, seeding rules

cleanuparr_events

18

Events, manual events, strikes, timelines, stats

cleanuparr_arr_download_clients

15

General config, *arr instances, download clients

cleanuparr_health_status

8

Health, readiness, system/*arr/download-client status

cleanuparr_stats

7

Seeker search events, custom-format scores

cleanuparr_notifications

6

Notification providers

cleanuparr_feature_configs

6

Malware blocker, Seeker, blacklist sync

cleanuparr_jobs

5

List, inspect, trigger, start, schedule jobs

Example: cleanuparr_jobs(operation="cleanuparr_trigger_job", arguments={"job_type": "QueueCleaner"}). Endpoint-level naming (cleanuparr_<verb>_<resource>) is preserved as the operation value, so the full endpoint list is still discoverable from each group tool's description at runtime.

Destructive operations are noted in their operation-line doc. Cleanuparr returns 503 when its configuration database is busy; this server does not retry and instead returns the upstream error to the MCP client.

Request bodies are pass-through JSON dictionaries matching the DTOs in the running Cleanuparr version. Sensitive update fields should use Cleanuparr's placeholder value to preserve an existing secret. Do not place real API keys, passwords, or notification tokens in prompts.

Development

make sync
make test
make test-integration   # requires CLEANUPARR_URL and optionally CLEANUPARR_API_KEY
make build

The offline tests use httpx.MockTransport; integration tests are skipped by default.

Available Tools

8 tools
cleanuparr_arr_download_clientsA

cleanuparr arr download clients operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_create_arr_instance(arr_type, instance) — Create an *arr instance. DTO fields: enabled, name, url, apiKey, version, externalUrl.

  • cleanuparr_create_download_client(client) — Create a download client. DTO includes enabled, name, typeName, type, host, username, password, urlBase, externalUrl, and directory source/target.

  • cleanuparr_delete_arr_instance(arr_type, instance_id) — Delete an *arr instance by GUID.

  • cleanuparr_delete_download_client(client_id) — Delete a download client by GUID.

  • cleanuparr_get_arr_config(arr_type) —

  • cleanuparr_get_general_config() — Get general configuration, including dry-run and auth settings.

  • cleanuparr_list_arr_instances(arr_type) —

  • cleanuparr_list_download_clients() — List configured download clients.

  • cleanuparr_purge_strikes() — Purge all stored strikes. This is irreversible.

  • cleanuparr_test_arr_instance(arr_type, instance) — Test an *arr connection. DTO fields: url, apiKey, version, optional instanceId.

  • cleanuparr_test_download_client(client) — Test a download client. DTO includes typeName, type, host, credentials, urlBase, and optional clientId.

  • cleanuparr_update_arr_config(arr_type, config) — Replace one *arr config, normally containing failedImportMaxStrikes.

  • cleanuparr_update_arr_instance(arr_type, instance_id, instance) — Replace an *arr instance. Use Cleanuparr's secret placeholder for apiKey.

  • cleanuparr_update_download_client(client_id, client) — Replace a download client. Use the secret placeholder for password.

  • cleanuparr_update_general_config(config) — Merge fields into the current general config and PUT the result. A raw PUT replaces the whole resource, so sending only changed fields (e.g. {"dryRun": false}) resets every unspecified field — including displaySupportBanner and the auth object — to defaults. This read-modify-write preserves current values for anything not in config. Fields include dryRun, retry/timeout settings, ignoredDownloads, connectivity, retention, log, and auth objects.

Inputs: operation (required), arguments. Returns: result

cleanuparr_cleaner_configA

cleanuparr cleaner config operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_create_queue_rule(kind, rule) — Create a stall or slow queue rule. Common DTO fields include name, enabled, maxStrikes, privacyType, completion percentages, and changeCategory.

  • cleanuparr_create_seeding_rule(download_client_id, rule) — Create a seeding rule. DTO includes name, categories, trackerPatterns, tagsAny/tagsAll, priority, privacyType, ratio/time/seeder limits, and deleteSourceFiles.

  • cleanuparr_delete_queue_rule(kind, rule_id) — Delete a stall or slow queue rule by GUID.

  • cleanuparr_delete_seeding_rule(rule_id) — Delete a seeding rule by GUID.

  • cleanuparr_get_dead_torrent_config(download_client_id) — Get dead-torrent settings for a download-client GUID.

  • cleanuparr_get_download_cleaner_config() — Get download cleaner configuration.

  • cleanuparr_get_orphaned_files_config(download_client_id) — Get orphaned-file settings for a download-client GUID.

  • cleanuparr_get_queue_cleaner_config() — Get queue cleaner configuration.

  • cleanuparr_get_unlinked_config(download_client_id) — Get unlinked-file settings for a download-client GUID.

  • cleanuparr_list_queue_rules(kind) — List stall or slow queue rules.

  • cleanuparr_list_seeding_rules(download_client_id) — List seeding rules for a download-client GUID.

  • cleanuparr_reorder_seeding_rules(download_client_id, ordered_ids) — Reorder rules by sending an orderedIds GUID array.

  • cleanuparr_update_dead_torrent_config(download_client_id, config) — Replace dead-torrent settings: enabled, targetCategory, useTag, maxStrikes, categories.

  • cleanuparr_update_download_cleaner_config(config) — Replace download cleaner config: enabled, cronExpression, useAdvancedScheduling, and ignoredDownloads.

  • cleanuparr_update_orphaned_files_config(download_client_id, config) — Replace orphaned-file settings: enabled, scanDirectories, orphanedDirectory, excludePatterns, minFileAgeHours, and optional purgeAfterHours.

  • cleanuparr_update_queue_cleaner_config(config) — Replace queue cleaner config. DTO includes enabled, cronExpression, useAdvancedScheduling, failedImport, downloadingMetadataMaxStrikes, processNoContentId, and ignoredDownloads.

  • cleanuparr_update_queue_rule(kind, rule_id, rule) — Replace a stall or slow queue rule. Stall fields include minimumProgress; slow fields include minSpeed, maxTimeHours, and ignoreAboveSize.

  • cleanuparr_update_seeding_rule(rule_id, rule) — Replace a seeding rule by GUID. Priority is ignored by the upstream update.

  • cleanuparr_update_unlinked_config(download_client_id, config) — Replace unlinked settings: enabled, targetCategory, useTag, ignoredRootDirs, categories.

Inputs: operation (required), arguments. Returns: result

cleanuparr_eventsA

cleanuparr events operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_delete_strikes(download_item_id) — Delete all strikes for a download-item GUID.

  • cleanuparr_get_event(event_id) — Get one event by GUID.

  • cleanuparr_get_event_timeline(hours=720) — Get event timeline buckets for the requested number of hours.

  • cleanuparr_get_events_by_tracking(tracking_id) — Get events associated with a tracking GUID.

  • cleanuparr_get_manual_event(event_id) — Get one manual event by GUID.

  • cleanuparr_get_manual_event_stats() — Get manual-event counts by severity and resolution.

  • cleanuparr_get_stats(hours=168, include_dry_run=False) — Get v2 aggregate statistics. The deprecated v1 stats endpoint is not exposed.

  • cleanuparr_get_stats_timeline(metric='events', hours=720, bucket=None, include_dry_run=False) — Get v2 metric timeline. Metrics include events, strikesIssued, recovered, removed, and malwareBlocked; buckets include hour, day, week, and month.

  • cleanuparr_list_event_severities() — List event severity enum values.

  • cleanuparr_list_event_types() — List event type enum values.

  • cleanuparr_list_events(page=1, page_size=50, severity=None, event_type=None, from_date=None, to_date=None, search=None, job_run_id=None) — List events. Dates are ISO-8601 strings; page_size is capped by the API at 500.

  • cleanuparr_list_manual_event_severities() — List manual-event severity enum values.

  • cleanuparr_list_manual_events(page=1, page_size=50, is_resolved=None, severity=None, from_date=None, to_date=None, search=None) — List manual events with pagination and optional filters.

  • cleanuparr_list_recent_strikes(count=5) — List recent strikes; count is capped by the API at 50.

  • cleanuparr_list_strike_types() — List strike type enum values.

  • cleanuparr_list_strikes(page=1, page_size=50, search=None, strike_type=None) — List strike-bearing download items.

  • cleanuparr_resolve_all_manual_events() — Mark all unresolved manual events resolved.

  • cleanuparr_resolve_manual_event(event_id) — Mark one manual event resolved.

Inputs: operation (required), arguments. Returns: result

cleanuparr_feature_configsA

cleanuparr feature configs operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_get_blacklist_sync_config() — Get blacklist synchronizer configuration.

  • cleanuparr_get_malware_blocker_config() — Get malware blocker configuration.

  • cleanuparr_get_seeker_config() — Get Seeker configuration.

  • cleanuparr_update_blacklist_sync_config(config) — Replace blacklist sync config: enabled and optional blacklistPath.

  • cleanuparr_update_malware_blocker_config(config) — Replace malware blocker config, including per-arr blocklist settings.

  • cleanuparr_update_seeker_config(config) — Replace Seeker config: search toggles, strategy, grace period, and instances.

Inputs: operation (required), arguments. Returns: result

cleanuparr_health_statusA

cleanuparr health status operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_get_arr_status() — Check all configured Sonarr/Radarr/Lidarr-style connections.

  • cleanuparr_get_download_client_status() — Check all configured download-client connections.

  • cleanuparr_get_status() — Get Cleanuparr version, uptime, resource, and instance status.

  • cleanuparr_health() — Check anonymous liveness at /health.

  • cleanuparr_health_checks() — List configured health checks.

  • cleanuparr_health_detailed() — Get the authenticated detailed health report.

  • cleanuparr_health_ready() — Check anonymous readiness at /health/ready.

  • cleanuparr_run_health_check(check_id=None) — Run all health checks, or one check by GUID when check_id is supplied.

Inputs: operation (required), arguments. Returns: result

cleanuparr_jobsA

cleanuparr jobs operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_get_job(job_type) — Get one job. Values include QueueCleaner, MalwareBlocker, DownloadCleaner, BlacklistSynchronizer, Seeker, and CustomFormatScoreSyncer.

  • cleanuparr_list_jobs() — List scheduled jobs and their current status.

  • cleanuparr_start_job(job_type, schedule) — Start a job with a schedule object containing the JobSchedule DTO.

  • cleanuparr_trigger_job(job_type) — Run a one-time job now. Seeker cannot be manually triggered.

  • cleanuparr_update_job_schedule(job_type, schedule) — Replace a job schedule using the JobSchedule DTO.

Inputs: operation (required), arguments. Returns: result

cleanuparr_notificationsA

cleanuparr notifications operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_create_notification_provider(provider_type, provider) — Create a notification provider. Types: notifiarr, apprise, ntfy, telegram, discord, pushover, gotify. Common fields are name, isEnabled, and event flags; provider-specific fields follow the API DTO.

  • cleanuparr_delete_notification_provider(provider_id) — Delete a notification provider by GUID.

  • cleanuparr_get_apprise_cli_status() — Get Apprise CLI availability status.

  • cleanuparr_list_notification_providers() — List notification providers. Secret fields may be redacted by Cleanuparr.

  • cleanuparr_test_notification_provider(provider_type, provider) — Test a notification provider using its provider-specific DTO.

  • cleanuparr_update_notification_provider(provider_type, provider_id, provider) — Replace a notification provider. Use Cleanuparr placeholders for secrets.

Inputs: operation (required), arguments. Returns: result

cleanuparr_statsA
Read-only

cleanuparr stats operations on Cleanuparr. Pass operation and an arguments dict matching that operation's parameters.

  • cleanuparr_get_cf_item_history(instance_id, item_id, episode_id=0) — Get score history for an item; episode_id is used for Sonarr episode history.

  • cleanuparr_get_cf_stats() — Get custom-format score tracking statistics.

  • cleanuparr_get_search_summary() — Get Seeker search totals and per-instance summary.

  • cleanuparr_list_cf_instances() — List instances and quality profiles with tracked scores.

  • cleanuparr_list_cf_scores(page=1, page_size=50, instance_id=None, search=None, sort_by='Title', sort_direction=None, quality_profile=None, item_type=None, cutoff_filter='All', monitored_filter='All') — List current custom-format scores with cutoff and monitored filters.

  • cleanuparr_list_cf_upgrades(page=1, page_size=50, instance_id=None, days=30, search=None, sort_by='UpgradedAt', sort_direction=None) — List recent custom-format score upgrades.

  • cleanuparr_list_search_events(page=1, page_size=50, instance_id=None, cycle_id=None, search=None, sort_by='Timestamp', sort_direction='Desc', search_status=None, search_type=None, search_reason=None, grabbed=None) — List Seeker search events. search_status can contain repeated enum filters.

Inputs: operation (required), arguments. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each of the 8 tools represents a distinct functional area: cleaner configuration, health status, jobs, events, stats, arr/download clients, feature configs, and notifications. The sub-operation names further clarify boundaries, leaving no ambiguity about which tool to use for a given task.

    Naming Consistency5/5

    All tools follow a consistent `cleanuparr_<area>` snake_case pattern, and sub-operations use a uniform verb_noun structure (get_, list_, update_, delete_, create_, etc.). The only minor deviation is the compound `arr_download_clients`, but it is still clear and does not break the overall naming scheme.

    Tool Count5/5

    With 8 well-categorized tools, the server is well-scoped. Each tool groups a coherent set of operations, making the count neither too thin nor too heavy for the domain of managing a Cleanuparr instance.

    Completeness5/5

    The surface covers the key entities and actions: CRUD for arr instances, download clients, notification providers, and rules; configuration get/update for all major settings; job lifecycle management; event and strike retrieval/management; and statistics. No critical operations appear to be missing for the server's stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server that exposes job search data from multiple boards, enabling clients to query and manage job listings via natural language.
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Transforms Swagger/OpenAPI documented APIs into conversational interfaces, enabling natural language interaction with APIs through an MCP server for use with AI assistants.
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      An MCP server for interacting with the Cutover API, enabling management of cutover events and related operations through natural language.
      3
      MIT