Logo von 媒体服务器 MCP

媒体服务器 MCP

Community
wyattjoh

A Model Context Protocol (MCP) server that provides AI assistants with tools to manage Radarr (movies), Sonarr (TV series) media servers, and access IMDB data through natural language interactions.

Herausgeberwyattjoh
Repositorymedia-server-mcp
SpracheTypeScript
Forks
4
Sterne
14
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    媒体服务器 MCP stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • Verfügbare Tools: 0

    Unten finden Sie die aufrufbaren Aktionen. Namen und Beschreibungen werden angezeigt, sofern der Server sie bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    Kennzahlen des verlinkten Repositorys: Sterne (14) und Forks (4).

Media Server MCP

A Model Context Protocol (MCP) server that provides AI assistants with tools to manage Radarr (movies), Sonarr (TV series), Plex media servers, and access TMDB data through natural language interactions.

Packages

This is a monorepo containing the following packages:

Features

  • Radarr Integration: Search, add, manage, and monitor movies
  • Sonarr Integration: Search, add, manage, and monitor TV series
  • Plex Integration: Browse libraries, search content, and manage Plex media server
  • TMDB Integration: Advanced movie/TV discovery, external ID lookup, and comprehensive metadata
  • Tool Configuration System: Reduce tool clutter with native profiles (18-70 tools), branch-based filtering, or the 3-tool Code Mode discovery facade
  • MCP Resources: Expose service configs and dynamic data (movies, series, collections, genres) as readable resources
  • MCP Prompts: Built-in prompts for common workflows (add-movie, add-series, library-report, recommendations)
  • Flexible Service Configuration: Each service is optional - configure any combination
  • Type-Safe: Built with TypeScript for reliable operations
  • Easy Setup: Install directly from JSR with a single deno run command

Installation

JSR (Recommended)

Add to your MCP servers configuration using the JSR package:

json
{
  "mcpServers": {
    "media-server": {
      "command": "deno",
      "args": ["run", "--allow-all", "jsr:@wyattjoh/media-server-mcp"],
      "env": {
        "RADARR_URL": "http://localhost:7878",
        "RADARR_API_KEY": "your-radarr-api-key",
        "SONARR_URL": "http://localhost:8989",
        "SONARR_API_KEY": "your-sonarr-api-key",
        "TMDB_API_KEY": "your-tmdb-api-key",
        "PLEX_URL": "http://localhost:32400",
        "PLEX_API_KEY": "your-plex-api-key",
        "TOOL_PROFILE": "default"
      }
    }
  }
}

Direct from GitHub

json
{
  "mcpServers": {
    "media-server": {
      "command": "deno",
      "args": [
        "run",
        "--allow-all",
        "https://raw.githubusercontent.com/wyattjoh/media-server-mcp/main/packages/media-server-mcp/src/index.ts"
      ],
      "env": {
        "RADARR_URL": "http://localhost:7878",
        "RADARR_API_KEY": "your-radarr-api-key"
      }
    }
  }
}

HTTP Security

Streamable HTTP accepts MCP clients without an Origin header. Browser requests are limited to local origins (localhost, 127.0.0.1, and [::1]) by default. Set MCP_ALLOWED_ORIGINS to a comma-separated list of permitted origin hostnames when serving a browser-based client behind a proxy.

Quick Start

  1. Configure at least one service in your MCP client's configuration:

Minimal Radarr-only Setup

json
{
  "mcpServers": {
    "media-server": {
      "command": "deno",
      "args": ["run", "--allow-all", "jsr:@wyattjoh/media-server-mcp"],
      "env": {
        "RADARR_URL": "http://localhost:7878",
        "RADARR_API_KEY": "your-radarr-api-key"
      }
    }
  }
}

Minimal Sonarr-only Setup

