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.
README
████████╗██████╗ █████╗ ██╗ ██╗████████╗
╚══██╔══╝██╔══██╗██╔══██╗██║ ██╔╝╚══██╔══╝
██║ ██████╔╝███████║█████╔╝ ██║
██║ ██╔══██╗██╔══██║██╔═██╗ ██║
██║ ██║ ██║██║ ██║██║ ██╗ ██║
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝
<div align="center">
A Trakt MCP server with 36 tools for TV show and movie tracking, sync, ratings, watchlists, and checkins.
Features • Quick Start • Installation • Tools • Development
</div>
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.
<details> <summary><strong>Claude Code CLI</strong></summary>
claude mcp add trakt npx -- -y @kud/mcp-trakt@latest
</details>
<details> <summary><strong>Claude Desktop — macOS</strong></summary>
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"Trakt": {
"command": "npx",
"args": ["-y", "@kud/mcp-trakt@latest"]
}
}
}
Restart Claude Desktop after saving.
</details>
<details> <summary><strong>Claude Desktop — Windows</strong></summary>
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"Trakt": {
"command": "npx",
"args": ["-y", "@kud/mcp-trakt@latest"]
}
}
}
</details>
<details> <summary><strong>Cursor</strong></summary>
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"Trakt": {
"command": "npx",
"args": ["-y", "@kud/mcp-trakt@latest"]
}
}
}
</details>
<details> <summary><strong>Windsurf</strong></summary>
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"Trakt": {
"command": "npx",
"args": ["-y", "@kud/mcp-trakt@latest"]
}
}
}
</details>
<details> <summary><strong>VSCode</strong></summary>
Add to .vscode/mcp.json:
{
"servers": {
"Trakt": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@kud/mcp-trakt@latest"]
}
}
}
</details>
Available Tools
Search
| Tool | Description |
|---|---|
search |
Search for movies, shows, episodes, people, or lists |
Movies
| Tool | Description |
|---|---|
get_movie |
Get detailed information about a movie |
get_trending_movies |
Movies currently being watched across Trakt |
get_popular_movies |
Most popular movies on Trakt |
get_movie_ratings |
Community rating distribution for a movie |
get_movie_related |
Movies related to a given movie |
get_movie_people |
Cast and crew for a movie |
Shows
| Tool | Description |
|---|---|
get_show |
Get detailed information about a TV show |
get_trending_shows |
Shows currently being watched across Trakt |
get_popular_shows |
Most popular TV shows on Trakt |
get_show_ratings |
Community rating distribution for a show |
get_show_seasons |
All seasons, optionally with full episode details |
get_show_people |
Cast and crew for a show |
Episodes
| Tool | Description |
|---|---|
get_season_episodes |
All episodes in a specific season |
get_episode |
Full details for a specific episode |
People
| Tool | Description |
|---|---|
get_person |
Actor or director profile |
get_person_credits |
Movie or show credits for a person |
Calendar
| Tool | Description |
|---|---|
get_my_show_calendar |
My upcoming episodes (personalised) |
get_my_movie_calendar |
My upcoming movies (personalised) |
get_all_show_calendar |
All shows premiering and airing across Trakt |
History
| Tool | Description |
|---|---|
get_history |
Watch history for the authenticated user |
add_to_history |
Mark movies or episodes as watched |
remove_from_history |
Remove entries from watch history |
Ratings
| Tool | Description |
|---|---|
get_ratings |
Ratings given by the authenticated user |
add_rating |
Rate movies, shows, seasons, or episodes (1–10) |
remove_rating |
Remove ratings from items |
Watchlist
| Tool | Description |
|---|---|
get_watchlist |
View the authenticated user's watchlist |
add_to_watchlist |
Add movies, shows, or episodes |
remove_from_watchlist |
Remove items from the watchlist |
Checkin
| Tool | Description |
|---|---|
checkin |
Check in to a movie or episode you're watching now |
delete_checkin |
Cancel the current active checkin |
Recommendations
| Tool | Description |
|---|---|
get_movie_recommendations |
Personalised movie recommendations |
get_show_recommendations |
Personalised TV show recommendations |
User
| Tool | Description |
|---|---|
get_user_profile |
Profile info for any user (or yourself) |
get_user_stats |
Watch statistics for a user |
get_user_watching |
What 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
| Script | Purpose |
|---|---|
npm run setup |
Run OAuth device flow and save credentials |
npm run build |
Compile TypeScript to dist/ |
npm run build:watch |
Watch mode compilation |
npm run dev |
Run directly with tsx (no build needed) |
npm run inspect |
Open MCP Inspector against built output |
npm run inspect:dev |
Open MCP Inspector with live tsx |
npm run typecheck |
Type-check without emitting |
npm run clean |
Remove 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
- Run
npm run setup - Enter your Client ID and Client Secret from trakt.tv/oauth/applications
- Visit the URL shown (e.g.
https://trakt.tv/activate), enter the displayed code - 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.jsis absolute and the file exists - Run
npm run buildifdist/is missing
401 / auth errors
- Access tokens expire after 3 months — regenerate via the OAuth device flow
- Make sure
TRAKT_CLIENT_IDmatches 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-onlyclient_idalone is not enough - Make sure the token was granted the correct scopes during the OAuth flow
Security Best Practices
- Never commit
~/.config/trakt.jsonor any file containing tokens to source control ~/.config/trakt.jsonis user-scoped and never read by MCP client configs- Rotate your access token if it is accidentally exposed — run
npm run setupagain - Trakt access tokens expire after 90 days — re-run
npm run setupto refresh - Treat your access token like a password: full account access with history/checkin write rights
Tech Stack
| Runtime | Node.js ≥ 20 |
| Language | TypeScript 5.x |
| Target | ES2023 |
| Protocol | Model Context Protocol (MCP) SDK 1.x |
| HTTP Client | Native fetch |
| Module System | ESM ("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.
<div align="center">
Made with ❤️ for TV and movie fans
⭐ Star this repo if it's useful • ↑ Back to top
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。