MCP Hub
Back to servers

Trakt MCP Server

A comprehensive MCP server with 36 tools for tracking TV shows and movies, managing watchlists, and syncing ratings with Trakt.tv. It enables users to search extensive databases, check into current viewings, and receive personalized recommendations through natural language commands.

glama
Updated
Mar 15, 2026
████████╗██████╗  █████╗ ██╗  ██╗████████╗
╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔╝╚══██╔══╝
   ██║   ██████╔╝███████║█████╔╝    ██║
   ██║   ██╔══██╗██╔══██║██╔═██╗    ██║
   ██║   ██║  ██║██║  ██║██║  ██╗   ██║
   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝  ╚═╝

TypeScript Node.js MCP npm License

A Trakt MCP server with 36 tools for TV show and movie tracking, sync, ratings, watchlists, and checkins.

FeaturesQuick StartInstallationToolsDevelopment


Features

  • 🔍 Search movies, shows, episodes, and people across Trakt's database
  • 🎬 Movies — details, trending, popular, related, ratings, and cast
  • 📺 Shows & Episodes — full show info, seasons, episode details, cast
  • 👤 People — actor/director profiles and filmographies
  • 📅 Calendar — your personalised upcoming episodes and movies
  • 🕐 History — view, add, and remove watch history entries
  • Ratings — get, add, and remove ratings for movies, shows, and episodes
  • 📋 Watchlist — full CRUD on your movie/show watchlist
  • Checkin — check into what you're watching right now
  • 🤖 Recommendations — personalised movie and show suggestions

Quick Start

1. Create a Trakt API app

Go to trakt.tv/oauth/applications/new and create a new app. You only need to fill in the name — leave the redirect URI as urn:ietf:wg:oauth:2.0:oob. Copy your Client ID and Client Secret.

2. Run setup

npx @kud/mcp-trakt setup

This launches the device OAuth flow: paste your Client ID and Secret when prompted, visit the URL shown, enter the code, and your credentials are saved to ~/.config/trakt.json. You never touch them again.

3. Add to your MCP client

No credentials needed in the config — the server reads them from ~/.config/trakt.json automatically.

{
  "mcpServers": {
    "Trakt": {
      "command": "npx",
      "args": ["-y", "@kud/mcp-trakt@latest"]
    }
  }
}

Installation

Run npx @kud/mcp-trakt setup first — this saves your credentials to ~/.config/trakt.json so no tokens are needed in any config file.

Claude Code CLI
claude mcp add trakt npx -- -y @kud/mcp-trakt@latest
Claude Desktop — macOS

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "Trakt": {
      "command": "npx",
      "args": ["-y", "@kud/mcp-trakt@latest"]
    }
  }
}

Restart Claude Desktop after saving.

Claude Desktop — Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "Trakt": {
      "command": "npx",
      "args": ["-y", "@kud/mcp-trakt@latest"]
    }
  }
}
Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "Trakt": {
      "command": "npx",
      "args": ["-y", "@kud/mcp-trakt@latest"]
    }
  }
}
Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "Trakt": {
      "command": "npx",
      "args": ["-y", "@kud/mcp-trakt@latest"]
    }
  }
}
VSCode

Add to .vscode/mcp.json:

{
  "servers": {
    "Trakt": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@kud/mcp-trakt@latest"]
    }
  }
}

Available Tools

Search

ToolDescription
searchSearch for movies, shows, episodes, people, or lists

Movies

ToolDescription
get_movieGet detailed information about a movie
get_trending_moviesMovies currently being watched across Trakt
get_popular_moviesMost popular movies on Trakt
get_movie_ratingsCommunity rating distribution for a movie
get_movie_relatedMovies related to a given movie
get_movie_peopleCast and crew for a movie

Shows

ToolDescription
get_showGet detailed information about a TV show
get_trending_showsShows currently being watched across Trakt
get_popular_showsMost popular TV shows on Trakt
get_show_ratingsCommunity rating distribution for a show
get_show_seasonsAll seasons, optionally with full episode details
get_show_peopleCast and crew for a show

Episodes

ToolDescription
get_season_episodesAll episodes in a specific season
get_episodeFull details for a specific episode

People

ToolDescription
get_personActor or director profile
get_person_creditsMovie or show credits for a person

Calendar

ToolDescription
get_my_show_calendarMy upcoming episodes (personalised)
get_my_movie_calendarMy upcoming movies (personalised)
get_all_show_calendarAll shows premiering and airing across Trakt

History