json
{
  "mcpServers": {
    "media-server": {
      "command": "deno",
      "args": ["run", "--allow-all", "jsr:@wyattjoh/media-server-mcp"],
      "env": {
        "SONARR_URL": "http://localhost:8989",
        "SONARR_API_KEY": "your-sonarr-api-key"
      }
    }
  }
}

Minimal TMDB-only Setup

json
{
  "mcpServers": {
    "media-server": {
      "command": "deno",
      "args": ["run", "--allow-all", "jsr:@wyattjoh/media-server-mcp"],
      "env": {
        "TMDB_API_KEY": "your-tmdb-api-key"
      }
    }
  }
}
  1. Find your API keys:

    • Radarr: Settings → General → Security → API Key
    • Sonarr: Settings → General → Security → API Key
    • TMDB: Sign up at TMDB, go to Settings → API → Create API Key

    Important:

    • For TMDB, you'll need a free TMDB account and API key from their developer section.
  2. Start using - Ask your AI assistant to manage your media library!

Configuration

Environment Variables

VariableDescriptionRequired
RADARR_URLBase URL of your Radarr instanceOptional*
RADARR_API_KEYAPI key for Radarr authenticationOptional*
SONARR_URLBase URL of your Sonarr instanceOptional*
SONARR_API_KEYAPI key for Sonarr authenticationOptional*
TMDB_API_KEYTMDB API key for movie/TV metadataOptional*
PLEX_URLBase URL of your Plex instanceOptional*
PLEX_API_KEYX-Plex-Token for Plex authenticationOptional*
MCP_AUTH_TOKENAuthentication token for HTTP transport modesOptional
MCP_ALLOWED_ORIGINSComma-separated browser Origin hostnames allowed in HTTP modeOptional

*At least one service (Radarr, Sonarr, TMDB, or Plex) must be configured.

Example URLs

  • Local Radarr: http://localhost:7878
  • Local Sonarr: http://localhost:8989
  • Remote with custom port: https://radarr.yourdomain.com:443

SSE Mode (HTTP Transport)

Deprecated: SSE transport is deprecated. Use Streamable HTTP (--http) instead.

By default, the MCP server runs in stdio mode for direct integration with MCP clients. However, you can also run it in SSE (Server-Sent Events) mode over HTTP for web-based integrations or debugging.

Running in SSE Mode

bash
# Start server in SSE mode on port 3000 (default)
deno run --allow-all jsr:@wyattjoh/media-server-mcp --sse

# Or specify a custom port
deno run --allow-all jsr:@wyattjoh/media-server-mcp --sse --port 8080

Authentication Token

Important: SSE mode requires the MCP_AUTH_TOKEN environment variable for security. This token is used to authenticate HTTP requests via Bearer token authentication.

bash
# Required for SSE mode
export MCP_AUTH_TOKEN="your-secure-random-token"

# Generate a secure token (example using openssl)
export MCP_AUTH_TOKEN=$(openssl rand -base64 32)

SSE Endpoints

When running in SSE mode, the server provides these endpoints:

  • GET /sse - SSE event stream endpoint; the server assigns a session ID and sends the message endpoint URL via an SSE endpoint event (requires Bearer auth)
  • POST /messages?sessionId=<id> - HTTP POST endpoint for client messages (requires Bearer auth)
  • GET /health - Health check endpoint (no authentication required)

Example SSE Usage

bash
# Set authentication token
export MCP_AUTH_TOKEN="your-secure-token"

# Start server in SSE mode
deno run --allow-all jsr:@wyattjoh/media-server-mcp --sse --port 3000

# Test health endpoint
curl http://localhost:3000/health

# Connect to SSE stream (requires Bearer token)
# The server assigns a session ID and sends it via an SSE event
curl -H "Authorization: Bearer your-secure-token" \
     http://localhost:3000/sse

Security Notes:

  • Never expose SSE mode to the internet without proper authentication
  • Use a strong, randomly generated MCP_AUTH_TOKEN
  • The health endpoint (/health) is the only unauthenticated endpoint
  • All other endpoints require valid Bearer token authentication

