mcp-trakt

๐Ÿ” Authentication

Set up Trakt OAuth via the device flow โ€” tokens are saved to the macOS Keychain, never to config files.

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 the macOS Keychain โ€” 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

๐Ÿ›ก๏ธ Security best practices

  • Credentials are stored in the macOS Keychain โ€” never in plain files or config
  • 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

On this page