ToolDescription
get_historyWatch history for the authenticated user
add_to_historyMark movies or episodes as watched
remove_from_historyRemove entries from watch history

Ratings

ToolDescription
get_ratingsRatings given by the authenticated user
add_ratingRate movies, shows, seasons, or episodes (1–10)
remove_ratingRemove ratings from items

Watchlist

ToolDescription
get_watchlistView the authenticated user's watchlist
add_to_watchlistAdd movies, shows, or episodes
remove_from_watchlistRemove items from the watchlist

Checkin

ToolDescription
checkinCheck in to a movie or episode you're watching now
delete_checkinCancel the current active checkin

Recommendations

ToolDescription
get_movie_recommendationsPersonalised movie recommendations
get_show_recommendationsPersonalised TV show recommendations

User

ToolDescription
get_user_profileProfile info for any user (or yourself)
get_user_statsWatch statistics for a user
get_user_watchingWhat a user is currently watching

Total: 36 Tools


Example Conversations

"What movies are trending on Trakt right now?"

"Search for Breaking Bad and give me its full details."

"What episodes of Severance do I have coming up this week?"

"Mark that I just watched Dune: Part Two — give it a 9."

"Add The Penguin to my watchlist."

"Check me in to S02E01 of The Bear."

"What have I watched this month?"

"Give me 10 personalised movie recommendations."

"Who plays the lead in Succession and what else have they been in?"

"What are my all-time watch stats?"


Development

Project Structure

mcp-trakt/
├── src/
│   └── index.ts       # Full server — all 36 tools
├── dist/              # Compiled output (git-ignored)
├── setup.js           # OAuth device flow setup script
├── package.json
└── tsconfig.json

Scripts

ScriptPurpose
npm run setupRun OAuth device flow and save credentials
npm run buildCompile TypeScript to dist/
npm run build:watchWatch mode compilation
npm run devRun directly with tsx (no build needed)
npm run inspectOpen MCP Inspector against built output
npm run inspect:devOpen MCP Inspector with live tsx
npm run typecheckType-check without emitting
npm run cleanRemove dist/

Dev Workflow

# Run without building
npm run dev

# Inspect all tools interactively in the browser
npm run inspect:dev

Authentication

Trakt uses OAuth 2.0. The npm run setup script handles the full device flow — you never manage tokens manually.

How it works

  1. Run npm run setup
  2. Enter your Client ID and Client Secret from trakt.tv/oauth/applications
  3. Visit the URL shown (e.g. https://trakt.tv/activate), enter the displayed code
  4. Tokens are saved to ~/.config/trakt.json — the server reads them automatically on every start

To refresh an expired token, just run npm run setup again.

Test your credentials

curl -s https://api.trakt.tv/users/me \
  -H "trakt-api-version: 2" \
  -H "trakt-api-key: YOUR_CLIENT_ID" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" | jq .username

Troubleshooting

Server not showing in Claude Desktop

  • Check JSON syntax in claude_desktop_config.json
  • Verify the path to dist/index.js is absolute and the file exists
  • Run npm run build if dist/ is missing

401 / auth errors

  • Access tokens expire after 3 months — regenerate via the OAuth device flow
  • Make sure TRAKT_CLIENT_ID matches the app your access token was issued for
  • Check logs: Claude Desktop → Help → Show Logs

No data returned for personal endpoints (history, watchlist, etc.)

  • These require a valid TRAKT_ACCESS_TOKEN — public/read-only client_id alone is not enough
  • Make sure the token was granted the correct scopes during the OAuth flow

Security Best Practices

  • Never commit ~/.config/trakt.json or any file containing tokens to source control
  • ~/.config/trakt.json is user-scoped and never read by MCP client configs
  • Rotate your access token if it is accidentally exposed — run npm run setup again
  • Trakt access tokens expire after 90 days — re-run npm run setup to refresh
  • Treat your access token like a password: full account access with history/checkin write rights

Tech Stack

RuntimeNode.js ≥ 20
LanguageTypeScript 5.x
TargetES2023
ProtocolModel Context Protocol (MCP) SDK 1.x
HTTP ClientNative fetch
Module SystemESM ("type": "module")

Contributing

Issues and PRs welcome at github.com/kud/mcp-trakt.

License

MIT © kud

Acknowledgments

Built on the Model Context Protocol SDK by Anthropic. API provided by Trakt.

Support

Open an issue at github.com/kud/mcp-trakt/issues.


Made with ❤️ for TV and movie fans

⭐ Star this repo if it's useful • ↑ Back to top

Reviews

No reviews yet

Sign in to write a review