Streamable HTTP Mode (Recommended for Remote)

Streamable HTTP is the recommended transport for remote MCP server deployments. It supports the stateless MCP 2026-07-28 specification and the SDK's 2025-era stateless compatibility path. The deprecated --sse mode remains available for legacy SSE clients during the transition.

Running in Streamable HTTP Mode

bash
# Start server in Streamable HTTP mode on port 3000 (default)
deno run --allow-all jsr:@wyattjoh/media-server-mcp --http

# Specify a custom port and host
deno run --allow-all jsr:@wyattjoh/media-server-mcp --http --port 8080 --host 127.0.0.1

Endpoints

  • POST /mcp - Send JSON-RPC requests. MCP 2026-07-28 clients use server/discover and include matching MCP-Protocol-Version and Mcp-Method headers on every request. tools/call, resources/read, and prompts/get also require Mcp-Name.
  • GET /mcp and DELETE /mcp - Not supported by the stateless 2026-07-28 transport. Use subscriptions/listen for opted-in notifications.
  • GET /health - Health check endpoint (no authentication required)

Authentication

Authentication via MCP_AUTH_TOKEN is optional but strongly recommended for any deployment accessible over a network. When set, all requests (except /health) must include a Authorization: Bearer <token> header.

bash
# Set authentication token (recommended)
export MCP_AUTH_TOKEN=$(openssl rand -base64 32)

# Start server
deno run --allow-all jsr:@wyattjoh/media-server-mcp --http

Connecting from Claude Code

bash
# Without authentication
claude mcp add --transport http media-server http://your-server:3000/mcp

# With authentication (set the token as a header)
claude mcp add --transport http media-server http://your-server:3000/mcp \
  --header "Authorization: Bearer your-secure-token"

Connecting from Claude.com

  1. Go to Settings > Custom Connectors
  2. Add a new MCP server with Transport type "Streamable HTTP"
  3. Enter the URL: https://your-server:3000/mcp
  4. If using authentication, configure the Bearer token

Security Best Practices

  • Always use HTTPS in production — terminate TLS with a reverse proxy (nginx, Caddy, etc.) in front of the MCP server
  • Set MCP_AUTH_TOKEN with a strong, randomly generated value for any network-accessible deployment
  • Bind to specific interfaces using --host to limit which network interfaces accept connections (e.g., --host 127.0.0.1 for localhost only)
  • Use a reverse proxy for rate limiting, request size limits, and TLS termination
  • Restrict network access using firewall rules or VPN to limit who can reach the server
  • Browser origins: Streamable HTTP rejects browser requests unless the Origin hostname is local (localhost, 127.0.0.1, or [::1]) or listed in MCP_ALLOWED_ORIGINS. Requests without Origin remain available to non-browser MCP clients. SSE retains its legacy permissive CORS behavior and requires bearer authentication.
  • Modern HTTP headers: Ensure reverse proxies preserve MCP-Protocol-Version, Mcp-Method, and Mcp-Name, because the 2026-07-28 handler validates them against each JSON-RPC request.

Tool Configuration System

The Media Server MCP includes a powerful tool filtering system that allows you to control which tools are exposed to your AI assistant. This helps reduce tool clutter and focus on the functionality you need.

Tool Organization

Tools are organized into 6 logical branches:

BranchDescriptionTool CountPurpose
discovery-addCore discovery and adding functionality18 toolsFinding and adding new content
library-managementManaging existing content11 toolsOrganizing your library
system-maintenanceHealth checks and maintenance10 toolsSystem administration
download-managementQueue and download operations7 toolsDownload monitoring
metadata-enrichmentAdvanced TMDB research features16 toolsDeep content research
advanced-searchExternal ID lookups and specialized searches7 toolsPower user features

Predefined Profiles

