Logo MCP Trakt

MCP Trakt

Cộng đồng
wwiens

A Model Context Protocol (MCP) server that creates a bridge between AI language models and the Trakt.tv API, allowing LLMs to access real-time entertainment data and personal Trakt viewing history.…

Nhà phát hànhwwiens
Kho mãtrakt_mcpserver
Ngôn ngữPython
Bản fork
14
Sao
46
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    MCP Trakt cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    46 sao và 14 bản fork từ kho mã được liên kết.

🎬 MCP Trakt: Your AI's Gateway to Entertainment Data

MCP Trakt Built by AI+Humans Version Powered by Claude

A Model Context Protocol (MCP) server that creates a bridge between AI language models and the Trakt.tv API, allowing LLMs to access real-time entertainment data and personal Trakt viewing history. Built with a domain-focused architecture using FastMCP, providing clean separation of concerns across authentication, shows, seasons, episodes, movies, people, user data, comments, search, and check-in functionality.

🖥️ An AI Experiment

Other than this paragraph, everything here has been generated by AI, including the code. I had a goal to learn more about MCP and have been playing a lot with Cursor, so it seemed like a natural next move to bring these together. The result was this project. All changes moving forward will also be done by AI.

📚 About MCP & Trakt

Model Context Protocol (MCP) enables AI models to interact with external systems through standardized tools and resources. Trakt.tv is a comprehensive platform for tracking TV shows and movies with 14+ million users and extensive APIs for developers.

🚀 Quick Start

Docker Quickstart

bash
docker run -d --rm --name trakt_mcpserver \
  -e TRAKT_CLIENT_ID=your_client_id \
  -e TRAKT_CLIENT_SECRET=your_client_secret \
  -v trakt_auth:/data \
  -p 8080:8080 \
  ghcr.io/wwiens/trakt_mcpserver:latest

Run with uvx (no clone, no install)

Requires uv installed.

bash
uvx --from git+https://github.com/wwiens/trakt_mcpserver trakt-mcp

Pin to a release tag for reproducibility:

bash
uvx --from git+https://github.com/wwiens/trakt_mcpserver@v0.9.0 trakt-mcp

Claude Desktop / MCPhub configuration:

