mcp-medusa
mcp-medusa
MCPサーバーで、Medusaのアニメ自動化ツールを公開します。
ツール
add_anime
POST /api/v2/anime/add を使用して、Medusaにアニメを追加します。
一般的な引数:
{
"anime_id": 62076,
"source": "myanimelist",
"root_dir": "/media/videos/Anime",
"anime": true,
"scene": false,
"status": "wanted",
"initial_release_group": "SubsPlease",
"fallback_release_groups": ["SubsPlease", "Erai-raws"],
"release_group_fallback_days": 7
}引数:
引数 | 必須 | デフォルト | 許可される値 / 注記 |
| はい | なし | ソース固有のアニメID。 |
| はい | なし | 新しいシリーズのMedusaルートディレクトリパス。 |
| いいえ |
| 大文字小文字を区別しない: |
| いいえ |
| 通常は |
| いいえ |
| シーン番号を有効にするかどうか。 |
| いいえ |
| Medusaのエピソードステータス文字列。通常は |
| いいえ | なし | ホワイトリストに登録する最初の/アクティブなリリースグループ。例: |
| いいえ | なし | ローテーションするリリースグループの順序付きリスト。決定論的な動作のために、最初のグループを先頭に含めます。 |
| いいえ |
| エピソードの放送日から次のフォールバックグループに切り替えるまでの日数。 |
| いいえ | Medusa生成 | オプションのシリーズフォルダ名の上書き。 |
seasonal_anime
GET /api/v2/anime/seasonal を使用して、Medusaの季節アニメをクエリします。
{
"year": 2026,
"season": "SPRING",
"source": "myanimelist",
"source_sort": "anime_num_list_users",
"page": 1,
"limit": 10,
"fields": ["animeId", "displayTitle", "year", "animeType", "genres", "score", "imageUrl"]
}現在のアニメシーズンのデフォルトを使用した最小限の呼び出し:
{}引数:
引数 | 必須 | デフォルト | 許可される値 / 注記 |
| いいえ | 現在の年 | 省略した場合、MCPサーバーの現在の日付から計算されます。 |
| いいえ | 現在のアニメシーズン | 大文字小文字を区別しない: |
| いいえ |
| 大文字小文字を区別しない: |
| いいえ |
| 大文字小文字を区別しない: |
| いいえ |
| Medusaの結果ページ番号。 |
| いいえ |
| 1ページあたりの結果数。Medusaは |
| いいえ |
| 保持するレスポンスフィールドのオプションリスト。省略またはnullの場合、完全なMedusaアニメオブジェクトが返されます。 |
現在のアニメシーズンのデフォルトは、この月のマッピングを使用します:
月 | シーズン |
1月-3月 |
|
4月-6月 |
|
7月-9月 |
|
10月-12月 |
|
便利な fields の値には以下が含まれます:
["animeId", "source", "displayTitle", "titleRomanji", "titleEnglish", "year", "season", "animeType", "status", "episodes", "episodeInfo", "genres", "studios", "score", "numListUsers", "imageUrl", "anidbId", "tvdbId", "malId", "url", "directoryName"]resolve_anime_title
GET /api/v2/anime/search を source、includeDetails=true、limit とともに使用して、タイトルをリッチ化されたMedusa/MyAnimeList候補に解決します。
{
"title": "Frieren",
"source": "myanimelist",
"limit": 10,
"min_score": 88,
"score_gap": 8
}decision を match、ambiguous、no_match として返し、スコア付き候補も返します。
anime_info
タイトルまたはMAL IDで、コンパクトなアニメ詳細とMedusaの存在を、何も追加せずに返します。
{
"title": "Frieren",
"source": "myanimelist"
}または:
{
"mal_id": 52991,
"source": "myanimelist"
}seasonal_candidates
残りのOpenClaw固有のヒューリスティックを適用する前に、Medusaのサーバーサイドの季節フィルターを使用して季節候補を取得します。
{
"year": 2026,
"season": "SUMMER",
"source": "myanimelist",
"limit": 25,
"min_num_list_users": 3000,
"fields": ["animeId", "displayTitle", "animeType", "genres", "numListUsers", "synopsis"]
}MCPツールは、ペイロードサイズを削減するために、animeType=TV、minNumListUsers、excludeGenres=Kids,Boys Love、matched=false、firstSeasonOnly=true、fields などのMedusaフィルターを送信します。
prepare_seasonal_review
季節候補アイテムを、控えめなレビュー指示付きのAIレビューパケットに圧縮します。
{
"items": [{"animeId": 62076, "displayTitle": "Example Title"}],
"max_items": 25
}resolve_and_add_anime
Medusaの一括追加エンドポイントを通じて、単一の追加を解決してドライランまたは実行します。書き込みには execute: true が必要です。
{
"title": "Frieren",
"root_dir": "/media/videos/Anime",
"execute": false
}scheduler_status
Medusaスケジューラースレッドの健全性とキュー状態を返します。アニメの追加がスタックまたは未検証に見える場合に使用します。
{}search_tvdb
番組名でTVDBを検索してTVDB IDを取得します。AniDBからTVDBへのマッピングの問題でアニメの追加が失敗した場合のフォールバックとして使用します。
{ "query": "Dorohedoro", "language": "en" }add_series
POST /api/v2/series を介してTVDB IDでシリーズを直接追加します。アニメ解決を完全にバイパスします。add_anime が失敗した場合に search_tvdb の後に使用します。
引数:
引数 | 必須 | デフォルト | 注記 |
| はい | なし | TVDB番組ID( |
| はい | なし | Medusaルートディレクトリパス。 |
| いいえ |
| |
| いいえ |
|
|
| いいえ | なし | インデクサー言語の上書き。 |
| いいえ | なし | カスタムシリーズフォルダ名の上書き。 |
| いいえ |
| |
| いいえ |
|
{ "tvdb_id": 370761, "root_dir": "/media/videos/Anime" }set_episode_status
POST /api/v2/internal/updateEpisodeStatus を介して、シリーズのエピソードステータスを設定します。TVDBメタデータが同期されておらず、Medusaが利用可能なはずのエピソードをダウンロードしていない場合に使用します。
引数:
引数 | 必須 | デフォルト | 注記 |
| はい | なし | シリーズスラッグ(例: |
| はい | なし | エピソードスラッグのリスト(例: |
| いいえ |
| ターゲットステータス: |
{ "series_slug": "tvdb370761", "episodes": ["s01e01", "s01e02"], "status": "wanted" }force_search
PUT /api/v2/search/manual を介して、特定のエピソードの手動検索を強制します。有効なプロバイダーを積極的にクエリし、一致するリリースを取得するプロバイダー検索をキューに入れます。エピソードを "wanted" に設定した後に使用します。
引数:
引数 | 必須 | デフォルト | 注記 |
| はい | なし | シリーズスラッグ(例: |
| はい | なし | エピソードスラッグのリスト(例: |
{ "series_slug": "tvdb370761", "episodes": ["s01e01"] }update_series_quality
PATCH /api/v2/series/{slug} を介して、既存のシリーズの許可または優先品質を更新します。人間が読める品質名を使用します。省略されたフィールドは変更されません。
引数:
引数 | 必須 | デフォルト | 注記 |
| はい | なし | シリーズスラッグ(例: |
| いいえ | なし | 許可リストの品質名。 |
| いいえ | なし | 優先リストの品質名。 |
品質名: "SDTV", "SD DVD", "720p HDTV", "RawHD", "1080p HDTV", "720p WEB-DL", "1080p WEB-DL", "720p BluRay", "1080p BluRay", "4K UHD TV", "8K UHD TV", "4K UHD WEB-DL", "8K UHD WEB-DL", "4K UHD BluRay", "8K UHD BluRay"。
{ "series_slug": "tvdb370761", "allowed_qualities": ["1080p BluRay", "720p HDTV"] }organize_season_folders
シーズンフォルダを有効にし、ファイル名を変更せずにエピソードファイルを Season XX/ サブディレクトリに移動します。type=ORGANIZE_SEASON_FOLDERS を指定して POST /api/v2/series/{slug}/operation を呼び出します。
複数シーズンのアニメがすべてのファイルをフラットディレクトリに持っており、Plexが複数シーズンを1つのフォルダでうまくサポートしていないためにエピソードが欠落している場合に使用します。
引数:
引数 | 必須 | デフォルト | 注記 |
| はい | なし | シリーズスラッグ(例: |
{ "series_slug": "tvdb370761" }postprocess
ディレクトリに対してMedusaの手動ポストプロセスをトリガーします。ダウンロード/ステージングフォルダをスキャンし、一致するエピソードをそれぞれの番組フォルダに移動します。MEDUSA_URL / MEDUSA_API_KEY の資格情報を再利用します。自動ポストプロセスが失敗した後にステージングに残されたファイルをクリアするために使用します(例: ダウンロードハンドラーが失敗した名前の間違ったリリース)。POST /api/v2/postprocess を呼び出します。
重要: directory 引数は Medusaコア によって解釈されるため、Medusaコンテナ内から見えるパス(例: /data/medusa)である必要があります。別のHermesコンテナから見えるパスではありません。
引数:
引数 | 必須 | デフォルト | 注記 |
| いいえ |
| スキャンするMedusaコンテナのパス。Medusaコアのビューと一致する必要があります。Hermesマウントではありません。 |
| いいえ |
|
|
| いいえ |
| 既存のエピソードファイルを上書きします。 |
| いいえ |
|
|
{ "proc_dir": "/data/medusa", "proc_type": "auto" }bulk_add_anime
POST /api/v2/anime/bulk-add を介して、複数のアニメ追加をドライランまたは実行します。書き込みには execute: true が必要です。
{
"items": [{"animeId": 62076, "displayTitle": "Example Title", "aiDecision": "add"}],
"decision_field": "aiDecision",
"allowed_decisions": ["add"],
"execute": false
}Related MCP server: MyAnimeList MCP Server
設定
環境変数:
変数 | 必須 | 説明 |
| はい | Medusa のベース URL。例: |
| 推奨 |
|
| いいえ | Medusa がパスの下でホストされている場合の Web ルート |
| いいえ | HTTP タイムアウト(秒)。デフォルトは |
| いいえ |
|
| いいえ | SSE バインドホスト。デフォルトは |
| いいえ | SSE バインドポート。デフォルトは |
| いいえ | MCP SDK の Host/Origin 検証を有効化。デフォルトは |
| いいえ | DNS リバインディング保護が有効な場合に許可される |
| いいえ | DNS リバインディング保護が有効な場合に許可される |
コンテナ/SSE デプロイでは、MCP_HOST=0.0.0.0 のままにするか、明示的に設定してください。DNS リバインディング保護はデフォルトで無効になっています。マップされたポート、リバースプロキシ、LAN ホスト名を使用すると、421 Misdirected Request エラーが頻繁に発生するためです。有効にする場合は、外部から見えるホストとポートを MCP_ALLOWED_HOSTS に含めてください。
ローカルで実行
pip install -e .
MEDUSA_URL=http://localhost:8081 MEDUSA_API_KEY=... mcp-medusaSSE の場合:
MEDUSA_URL=http://localhost:8081 MEDUSA_API_KEY=... mcp-medusa --transport sse --port 8000Docker
イメージはデフォルトでポート 8000 の SSE を使用します。
docker build -t mcp-medusa .
docker run --rm -p 8000:8000 \
-e MEDUSA_URL=http://medusa:8081 \
-e MEDUSA_API_KEY=... \
mcp-medusa代わりに stdio を使用する場合:
docker run --rm -i \
-e MEDUSA_URL=http://medusa:8081 \
-e MEDUSA_API_KEY=... \
mcp-medusa --transport stdioCI/CD
このリポジトリは完全自動化されたパイプラインを使用しています(手動リリース手順はありません):
mainに対して PR を開きます。ci.ymlワークフローはtests/test_boot.pyを実行します。これは実際にサーバー(stdio + SSE)を起動し、FastMCPの構築、期待されるツールの登録、両方のトランスポートのバインドを検証します。これは、リリース前に起動/インポートのクラッシュを検出するゲートです。自動マージ。 ブートテストが成功すると、
enable-auto-mergeジョブがACTIONS_PATリポジトリシークレットを使用して PR を(スカッシュで)マージします(このリポジトリではデフォルトのGITHUB_TOKENは PR をマージできません)。自動リリース + ビルド。
mainへのプッシュはmerge-release.ymlをトリガーします。これはブートテストを再実行し、mainからパッチバンプされたリリース(v0.0.N+1)を作成し、同じワークフロー内で Docker イメージをビルドしてプッシュします(ビルドは別のリリーストリガーワークフローではなくmerge-release.ymlに組み込まれています。GitHub がGITHUB_TOKEN経由でワークフローによって作成されたリリースのrelease: publishedイベントを抑制するためです)。
テストをローカルで実行
uv venv
uv pip install -e ".[test]"
uv run pytest tests/ -vブートテストは実際のサーバーを起動するため、Docker は不要です。server.py の起動パスを変更した場合は、プッシュ前にこれを実行してください。サーバーが起動に失敗した場合、CI はマージをブロックします。
必要なシークレット
ACTIONS_PAT— Contents: 読み取り+書き込み と Pull requests: 読み取り+書き込み の権限を持つファイングレイン PAT(またはクラシックなrepoトークン)。リポジトリシークレットとして保存されます。ci.ymlが PR のマージに使用します(ここではデフォルトのGITHUB_TOKENにはマージ機能がありません)。DOCKER_USERNAME/DOCKER_PASSWORD— イメージのプッシュにdocker-release.ymlが使用します。
Available Tools
21 toolsadd_animeA
Add an anime series to Medusa via /api/v2/anime/add.
Note: Some anime may fail with "no name on TVDBv2" due to AniDB→TVDB ID mapping issues. As a workaround, use search_tvdb to find the correct TVDB ID, then add_series to add it directly.
Inputs: anime_id (required), root_dir (required), anime, scene, +7 more.
add_seriesA
Add a series to Medusa directly by TVDB ID via POST /api/v2/series.
Use this as a fallback when add_anime fails due to AniDB-to-TVDB mapping issues. First find the correct TVDB ID with search_tvdb, then add it here. This bypasses anime resolution entirely and adds via the standard series endpoint.
quality values: "N/A", "Unknown", "SDTV", "SD DVD", "720p HDTV", "RawHD", "1080p HDTV", "720p WEB-DL", "1080p WEB-DL", "720p BluRay", "1080p BluRay", "4K UHD TV", "8K UHD TV", "4K UHD WEB-DL", "8K UHD WEB-DL", "4K UHD BluRay", "8K UHD BluRay". When omitted, Medusa's global quality defaults are used.
Inputs: tvdb_id (required), root_dir (required), anime, scene, +6 more.
anime_infoA
Return compact anime details and Medusa presence by title or MAL ID. Does not add anime.
Inputs: limit, title, mal_id, source, +3 more. Returns: object
bulk_add_animeA
Dry-run or add multiple anime items. Skips filterDecision=skip; execute must be true for writes.
Inputs: items (required), source, execute, root_dir, +9 more. Returns: object
create_aliasA
Create a local scene exception (alias) for a series.
This enables Medusa to recognize an alternative release title when searching, allowing it to match releases that use a different naming scheme. Only local (user-managed) scene exceptions can be created via this tool.
Inputs: name (required), series_slug (required), season. Returns: object
delete_aliasB
Delete a scene exception (alias) by ID.
Inputs: alias_id (required). Returns: result
diagnose_release_groupsA
Diagnose release group issues for a series by comparing config vs available releases.
Checks provider cache first; if empty, triggers a manual search and retries. Returns a structured diagnosis with recommendation.
Inputs: series_slug (required), season, episode, max_retries, +1 more. Returns: object
force_searchA
Force a manual search for specific episodes via PUT /api/v2/search/manual.
Queues a manual search that actively queries providers and snatches matching releases. Use after setting episode status to "wanted" when you want to immediately search for and download episodes.
Inputs: episodes (required), series_slug (required).
get_aliasesA
List scene exceptions (aliases) for a series.
Scene exceptions are alternative episode/release titles that Medusa recognizes when searching. This tool reads them; use create_alias to add new ones.
Inputs: series_slug (required), season. Returns: result
organize_season_foldersA
Move episodes into Season XX/ subdirectories without renaming files.
Enables season folders on the series and moves all downloaded episode files into Season XX/ subdirectories, preserving original filenames. Also moves associated files (subtitles, etc.).
Use this when:
A multi-season anime has all files in a flat directory
Plex is missing episodes due to poor multi-season-in-one-folder support
A second season was added years later to a show originally added flat
Calls POST /api/v2/series/{slug}/operation with type=ORGANIZE_SEASON_FOLDERS.
Inputs: series_slug (required). Returns: object
postprocessA
Trigger Medusa manual post-processing on a directory.
Scans directory (a download/staging folder) and moves matched
episodes into their show folders. Reuses Medusa credentials from
MEDUSA_URL / MEDUSA_API_KEY. Use this to clear files stranded in
staging after a failed auto-post-process (e.g. a mis-named release
that the download handler bailed on).
IMPORTANT: directory is interpreted by MEDUSA CORE, so it must be
the path as seen inside the Medusa container (e.g. /data/medusa),
NOT the path visible from the Hermes container.
Inputs: directory, process_type, force_replace, process_method. Returns: object
prepare_seasonal_reviewC
Compact seasonal candidates into an AI review packet.
Inputs: items (required), max_items. Returns: object
resolve_and_add_animeB
Resolve and optionally add one anime. Dry-run unless execute is true.
Inputs: limit, title, mal_id, source, +10 more. Returns: object
resolve_anime_titleB
Resolve an anime title to MAL candidates with match/ambiguous/no_match decision.
Inputs: title (required), limit, fields, source, +2 more. Returns: object
scheduler_statusA
Return Medusa scheduler and queue status.
Shows whether each scheduler thread is alive, enabled, and currently active. Useful for diagnosing stuck queues.
Inputs: no named parameters. Returns: object
search_tvdbA
Search TVDB for a show by name and return matching TVDB IDs.
Use this when an anime add fails due to AniDB-to-TVDB mapping issues. Find the correct TVDB ID here, then add the show with add_series.
Inputs: query (required), language. Returns: result
seasonal_animeB
Query a paginated seasonal anime page from Medusa, optionally returning only selected fields.
Season, source, and source_sort are case-insensitive.
Inputs: page, year, limit, fields, +3 more.
seasonal_candidatesC
Fetch server-filtered seasonal anime candidates and apply residual preference heuristics.
Inputs: year, limit, fields, season, +5 more. Returns: object
set_episode_statusA
Set episode statuses for a series via PATCH /api/v2/episodes/{series_slug}.
Use when TVDB metadata is out of sync with actual episode status and Medusa is not downloading episodes that should be available. Set affected episodes to "wanted" to force Medusa to search for them.
Uses the same PATCH endpoint as the Medusa Web UI, so it can change UNAIRED episodes to WANTED unlike the internal bulk-update endpoint.
Inputs: episodes (required), series_slug (required), status. Returns: object
update_release_groupsA
Update release group configuration for a series.
Sends PATCH /api/v2/series/{slug} with the specified config.release.* fields. Only the provided fields are changed; omitted fields are left as-is.
Inputs: series_slug (required), blacklist, whitelist, fallback_days, +1 more. Returns: object
update_series_qualityA
Update allowed and/or preferred qualities for an existing series.
Sends PATCH /api/v2/series/{slug} with config.qualities.* fields. Only the provided fields are changed; omitted fields are left as-is.
quality values: "N/A", "Unknown", "SDTV", "SD DVD", "720p HDTV", "RawHD", "1080p HDTV", "720p WEB-DL", "1080p WEB-DL", "720p BluRay", "1080p BluRay", "4K UHD TV", "8K UHD TV", "4K UHD WEB-DL", "8K UHD WEB-DL", "4K UHD BluRay", "8K UHD BluRay".
Inputs: series_slug (required), allowed_qualities, preferred_qualities.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
The core Medusa operations (aliases, release groups, searches, postprocessing) are clearly separated, but the anime-related tools have overlapping boundaries: seasonal_anime, seasonal_candidates, prepare_seasonal_review, resolve_anime_title, and resolve_and_add_anime all seem to cover similar discovery/dedup/resolution steps. Add flows are also split across add_series, add_anime, resolve_and_add_anime, and bulk_add_anime, so an agent may struggle to pick the right one without careful reading.
Tool naming is overwhelmingly snake_case with a verb_noun pattern (create_alias, set_episode_status, update_series_quality, bulk_add_anime). Only a few tools deviate into noun-first or adjective-first forms such as anime_info and seasonal_anime, but the convention is still predictable overall.
At 21 tools, the surface is on the upper edge of comfort and feels heavy for a cohesive server. The count is justifiable given the two intertwined domains of TV-series management and anime seasonal workflows, but some tools appear to cover niche pipeline stages that a smaller set could absorb.
The set covers many operational needs: adding series, adjusting statuses, searching, postprocessing, quality, season folders, aliases, scheduler status, and anime fetching. However, it lacks a general way to list or retrieve an existing series' slug/config, and there is no update path for aliases—only create/delete—so agents cannot fully reconcile or inspect existing state before modifying it.
Maintenance
Related MCP Connectors
Unofficial AniList MCP — wraps AniList GraphQL API (free, no auth)
Anime Garden MCP for anime torrent discovery.
Unofficial Jikan MCP — wraps the Jikan v4 API (anime/manga data, free, no auth)
TVMaze MCP — TV show metadata, episodes, schedules (no auth)
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides MCP access to the BangumiTV API, allowing users to retrieve and interact with anime, manga, music, and game information through natural language queries.1727-
- AlicenseBqualityDmaintenanceMCP Server for interacting with the MyAnimeList API, allowing LLM clients to access and interact with anime, manga and more.154MIT
- AlicenseNot gradedqualityAmaintenanceEnables searching Overseerr media, retrieving TMDB-backed details, and submitting movie or TV requests through MCP tools.5MIT
- AlicenseBqualityDmaintenanceEnables control and management of a self-hosted media stack (Radarr, Sonarr, Prowlarr, SABnzbd, qBittorrent) through natural language via MCP.15GPL 3.0