Choose from 7 predefined profiles that combine tool branches or expose progressive discovery:

ProfileBranches IncludedTotal ToolsBest For
codemodeProgressive discovery facade3 toolsModels that discover configured tools on demand
default (default)discovery-add18 toolsMost users - essential discovery and adding
minimaldiscovery-add18 toolsSame as default
curatordiscovery-add + library-management29 toolsManaging existing content
maintainercurator + system-maintenance39 toolsSystem administrators
power-userAll except advanced-search63 toolsAdvanced users
fullAll branches70 toolsComplete functionality

Configuration Methods

1. Environment Variables (Recommended)

Add these variables to your MCP server configuration:

json
{
  "mcpServers": {
    "media-server": {
      "command": "deno",
      "args": ["run", "--allow-all", "jsr:@wyattjoh/media-server-mcp"],
      "env": {
        "RADARR_URL": "http://localhost:7878",
        "RADARR_API_KEY": "your-radarr-api-key",
        "TOOL_PROFILE": "curator",
        "TOOL_BRANCHES": "download-management"
      }
    }
  }
}

Available Environment Variables:

VariableDescriptionExample Values
TOOL_PROFILESelect a predefined profilecodemode, default, curator, power-user, full
TOOL_BRANCHESAdd specific branches (comma-separated)library-management,system-maintenance
TOOL_EXCLUDEExclude specific tools (comma-separated)radarr_delete_movie,sonarr_delete_series
TOOL_INCLUDEInclude specific tools (overrides other settings)radarr_get_health,sonarr_get_health
TOOL_CONFIG_PATHPath to JSON configuration file./tools.config.json

2. JSON Configuration File

For advanced configuration, create a JSON file and reference it with TOOL_CONFIG_PATH:

json
{
  "toolProfile": "curator",
  "enabledBranches": ["download-management", "system-maintenance"],
  "customOverrides": {
    "exclude": [
      "radarr_delete_movie",
      "sonarr_delete_series"
    ],
    "include": [
      "radarr_get_health",
      "sonarr_get_health"
    ]
  }
}

Configuration Precedence

Settings are applied in this order (later settings override earlier ones):

  1. Default Profile: discovery-add tools only (18 tools)
  2. JSON Configuration File: Applied if TOOL_CONFIG_PATH is set
  3. Environment Variables: Override JSON settings
  4. Custom Overrides: TOOL_EXCLUDE and TOOL_INCLUDE applied last for native profiles

The codemode profile always advertises only codemode_search, codemode_describe, and codemode_execute. Its catalog covers every native tool for configured services and ignores TOOL_BRANCHES, TOOL_INCLUDE, and TOOL_EXCLUDE. Resources and prompts remain available. Mutating tools are discoverable but marked unavailable for Code Mode execution. See the Code Mode operator and model guide for the search, describe, execute workflow, JavaScript contract, fixed limits, benchmark, and v1 scope. Source development and Docker use Deno 2.9.5; install the version pinned in .tool-versions. Standalone compiled binaries do not support Code Mode until runner-sidecar packaging is designed. See Code Mode security for the enforced boundary, Docker behavior, optional Linux containment, and process-only limitations.

Common Configuration Examples

Code Mode

bash
TOOL_PROFILE=codemode
# Result: 3 progressive-discovery tools; configured resources and prompts remain

Use codemode_search to find exact native names, following hasMore with offset + returned to traverse every stable filtered page; use codemode_describe to inspect selected contracts and facade paths, then codemode_execute with explicitly selected read-only names and a JavaScript async-function body that returns the desired JSON result. Concise multi-word search is ranked deterministically. Defaulted inputs are optional, unknown input properties are rejected, and described outputs expose stable fields for small projections. Plex category filters are applied to returned hubs so explicit TV searches exclude movies and retain consistent counts. Before validating a deployment, read runtime://media-server-mcp/identity to confirm the running package version, Code Mode contract revision, configured services, execution policy, and fixed limits match the release under evaluation. The Code Mode guide includes a copy-paste fresh Pi release-validation prompt.