json
{
  "mcpServers": {
    "trakt": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/wwiens/trakt_mcpserver",
        "trakt-mcp"
      ],
      "env": {
        "TRAKT_CLIENT_ID": "your_client_id",
        "TRAKT_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Your Trakt OAuth token is persisted to ~/.trakt-mcp/auth_token.json (the directory is created on first login), so authorization survives across uvx invocations. To override the location — e.g. for Docker volumes or to keep multiple isolated accounts — set TRAKT_AUTH_TOKEN_PATH to an absolute path.

Local Installation

Requires Python 3.12 or newer.

  1. Clone this repository

    bash
    git clone https://github.com/wwiens/trakt_mcpserver.git
    cd trakt_mcpserver
  2. Create a virtual environment and install dependencies

    bash
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -e .
  3. Set up your environment

    bash
    cp .env.example .env

    Then edit .env to add your Trakt API credentials:

    bash
    TRAKT_CLIENT_ID=your_client_id
    TRAKT_CLIENT_SECRET=your_client_secret
  4. Run the server

    bash
    python server.py

Installing in Claude Desktop

Add to your Claude Desktop MCP configuration file:

json
{
  "mcpServers": {
    "trakt": {
      "command": "python",
      "args": ["/path/to/your/server.py"],
      "env": {
        "TRAKT_CLIENT_ID": "your_client_id",
        "TRAKT_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

✨ Features

🌎 Public Trakt Data

  • Access trending and popular shows and movies
  • Discover the most anticipated, favorited, played, and watched content
  • See the top-grossing U.S. box office movies from last weekend
  • Get real-time data from Trakt's global community
  • Formatted responses with titles, years, and popularity metrics
  • View detailed ratings for shows and movies including average scores and distribution
  • Browse show seasons with episode counts, aired episodes, and ratings per season
  • Dive into specific seasons with detailed info, episode lists, ratings, cast & crew, videos, translations, and engagement stats
  • See who's watching a specific season right now
  • Find lists containing a specific season
  • Explore individual episodes with detailed summaries, ratings, cast & crew, videos, translations, and engagement stats
  • See who's watching a specific episode right now
  • Find lists containing a specific episode
  • Look up cast and crew for any movie or show, with optional guest stars for shows
  • Explore people with biographies, social media, and full filmographies
  • Browse a person's credits across movies and shows with character names and episode counts
  • Find lists containing a specific person

👤 Personal Trakt Data

  • View Your Watched Shows: Get a complete list of shows you've personally watched
  • See your exact last-watched dates for each series
  • Track how many times you've watched each show
  • Check in to shows you're currently watching to mark them as watched
    • By show ID (more precise) or show title (more convenient)
    • Include custom messages with your check-ins
    • See when you watched the episode in human-readable format
  • Search for shows to find their details and IDs
  • Manage your ratings: View, add, and remove personal ratings for movies, shows, seasons, and episodes with pagination support
  • Manage your watchlist: View, add, and remove items from your watchlist with pagination and sorting support
    • Filter by type (all, movies, shows, seasons, episodes)
    • Sort by multiple criteria (rank, added, title, released, runtime, popularity, percentage, votes)
    • Add optional notes to watchlist items (VIP feature, 500 char limit)
  • Track show progress: See your watched progress for any TV show
    • View episodes watched vs aired with completion percentage
    • See your next episode to watch
    • View per-season breakdown with progress stats
    • Include hidden seasons and specials optionally
  • Manage playback progress: View and clear paused playback items
    • See movies and episodes you paused mid-watch
    • View progress percentage and when you paused
    • Clear playback items you no longer need
  • Manage watch history: Add and remove items from your history
    • Mark movies, shows, seasons, or episodes as watched
    • Optionally specify when you watched them
    • Remove items from your watch history
  • Secure authentication with Trakt through device code flow
  • Personal data is fetched directly from your Trakt account

🎯 Personalized Recommendations

  • Get tailored movie and show suggestions based on your watch history and ratings (requires authentication)
  • Filter out items you've already collected or watchlisted
  • Hide recommendations you're not interested in so they don't come back
  • Unhide previously hidden items to restore them

💬 Comments & Reviews

  • View comments for shows and movies: Read what others are saying about your favorite content
  • See comments for specific seasons and episodes: Get insights about particular parts of a show
  • View individual comments and their replies: Engage with the community's discussions
  • Spoiler protection: Comments with spoilers are hidden by default
  • Toggle spoiler visibility: Choose whether to show or hide spoilers
  • View reviews: Longer, more detailed comments are marked as reviews
  • See ratings distribution: View how many users gave each rating from 1-10

🔄 General Features

  • Exposes Trakt API data through MCP resources
  • Provides tools for fetching real-time entertainment information
  • Enables AI models to offer personalized entertainment recommendations
  • Simple authentication and logout process
  • Pagination support for list endpoints (trending, popular, anticipated, favorited, played, watched, search, comments, ratings, watchlist):
    • Pass page: int for single-page results with pagination metadata
    • Omit page to auto-paginate and return up to limit total items as a flat list
    • Use limit=0 to fetch all available results (capped at 100 for safety)

🔥 Real-Time Trending Data

  • Access currently trending TV shows with live viewer counts
  • Get trending movies updated in real-time
  • See what's popular across Trakt's global community of 14+ million users
  • Examples: The White Lotus (2021), Daredevil: Born Again (2025), Black Bag (2025)

🔌 Available Resources

MCP resources provide static data endpoints that AI models can access. These URIs expose Trakt data through a standardized interface.

Show Resources

ResourceDescriptionExample Data
trakt://shows/trendingMost watched shows over the last 24 hoursShow title, year, watchers count
trakt://shows/popularMost popular shows based on ratingsShow title, year, popular score
trakt://shows/anticipatedMost anticipated shows sorted by list countShow title, year, list count
trakt://shows/favoritedMost favorited showsShow title, year, favorites count
trakt://shows/playedMost played showsShow title, year, play count
trakt://shows/watchedMost watched shows by unique usersShow title, year, watcher count

Movie Resources

ResourceDescriptionExample Data
trakt://movies/trendingMost watched movies over the last 24 hoursMovie title, year, watchers count
trakt://movies/popularMost popular movies based on ratingsMovie title, year, popular score
trakt://movies/anticipatedMost anticipated movies sorted by list countMovie title, year, list count
trakt://movies/favoritedMost favorited moviesMovie title, year, favorites count
trakt://movies/playedMost played moviesMovie title, year, play count
trakt://movies/watchedMost watched movies by unique usersMovie title, year, watcher count
trakt://movies/boxofficeTop 10 grossing U.S. box office movies last weekendMovie title, year, revenue

User Resources

ResourceDescriptionExample Data
trakt://user/auth/statusCurrent authentication statusAuthentication status, token expiry
trakt://user/watched/showsShows watched by the authenticated userShow title, year, last watched date, play count
trakt://user/watched/moviesMovies watched by the authenticated userMovie title, year, last watched date, play count

🛠️ Available Tools

MCP tools are interactive functions that AI models can call with parameters. Use these to fetch, search, and manage Trakt data.

python
# Get trending shows: auto-paginate up to 10 results
fetch_trending_shows(limit=10)

# Get trending shows: fetch ALL results (no limit)
fetch_trending_shows(limit=0)

# Get trending shows: single page with pagination metadata
fetch_trending_shows(limit=10, page=1)

# Get popular shows with optional limit parameter
fetch_popular_shows(limit=10)

# Get anticipated shows with optional limit parameter
fetch_anticipated_shows(limit=10)

# Get favorited shows with optional limit and period parameters
fetch_favorited_shows(limit=10, period="weekly")

# Get most played shows with optional limit and period parameters
fetch_played_shows(limit=10, period="weekly")

# Get most watched shows with optional limit and period parameters
fetch_watched_shows(limit=10, period="weekly")

# Search for shows: auto-paginate all results (omit page parameter)
search_shows(query="Breaking Bad", limit=5)

# Search for shows: single page with pagination metadata
search_shows(query="Breaking Bad", limit=5, page=1)

# Get ratings for a show
fetch_show_ratings(show_id="game-of-thrones")

# Get comprehensive show summary (includes air times, production status, ratings, metadata)
fetch_show_summary(show_id="game-of-thrones", extended=True)  # Default: comprehensive

# Get basic show summary (title, year, ID only)
fetch_show_summary(show_id="game-of-thrones", extended=False)

# Get videos for a show (with embedded markdown - default)
fetch_show_videos(show_id="game-of-thrones")

# Get videos for a show (simple text links)
fetch_show_videos(show_id="game-of-thrones", embed_markdown=False)

# Get related shows (similar shows based on genres, themes, and viewer patterns)
fetch_related_shows(show_id="game-of-thrones", limit=10)

# Get related shows with pagination metadata
fetch_related_shows(show_id="game-of-thrones", limit=10, page=1)

# Get all seasons for a show (includes episode counts, aired episodes, ratings)
fetch_show_seasons(show_id="game-of-thrones")

# Get cast and crew for a show
fetch_show_people(show_id="breaking-bad")

# Get cast, crew, and guest stars for a show
fetch_show_people(show_id="breaking-bad", include_guest_stars=True)

# Search for movies: auto-paginate all results (omit page parameter)
search_movies(query="The Godfather", limit=5)

# Search for movies: single page with pagination metadata
search_movies(query="The Godfather", limit=5, page=1)
python
# Get detailed info about a specific season
fetch_season_info(show_id="breaking-bad", season=1)

# Get all episodes for a season with ratings and runtime
fetch_season_episodes(show_id="breaking-bad", season=1)

# Get ratings and voting distribution for a season
fetch_season_ratings(show_id="breaking-bad", season=1)

# Get engagement stats (watchers, plays, collectors)
fetch_season_stats(show_id="breaking-bad", season=1)

# Get cast and crew for a season
fetch_season_people(show_id="breaking-bad", season=1)

# Get videos/trailers for a season (with embedded markdown - default)
fetch_season_videos(show_id="breaking-bad", season=1)

# Get videos for a season (simple text links)
fetch_season_videos(show_id="breaking-bad", season=1, embed_markdown=False)

# See who's watching a season right now
fetch_season_watching(show_id="breaking-bad", season=1)

# Get translations for a season (all languages)
fetch_season_translations(show_id="breaking-bad", season=1)

# Get translations for a specific language
fetch_season_translations(show_id="breaking-bad", season=1, language="es")

# Get lists containing a season
fetch_season_lists(show_id="breaking-bad", season=1)

# Get lists with type and sort filters
fetch_season_lists(show_id="breaking-bad", season=1, list_type="personal", sort="popular")
python
# Get detailed info about a specific episode
fetch_episode_summary(show_id="breaking-bad", season=1, episode=1)

# Get ratings and voting distribution for an episode
fetch_episode_ratings(show_id="breaking-bad", season=1, episode=1)

# Get engagement stats (watchers, plays, collectors)
fetch_episode_stats(show_id="breaking-bad", season=1, episode=1)

# Get cast and crew for an episode
fetch_episode_people(show_id="breaking-bad", season=1, episode=1)

# Get videos/trailers for an episode (with embedded markdown - default)
fetch_episode_videos(show_id="breaking-bad", season=1, episode=1)

# Get videos for an episode (simple text links)
fetch_episode_videos(show_id="breaking-bad", season=1, episode=1, embed_markdown=False)

# See who's watching an episode right now
fetch_episode_watching(show_id="breaking-bad", season=1, episode=1)

# Get translations for an episode (all languages)
fetch_episode_translations(show_id="breaking-bad", season=1, episode=1)

# Get translations for a specific language
fetch_episode_translations(show_id="breaking-bad", season=1, episode=1, language="es")

# Get lists containing an episode
fetch_episode_lists(show_id="breaking-bad", season=1, episode=1)

# Get lists with type and sort filters
fetch_episode_lists(show_id="breaking-bad", season=1, episode=1, list_type="personal", sort="popular")
python
# Get trending movies: auto-paginate all results (omit page parameter)
fetch_trending_movies(limit=10)

# Get trending movies: single page with pagination metadata
fetch_trending_movies(limit=10, page=1)

# Get popular movies with optional limit parameter
fetch_popular_movies(limit=10)

# Get anticipated movies with optional limit parameter
fetch_anticipated_movies(limit=10)

# Get favorited movies with optional limit and period parameters
fetch_favorited_movies(limit=10, period="weekly")

# Get most played movies with optional limit and period parameters
fetch_played_movies(limit=10, period="weekly")

# Get most watched movies with optional limit and period parameters
fetch_watched_movies(limit=10, period="weekly")

# Get the top 10 U.S. box office movies from last weekend
fetch_boxoffice_movies()

# Get ratings for a movie
fetch_movie_ratings(movie_id="tron-legacy-2010")

# Get comprehensive movie summary (includes production status, ratings, genres, runtime, certification, metadata)
fetch_movie_summary(movie_id="tron-legacy-2010", extended=True)  # Default: comprehensive

# Get basic movie summary (title, year, ID only)
fetch_movie_summary(movie_id="tron-legacy-2010", extended=False)

# Get videos for a movie (with embedded markdown - default)
fetch_movie_videos(movie_id="tron-legacy-2010")

# Get videos for a movie (simple text links)
fetch_movie_videos(movie_id="tron-legacy-2010", embed_markdown=False)

# Get related movies (similar movies based on genres, themes, and viewer patterns)
fetch_related_movies(movie_id="tron-legacy-2010", limit=10)

# Get related movies with pagination metadata
fetch_related_movies(movie_id="tron-legacy-2010", limit=10, page=1)

# Get cast and crew for a movie
fetch_movie_people(movie_id="the-dark-knight-2008")
python
# Get extended person details (biography, social media, birthday)
fetch_person_summary(person_id="bryan-cranston")

# Get basic person details (name and IDs only)
fetch_person_summary(person_id="bryan-cranston", extended=False)

# Look up by IMDB ID
fetch_person_summary(person_id="nm0186505")

# Get all movie credits for a person (cast roles and crew positions)
fetch_person_movies(person_id="bryan-cranston")

# Get all show credits for a person (with episode counts and series regular flags)
fetch_person_shows(person_id="bryan-cranston")

# Get lists containing a person (all types, sorted by popularity)
fetch_person_lists(person_id="bryan-cranston")

# Get lists with type and sort filters
fetch_person_lists(person_id="bryan-cranston", list_type="personal", sort="likes")
python
# Start the device authorization flow with Trakt
start_device_auth()

# Check the status of an ongoing authentication
check_auth_status()

# Clear authentication (logout)
clear_auth()

# Fetch shows watched by the authenticated user
fetch_user_watched_shows(limit=0)  # 0 for all shows

# Fetch movies watched by the authenticated user
fetch_user_watched_movies(limit=0)  # 0 for all movies

# Fetch user's personal ratings with pagination support
fetch_user_ratings(rating_type="movies", rating=10, page=1)

# Add new ratings for movies, shows, seasons, or episodes
add_user_ratings(rating_type="movies", items=[{"trakt_id": "314", "rating": 9}])

# Remove existing ratings by ID
remove_user_ratings(rating_type="movies", items=[{"trakt_id": "314"}])

# Fetch user's watchlist with pagination and sorting
fetch_user_watchlist(watchlist_type="all", sort_by="rank", sort_how="asc", page=1)

# Add items to watchlist with optional notes (VIP)
add_user_watchlist(watchlist_type="movies", items=[{"trakt_id": "314", "notes": "Must watch!"}])

# Remove items from watchlist
remove_user_watchlist(watchlist_type="movies", items=[{"trakt_id": "314"}])
python
# Method 1: Check in using show ID (recommended when precision is important)
# First use search_shows to find the correct show ID
search_shows(query="Breaking Bad", limit=5)
# Then use the ID for check-in
checkin_to_show(
    season=1,
    episode=3,
    show_id="1388",
    message="Loving this show!"
)

# Method 2: Check in using show title (more convenient)
checkin_to_show(
    season=1,
    episode=1,
    show_title="Breaking Bad",
    show_year=2008,  # Optional but helps with accuracy
    message="I'm the one who knocks!"
)
python
# Get comments for a movie: auto-paginate all results (omit page parameter)
fetch_movie_comments(movie_id="123", limit=10, show_spoilers=False)

# Get comments for a movie: single page with pagination metadata
fetch_movie_comments(movie_id="123", limit=10, show_spoilers=False, page=1)

# Get comments for a show: auto-paginate all results (omit page parameter)
fetch_show_comments(show_id="456", limit=10, show_spoilers=False, sort="likes")

# Get comments for a show: single page with pagination metadata
fetch_show_comments(show_id="456", limit=10, show_spoilers=False, sort="likes", page=1)

# Get comments for a specific season sorted by most liked
fetch_season_comments(show_id="456", season=1, limit=10, show_spoilers=False, sort="likes")

# Get comments for a specific episode sorted by most replies
fetch_episode_comments(show_id="456", season=1, episode=3, limit=10, show_spoilers=False, sort="replies")

# Get a specific comment
fetch_comment(comment_id="789", show_spoilers=False)

# Get a comment with its replies
fetch_comment_replies(comment_id="789", limit=10, show_spoilers=False)
python
# Get personalized movie recommendations (requires authentication)
fetch_movie_recommendations(limit=10)

# Include movies you've already collected or watchlisted
fetch_movie_recommendations(limit=10, ignore_collected=False, ignore_watchlisted=False)

# Get personalized show recommendations
fetch_show_recommendations(limit=10)

# Hide a movie from future recommendations
hide_movie_recommendation(movie_id="tron-legacy-2010")

# Hide a show from future recommendations
hide_show_recommendation(show_id="breaking-bad")

# Unhide a previously-hidden movie
unhide_movie_recommendation(movie_id="tron-legacy-2010")

# Unhide a previously-hidden show
unhide_show_recommendation(show_id="breaking-bad")
python
# Get watched progress for a TV show
fetch_show_progress(show_id="breaking-bad")

# Get show progress with specials and hidden seasons included
fetch_show_progress(
    show_id="game-of-thrones",
    hidden=True,       # Include hidden seasons
    specials=True,     # Include season 0 (specials)
    count_specials=True,  # Count specials in overall stats
    last_activity="watched"  # Calculate next episode based on watched order
)

# Get detailed episode-by-episode progress with watch dates
fetch_show_progress(show_id="breaking-bad", verbose=True)

# Get paused playback progress (all types)
fetch_playback_progress()

# Get paused playback progress (movies only)
fetch_playback_progress(playback_type="movies")

# Get paused playback progress (episodes only)
fetch_playback_progress(playback_type="episodes")

# Remove a paused playback item (get ID from fetch_playback_progress)
remove_playback_item(playback_id=12345)

# Check if a movie has been watched (returns watch dates and count)
fetch_history(history_type="movies", item_id="314")  # The Dark Knight

# Check watch history for a show
fetch_history(history_type="shows", item_id="1388")  # Breaking Bad

# Browse all movie watch history
fetch_history(history_type="movies")

# Browse all watch history (all types)
fetch_history()

# Filter history by date range
fetch_history(
    history_type="movies",
    start_at="2024-01-01T00:00:00.000Z",
    end_at="2024-12-31T23:59:59.000Z"
)

# Add movies to watch history
add_to_history(
    history_type="movies",
    items=[{"trakt_id": "314"}]  # The Dark Knight
)

# Add movies with custom watched date
add_to_history(
    history_type="movies",
    items=[{"trakt_id": "314", "watched_at": "2024-01-15T20:30:00.000Z"}]
)

# Add episodes to watch history
add_to_history(
    history_type="episodes",
    items=[{"trakt_id": "62085"}]  # Breaking Bad S01E01
)

# Remove movies from watch history
remove_from_history(
    history_type="movies",
    items=[{"trakt_id": "314"}]
)

# Remove episodes from watch history
remove_from_history(
    history_type="episodes",
    items=[{"trakt_id": "62085"}]
)

📝 Using with Claude

Once installed, Claude can use this MCP server to answer questions about entertainment data. Here are some examples to get you started.

  • "What shows are trending right now?"
  • "Show me the shows I've watched" (requires authentication)
  • "What's the rating for Game of Thrones?"

Public Data (No Authentication Required):

  • "What are the most anticipated shows right now?"
  • "Show me the most anticipated upcoming movies"
  • "What movies are at the box office this weekend?"
  • "Show me the top-grossing movies right now"
  • "Can you recommend some popular movies this week?"
  • "What are the most watched shows of the month?"
  • "Search for shows like 'Breaking Bad'"
  • "Search for movies like 'The Godfather'"
  • "Show me comments for Breaking Bad"
  • "What are people saying about The Godfather movie?"
  • "Show me comments for Season 1 of Stranger Things"
  • "Get comments for Season 2 Episode 5 of Game of Thrones"
  • "Show me comment #12345 with its replies"
  • "Show me comments for Breaking Bad but include spoilers"
  • "Show me the most liked comments for Breaking Bad"
  • "Get the most liked comments for The Godfather movie"
  • "Show me the comments with most replies for Season 1 of Stranger Things"
  • "Show me the rating distribution for The Godfather"
  • "How highly rated is Breaking Bad?"
  • "Show me trailers for TRON: Legacy"
  • "Get videos for Game of Thrones"
  • "What trailers are available for The Godfather?"
  • "Get a detailed summary of Breaking Bad"
  • "Show me details about The Godfather movie"
  • "Give me basic info for Game of Thrones"
  • "Show me shows similar to Breaking Bad"
  • "What movies are related to TRON: Legacy?"
  • "Find shows like Game of Thrones"
  • "Tell me about Season 1 of Breaking Bad"
  • "What episodes are in Season 2 of Game of Thrones?"
  • "How is Season 5 of Breaking Bad rated?"
  • "Who starred in Season 1 of Game of Thrones?"
  • "How popular is Season 1 of Breaking Bad?"
  • "Are there any trailers for Season 2 of Stranger Things?"
  • "Who's watching Season 1 of Breaking Bad right now?"
  • "Get Spanish translations for Season 1 of Breaking Bad"
  • "What lists contain Season 1 of Breaking Bad?"
  • "Tell me about the pilot episode of Breaking Bad"
  • "How is Season 1 Episode 1 of Game of Thrones rated?"
  • "Who starred in the first episode of Breaking Bad?"
  • "How popular is Season 5 Episode 16 of Breaking Bad?"
  • "Are there any trailers for Season 1 Episode 1 of Stranger Things?"
  • "Who's watching Season 1 Episode 1 of Breaking Bad right now?"
  • "Get Spanish translations for Season 1 Episode 1 of Breaking Bad"
  • "What lists contain Season 1 Episode 1 of Breaking Bad?"
  • "Who stars in The Dark Knight?"
  • "Show me the cast and crew of Breaking Bad"
  • "Show me the guest stars for Breaking Bad"
  • "Tell me about Bryan Cranston"
  • "What movies has Bryan Cranston been in?"
  • "What TV shows has Bryan Cranston appeared in?"
  • "What lists feature Bryan Cranston?"

Personal Data (Requires Authentication):

  • "What was the last show I watched?"
  • "Show me the movies I've watched"
  • "What was the last movie I watched?"
  • "Have I seen The Dark Knight?"
  • "Have I watched Inception?"
  • "When did I watch The Matrix?"
  • "Show me my 10/10 rated movies"
  • "Add a 9/10 rating for Breaking Bad"
  • "Show me my watchlist"
  • "What movies are on my watchlist?"
  • "Add The Godfather to my watchlist"
  • "Add Breaking Bad to my watchlist with a note" (VIP)
  • "Remove The Dark Knight from my watchlist"
  • "Show me my watchlist sorted by when I added them"
  • "Check me in to Season 2 Episode 5 of Breaking Bad"
  • "Check me in to Season 1 Episode 3 of show ID 1388"
  • "What's my progress on Breaking Bad?"
  • "How far am I through Game of Thrones?"
  • "What's my next episode of Stranger Things?"
  • "Show me any paused movies or episodes"
  • "Clear my paused playback for that movie"
  • "Mark The Dark Knight as watched"
  • "Add Breaking Bad Season 1 to my watch history"
  • "Remove Inception from my watch history"

👤 Personal Data Access

With authentication, you can access:

  • Your complete watched show and movie history
  • Last watched dates for each show and movie
  • Number of times you've watched each show and movie
  • Check in to shows you're currently watching and track your progress
  • Personal viewing statistics
  • Your complete watchlist with filtering and sorting options
  • Add and remove items from your watchlist
  • Add personal notes to watchlist items (VIP feature)
  • Show progress tracking: See how far you are through any TV show, with next episode recommendations
  • Playback progress: View and clear any movies or episodes you paused mid-watch
  • Watch history management: Add or remove items from your watch history with optional timestamps

All data is fetched directly from your Trakt account in real-time.

🔐 Authentication

The server uses Trakt's device authentication flow:

  1. When you request user-specific data, the server will automatically initiate authentication if needed
  2. You'll receive a code and a URL to visit on your browser
  3. After entering the code on the Trakt website and authorizing the app, inform Claude that you've completed the authorization
  4. Claude will check the authentication status and then fetch your personal data
  5. Your authentication token is stored securely in ~/.trakt-mcp/auth_token.json for future requests, with 0o600 permissions. Override the location with the TRAKT_AUTH_TOKEN_PATH env var; Docker images set it to /data/auth_token.json — mount a volume at /data (e.g. -v trakt_auth:/data) to persist auth across container recreations.

You can log out at any time using the clear_auth tool.

🐳 Docker Deployment

Two Docker images are available with different transport mechanisms. Each release also publishes a versioned tag (e.g. :0.9.0, :0.9.0-stdio) for pinning.

Image TagTransportUse Case
:latestSSE (HTTP)Remote access, web clients, docker-compose
:latest-stdiostdioMCPhub, Claude Desktop, local MCP clients
:stdiostdioDeprecated alias for :latest-stdio — will be removed at v1.0.0

stdio Transport (MCPhub, Claude Desktop)

Use the :latest-stdio image (or pin a version like :0.9.0-stdio) for MCP clients that communicate via stdin/stdout:

bash
# Pull and run the stdio image
docker run -i --rm --name trakt_mcpserver_stdio \
  -e TRAKT_CLIENT_ID=your_client_id \
  -e TRAKT_CLIENT_SECRET=your_client_secret \
  -v trakt_auth:/data \
  ghcr.io/wwiens/trakt_mcpserver:latest-stdio

Claude Desktop configuration:

json
{
  "mcpServers": {
    "trakt": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "--name", "trakt_mcpserver_stdio",
        "-e", "TRAKT_CLIENT_ID=your_client_id",
        "-e", "TRAKT_CLIENT_SECRET=your_client_secret",
        "-v", "trakt_auth:/data",
        "ghcr.io/wwiens/trakt_mcpserver:latest-stdio"
      ]
    }
  }
}

SSE Transport (HTTP/Remote)

Use the :latest image for HTTP-based access:

bash
# Option 1: Pull and run from GHCR (recommended)
docker run -d --rm --name trakt_mcpserver \
  -e TRAKT_CLIENT_ID=your_client_id \
  -e TRAKT_CLIENT_SECRET=your_client_secret \
  -v trakt_auth:/data \
  -p 8080:8080 \
  ghcr.io/wwiens/trakt_mcpserver:latest

# Option 2: Build locally and run
docker build -t trakt_mcpserver .
docker run -d --rm --name trakt_mcpserver \
  -e TRAKT_CLIENT_ID=your_client_id \
  -e TRAKT_CLIENT_SECRET=your_client_secret \
  -v trakt_auth:/data \
  -p 8080:8080 \
  trakt_mcpserver

Using docker compose

bash
# Builds the docker image using the default Dockerfile (SSE variant) and starts the service
docker compose up

This runs the server on http://localhost:8080 and proxies MCP requests over SSE (HTTP transport).

🧪 Development & Testing

For developers working with or extending this MCP server, here are testing tools and development workflows.

🚀 AI-Powered Development Experience

This project was built using AI-assisted development tools:

  • Cursor - AI-powered code editor for rapid development
  • Aider - AI pair programming tool for code collaboration
  • Claude Code - Claude's dedicated coding interface

Testing with MCP Inspector

Validate your MCP server implementation and explore available tools, resources, and prompts.

bash
# List available tools
npx @modelcontextprotocol/inspector --cli python server.py --method tools/list

# List available resources
npx @modelcontextprotocol/inspector --cli python server.py --method resources/list

# List available prompts
npx @modelcontextprotocol/inspector --cli python server.py --method prompts/list

Running Tests

Ensure code quality with pytest, type checking, and linting before making changes.

bash
# Create a virtual environment, then install the project (editable) and test dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
pip install -r requirements-dev.txt

# Run all tests
pytest

# Run with verbose output
pytest -v -s

# Type checking
pyright

# Code linting and formatting with ruff
ruff check --fix    # Auto-fix issues
ruff format         # Format code

📄 License

MIT License


Cài đặt

TypingMind
{
  "mcpServers": {
    "trakt-mcpserver": {
      "command": "python3",
      "args": [
        "path/to/your/main.py"
      ]
    }
  }
}

Dùng MCP MCP Trakt với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối MCP Trakt, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm MCP Trakt làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của MCP Trakt.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "trakt-mcpserver": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của MCP Trakt, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của MCP Trakt.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng MCP Trakt giúp tôi làm việc này không?
MCP Trakt
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng MCP Trakt.

Câu hỏi thường gặp

Máy chủ MCP MCP Trakt dùng để làm gì?

MCP Trakt là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP MCP Trakt với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng MCP Trakt với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP MCP Trakt với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối MCP Trakt, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP MCP Trakt với TypingMind?

MCP Trakt hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP MCP Trakt cung cấp những công cụ nào trong TypingMind?

MCP Trakt cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP MCP Trakt không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu MCP Trakt yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