trakt-mcp
Integrates with Trakt to manage a user's watchlist and query watch progress, including searching movies and shows, adding/removing watchlist items, checking episode progress, viewing recent history and up-next shows, marking/unmarking watched content, and retrieving lifetime viewing statistics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
trakt-mcp
A lean, self-hosted MCP server that lets your AI assistant manage your Trakt watchlist and answer questions about your watch progress — from Claude on your phone, Claude Code, or any other MCP client.
"I just heard about Severance — put it on my watchlist." "How many episodes of Severance do I have left?"
It is deliberately not a wrapper around all of Trakt's 300+ endpoints. Ten focused tools keep the assistant's context small and its tool choices reliable.
Status: early (0.x), built for personal self-hosting. Provided as-is.
Tools
Tool | What it does |
| Find movies/shows by title (optionally type and year). Returns Trakt IDs. |
| Your watchlist, newest first, with its size and your account's limit. |
| Add movies/shows by Trakt ID. Reports a full watchlist clearly. |
| Remove movies/shows by Trakt ID. |
| Watched / aired / remaining episodes, next episode, per-season breakdown. |
| What you watched most recently (movies and episodes). |
| Shows you are in the middle of, with what is next. |
| Record watched movies, episodes, whole seasons or whole shows (now, a date, the air date, or unknown). |
| Remove all plays of movies, episodes, seasons or shows from the history (undo). |
| Lifetime totals: movies, episodes, hours. |
All tools carry MCP annotations (readOnlyHint, destructiveHint, …) so clients can
ask for confirmation before changes.
Related MCP server: mcp-trakt
How sign-in works
The server is its own OAuth 2.1 authorization server (as the MCP spec requires for remote servers) and delegates the actual login to Trakt using Trakt's device flow: your AI app opens a page that shows a short code, you enter it at https://trakt.tv/activate, and the page continues by itself. The device flow needs no public redirect URL, so a Trakt development app is enough — which is what Trakt hands out to individuals.
Owner passphrase. Every sign-in first asks for a passphrase that only you know (set once with
trakt-mcp set-passphrase). Only after that does the server request a Trakt code. This binds the device flow to the person who started it: nobody can trick you into entering their code at trakt.tv/activate and get anything out of it.Allowlist. Only Trakt users listed in
ALLOWED_TRAKT_USERScan obtain a token.Consent. The first time a client connects, you see a consent page naming it (after signing in with Trakt). Approval is bound to that client and your Trakt account.
PKCE, single-use codes, rotating refresh tokens with replay detection, tokens stored only as SHA-256 hashes, 90-day maximum session. See SECURITY.md and docs/architecture.md.
Setup
1. Create a Trakt app
At https://app.trakt.tv/settings/apps create a Development app:
Redirect URI:
http://localhost:8000/trakt/callback(required by the form; the device flow does not use it, but Trakt expects a registered value on token refresh)JavaScript (CORS) origins: leave empty
Permissions (
/checkin,/scrobble): not needed
Note the Client ID (and the client secret, which is optional). As the app owner you can always sign in; add other people to the app's sign-in list on Trakt if needed.
2. Run it
cp .env.example .env # fill in TRAKT_CLIENT_ID, PUBLIC_URL, ALLOWED_TRAKT_USERS
docker compose -f compose.example.yml up -d --buildPut it behind a TLS-terminating reverse proxy (see compose.example.yml for Caddy).
The container needs no published port, runs as an unprivileged user, works with a
read-only root filesystem and keeps its state in the /data volume (~50 MB RAM).
3. Connect your assistant
Set the owner passphrase once (at least 12 characters; keep it in your password manager):
docker exec -it trakt-mcp trakt-mcp set-passphraseClaude (web, desktop, Android, iOS): Settings → Connectors → Add custom connector, URL
https://<your-host>/mcp, leave client ID/secret empty. Enter your passphrase, enter the code shown at trakt.tv/activate, then approve the consent page. The connector is then available in the mobile apps too. You sign in again after 90 days.Claude Code:
claude mcp add --transport http trakt https://<your-host>/mcpOther MCP clients: add the client's OAuth callback URL to
ALLOWED_REDIRECT_URIS.
Configuration
Variable | Required | Default | Description |
| yes | – | Client ID of your Trakt app |
| no | – | Sent to Trakt's token endpoints if set |
| no |
| A redirect URI registered for your Trakt app (used on token refresh) |
| yes | – | External |
| yes | – | Comma-separated Trakt slugs ( |
| no | Claude + loopback | Comma-separated; trailing |
| no |
| Unapproved clients kept before the oldest are evicted |
| no |
| Lifetime of MCP access tokens |
| no |
| Lifetime of MCP refresh tokens (30 days) |
| no |
| Absolute lifetime of a sign-in (90 days) |
| no | – | Comma-separated networks of your reverse proxy (e.g. |
| no |
| Sign-ins in progress kept before the oldest are evicted |
| no |
| Where the SQLite database lives |
| no |
| Bind address (the image uses |
| no | – | Directory with |
| no |
| Python log level |
Development
uv sync
uv run pytest --cov # tests (against an in-memory fake Trakt)
uv run ruff check src tests && uv run ruff format --check src tests
uv run mypy # strict
uv run bandit -c pyproject.toml -r srcRun locally: create a .env with PUBLIC_URL=http://localhost:8000, HOST=127.0.0.1
and DATA_DIR=./data, then uv run trakt-mcp.
License
MIT for the code.
The Trakt name and logo are trademarks of Trakt, Inc. The logo files in
docs/assets/ are the unmodified downloads from the
Trakt branding guidelines and are used only to refer
to the service this project works with. Per those guidelines the Trakt logo is not
used as this project's own logo or icon. This project is not affiliated with,
sponsored or endorsed by Trakt.
This server cannot be deployed
Maintenance
Related MCP Connectors
Trakt MCP — TV/movie metadata + watch tracking signals
The media memory layer for AI agents and their humans. Your AI client can search your collection, add and log what you've finished, update ratings and lists, and find patterns across everything you've read, watched, played, and listened to.
Track the TV and films you watch, and find more like them, by talking to your own AI.
Connects AI assistants to TrackingTime for querying time entries, projects, tasks, customers, and team data using natural language.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables MCP-compatible AI agents to interact with Trakt.tv, including search, movies, TV shows, and user account features like watchlist and history.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query TV and movie metadata from Trakt, including details, trending, popular content, and watch tracking signals through MCP tools.2 npmMIT
- AlicenseCqualityBmaintenanceEnables reading and writing Trakt data from Claude.ai and Claude Code, covering all 334 API endpoints including shows, movies, lists, calendars, scrobbling, and account sync.33971 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables a single owner to connect ChatGPT to their Trakt account for viewing history, TV progress, recommendations, watchlists, and ratings, with optional tracking actions such as marking watched, adding to watchlist, and saving ratings through an owner-only OAuth gateway.Apache 2.0