For routine Radarr or Sonarr decisions, read config://radarr/summary or config://sonarr/summary to retrieve only quality-profile identities and root-folder status. Use the existing complete config://radarr or config://sonarr resource when troubleshooting requires full quality definitions or unmapped-folder inventories.

Minimal Setup (Default)

bash
# No tool configuration needed - uses default profile
# Result: 18 essential discovery and add tools

Content Curator

bash
TOOL_PROFILE=curator
# Result: 29 tools (discovery + library management)

System Administrator

bash
TOOL_PROFILE=maintainer
TOOL_INCLUDE=radarr_disk_scan,sonarr_disk_scan
# Result: 41 tools (maintainer profile + disk scanning)

Power User with Restrictions

bash
TOOL_PROFILE=power-user
TOOL_EXCLUDE=radarr_delete_movie,sonarr_delete_series,sonarr_disk_scan
# Result: 60 tools (power-user minus dangerous operations)

Discovery Only (TMDB + Search)

bash
TOOL_PROFILE=default
TOOL_EXCLUDE=radarr_add_movie,sonarr_add_series
# Result: 16 tools (discovery without adding capabilities)

Full Access

bash
TOOL_PROFILE=full
# Result: 70 tools (all available functionality)

Tool Configuration Debugging

The server logs the active configuration on startup:

[INFO] Tool Configuration:
  Profile: curator
  Additional Branches: download-management
  Excluded Tools: radarr_delete_movie, sonarr_delete_series
  Total Enabled Tools: 36

This helps verify your configuration is working as expected.

Available Tools

Radarr Tools (when configured)

Movie Management

  • radarr_search_movie - Search for movies in The Movie Database
  • radarr_add_movie - Add a movie to your library
  • radarr_get_movies - List all movies in your library (supports filtering by title, genres, year range, monitored status, file availability, quality profile, tags, minimum availability, and TMDB ID)
  • radarr_get_movie - Get details of a specific movie
  • radarr_delete_movie - Remove a movie from your library

Queue and Downloads

  • radarr_get_queue - View current download queue
  • radarr_search_movie_releases - Search for releases of a specific movie

System Management

  • radarr_get_configuration - Get configuration including quality profiles, root folders, and tags
  • radarr_get_system_status - Get system information
  • radarr_get_health - Check system health
  • radarr_refresh_movie - Refresh movie metadata
  • radarr_update_movie - Update a movie's settings (quality profile, monitoring, etc.)
  • radarr_refresh_all_movies - Refresh metadata for all movies in the library
  • radarr_disk_scan - Rescan all movie folders for new/missing files

Wanted/Missing and Quality Management

  • radarr_get_wanted_missing - Get movies that are monitored but not yet downloaded
  • radarr_get_wanted_cutoff - Get movies downloaded but below quality cutoff
  • radarr_get_calendar - Get upcoming movie releases within a date range

History and Troubleshooting

  • radarr_get_history - Get paginated download history with event type filtering
  • radarr_get_movie_history - Get download history for a specific movie
  • radarr_mark_failed - Mark a download as failed to trigger re-grab

Interactive Release Management

  • radarr_get_releases - Browse available releases from indexers for a movie
  • radarr_grab_release - Download a specific release
  • radarr_search_all_missing - Trigger search for all missing movies at once
  • radarr_delete_queue_item - Remove a stuck/failed item from the queue
  • radarr_grab_queue_item - Force download a queue item

Sonarr Tools (when configured)

Series Management

  • sonarr_search_series - Search for TV series
  • sonarr_add_series - Add a TV series to your library
  • sonarr_get_series - List all series in your library (supports filtering by title, genres, year range, monitored status, network, series type, quality profile, tags, status, and TMDB ID)
  • sonarr_get_series_by_id - Get details of a specific series
  • sonarr_delete_series - Remove a series from your library

Episode Management

  • sonarr_get_episodes - Get episodes for a series
  • sonarr_get_episode - Get details of a specific episode by ID
  • sonarr_update_episode_monitoring - Change episode monitoring status
  • sonarr_get_calendar - View upcoming episodes
  • sonarr_search_series_episodes - Search for all episodes of a series
  • sonarr_search_season - Search for episodes of a specific season
  • sonarr_search_episodes - Search for specific episodes by IDs

Queue and Downloads

  • sonarr_get_queue - View current download queue

System Management

  • sonarr_get_configuration - Get configuration including quality profiles and root folders
  • sonarr_get_system_status - Get system information
  • sonarr_get_health - Check system health
  • sonarr_refresh_series - Refresh series metadata
  • sonarr_update_series - Update a series' settings (quality profile, monitoring, etc.)
  • sonarr_refresh_all_series - Refresh metadata for all series in the library
  • sonarr_disk_scan - Rescan all series folders for new/missing files

Wanted/Missing and Quality Management

  • sonarr_get_wanted_missing - Get episodes that are monitored but not yet downloaded
  • sonarr_get_wanted_cutoff - Get episodes downloaded but below quality cutoff

History and Troubleshooting

  • sonarr_get_history - Get paginated download history with event type filtering
  • sonarr_get_series_history - Get download history for a specific series
  • sonarr_mark_failed - Mark a download as failed to trigger re-grab

Interactive Release Management

  • sonarr_get_releases - Browse available releases from indexers for an episode
  • sonarr_grab_release - Download a specific release
  • sonarr_search_all_missing - Trigger search for all missing episodes at once
  • sonarr_delete_queue_item - Remove a stuck/failed item from the queue
  • sonarr_grab_queue_item - Force download a queue item

TMDB Tools (when configured)

Search and Discovery

  • tmdb_search_movies - Search for movies on TMDB by title
  • tmdb_search_tv - Search for TV shows on TMDB by title
  • tmdb_search_multi - Search for movies, TV shows, and people in a single request
  • tmdb_get_popular_movies - Get popular movies
  • tmdb_discover_movies - Discover movies based on various criteria (genre, year, rating, etc.)
  • tmdb_discover_tv - Discover TV shows based on various criteria

Trending Content

  • tmdb_get_trending - Get trending movies, TV shows, or people by time window (day/week)

Movie Lists

  • tmdb_get_now_playing_movies - Get movies currently playing in theaters
  • tmdb_get_top_rated_movies - Get top rated movies
  • tmdb_get_upcoming_movies - Get upcoming movie releases

TV Show Lists

  • tmdb_get_popular_tv - Get popular TV shows
  • tmdb_get_top_rated_tv - Get top rated TV shows
  • tmdb_get_on_the_air_tv - Get TV shows currently on the air
  • tmdb_get_airing_today_tv - Get TV shows airing today

Content Details

  • tmdb_get_movie_details - Get detailed information about a specific movie
  • tmdb_get_tv_details - Get detailed information about a specific TV show

Recommendations and Similar Content

  • tmdb_get_movie_recommendations - Get movie recommendations based on a specific movie
  • tmdb_get_tv_recommendations - Get TV show recommendations based on a specific show
  • tmdb_get_similar_movies - Get movies similar to a specific movie
  • tmdb_get_similar_tv - Get TV shows similar to a specific show

People Discovery

  • tmdb_search_people - Search for people (actors, directors, etc.)
  • tmdb_get_popular_people - Get popular people in the entertainment industry
  • tmdb_get_person_details - Get detailed information about a specific person
  • tmdb_get_person_movie_credits - Get a person's movie credits
  • tmdb_get_person_tv_credits - Get a person's TV show credits

Collections and Keywords

  • tmdb_search_collections - Search for movie collections
  • tmdb_get_collection_details - Get details about a specific movie collection
  • tmdb_search_keywords - Search for keywords
  • tmdb_get_movies_by_keyword - Get movies associated with a specific keyword

Certifications and Watch Providers

  • tmdb_get_certifications - Get movie or TV certifications by country
  • tmdb_get_watch_providers - Get watch provider information for a movie or TV show

External ID Integration

  • tmdb_find_by_external_id - Find TMDB content by external ID (TVDB ID, etc.)

Configuration and Metadata

  • tmdb_get_genres - Get list of available genres for movies or TV shows
  • tmdb_get_configuration - Get TMDB API configuration including image base URLs
  • tmdb_get_countries - Get list of countries used in TMDB
  • tmdb_get_languages - Get list of languages used in TMDB

Cast and Crew Information

  • tmdb_get_movie_credits - Get cast and crew for a movie
  • tmdb_get_tv_credits - Get cast and crew for a TV show

Plex Tools (when configured)

System Information

  • plex_get_capabilities - Get Plex server capabilities, version, and system information

Library Management

  • plex_get_libraries - List all media libraries available on the Plex server
  • plex_get_accounts - List Plex system accounts and their IDs and names for resolving playback history users
  • plex_refresh_library - Trigger a refresh of a specific library to scan for new content
  • plex_get_library_items - Browse and filter items in a library section (supports filtering by studio, genre, year, and sorting)

Search and Discovery

  • plex_search - Search across all Plex libraries for movies, TV shows, and other content with optional type filters
  • plex_get_metadata - Get detailed metadata for a specific movie, TV show, or other media item
  • plex_get_playback_history - Get playback history for a specific playable media item, such as a movie or episode, by rating key (up to 1,000 entries per request)
  • plex_get_watch_history - Get recent playback history across all playable media, with account and timestamp filters (up to 1,000 entries per request)

Collection Management

  • plex_get_collections - List all collections in a library section
  • plex_get_collection_items - Get all items in a specific collection
  • plex_create_collection - Create a new collection with initial items
  • plex_add_to_collection - Add items to an existing collection
  • plex_remove_from_collection - Remove a single item from a collection
  • plex_delete_collection - Delete an entire collection

Usage Examples

Natural Language Requests

With this MCP server configured, you can ask your AI assistant:

  • "Add the movie Inception to my Radarr library"
  • "Show me what TV series are in my Sonarr queue"
  • "What episodes of Breaking Bad are airing this week?"
  • "Add The Office to my TV library and monitor all seasons"
  • "Find movies on TMDB similar to The Dark Knight from 2020-2024"
  • "Discover highly-rated sci-fi TV shows on TMDB"
  • "Get the Radarr system status and health"

API Examples

Adding a Movie

json
{
  "tool": "radarr_add_movie",
  "arguments": {
    "tmdbId": 550,
    "title": "Fight Club",
    "year": 1999,
    "qualityProfileId": 1,
    "rootFolderPath": "/movies",
    "minimumAvailability": "released",
    "monitored": true,
    "searchForMovie": true
  }
}

Adding a TV Series

json
{
  "tool": "sonarr_add_series",
  "arguments": {
    "tvdbId": 78804,
    "title": "Breaking Bad",
    "qualityProfileId": 1,
    "rootFolderPath": "/tv",
    "monitored": true,
    "seasonFolder": true,
    "seriesType": "standard"
  }
}

Discovering Movies on TMDB

json
{
  "tool": "tmdb_discover_movies",
  "arguments": {
    "with_genres": "28,878",
    "vote_average_gte": 7.0,
    "primary_release_year": 2023,
    "sort_by": "popularity.desc"
  }
}

Troubleshooting

Common Issues

No Tools Available

  • Ensure at least one service is configured with valid environment variables
  • Check that URLs are accessible and API keys are correct
  • Verify the MCP server is starting without errors

Connection Refused

  • Verify Radarr/Sonarr URLs are correct and accessible
  • Check that the services are running
  • Ensure no firewall is blocking the connections

Unauthorized/403 Errors

  • Verify API keys are correct and haven't expired
  • Check that API access is enabled in service settings

Tool Configuration Issues

  • Too many/few tools: Check your TOOL_PROFILE setting or use TOOL_BRANCHES to add specific functionality
  • Missing expected tools: Verify the tool is included in your profile/branches using the startup logs
  • Invalid profile error: Use one of the valid profiles: codemode, default, minimal, curator, maintainer, power-user, full
  • JSON config not loading: Check that TOOL_CONFIG_PATH points to a valid file and has correct JSON syntax

Debug Mode

Check MCP server logs for connection status and tool configuration on startup. The server will:

  • Test each configured service and report connection results
  • Log the active tool configuration showing profile, branches, and total tool count
  • Report any configuration parsing errors

Development

Local Development Setup

  1. Clone this repository:
bash
git clone https://github.com/wyattjoh/media-server-mcp.git
cd media-server-mcp
  1. Create environment configuration:
bash
cp .env.example .env
# Edit .env with your service URLs and API keys
  1. Run the server:
bash
deno task dev

Available Scripts

bash
# Development with hot reload
deno task dev

# Production run  
deno task start

# Type checking
deno check

# Code formatting
deno fmt

# Linting
deno lint

# Run tests
deno task test

Project Structure

src/
├── index.ts              # Main MCP server
├── clients/
│   ├── radarr.ts         # Radarr API client
│   ├── sonarr.ts         # Sonarr API client
│   └── tmdb.ts           # TMDB API client
├── tools/
│   ├── radarr-tools.ts   # Radarr MCP tools
│   ├── sonarr-tools.ts   # Sonarr MCP tools  
│   └── tmdb-tools.ts     # TMDB MCP tools
├── utils/
│   └── filters.ts        # Filtering and sorting utilities
└── types/
    ├── radarr.ts         # Radarr type definitions
    ├── sonarr.ts         # Sonarr type definitions
    ├── tmdb.ts           # TMDB type definitions
    ├── mcp.ts            # MCP-specific types
    ├── filters.ts        # Filter and sort type definitions
    └── validation.ts     # Validation utilities

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE.md file for details.

Acknowledgments

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "wyattjoh-media-server-mcp": {
      "command": "",
      "args": []
    }
  }
}

媒体服务器 MCP MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald 媒体服务器 MCP verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor einrichten“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Einstellungen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor einrichten“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie „Terminal“ (macOS) bzw. „Windows Terminal“ (Windows).
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

媒体服务器 MCP als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server bearbeiten“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server bearbeiten“.
  3. Fügen Sie die MCP-Server-Konfiguration für 媒体服务器 MCP ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server bearbeiten“
{
  "mcpServers": {
    "wyattjoh-media-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "media-server-mcp"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von 媒体服务器 MCP. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von 媒体服务器 MCP.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit 媒体服务器 MCP bei dieser Aufgabe helfen?
媒体服务器 MCP
Gerne. Ich habe es gelesen.
Das habe ich mit 媒体服务器 MCP gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server 媒体服务器 MCP verwendet?

媒体服务器 MCP ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich den MCP-Server 媒体服务器 MCP mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie 媒体服务器 MCP mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum den MCP-Server 媒体服务器 MCP mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald 媒体服务器 MCP verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich den MCP-Server 媒体服务器 MCP mit TypingMind?

媒体服务器 MCP wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt der MCP-Server 媒体服务器 MCP in TypingMind bereit?

媒体服务器 MCP stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um den MCP-Server 媒体服务器 MCP zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal. Sie wählen Ihre Modellanbieter selbst und behalten die Kontrolle über Ihre API-Schlüssel, Prompts und MCP-Konfiguration. Falls 媒体服务器 MCP eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