loading…
Search for a command to run...
loading…
Enables querying, searching, and controlling Kodi media center libraries and playback remotely, including smart episode tracking and targeted library scanning.
Enables querying, searching, and controlling Kodi media center libraries and playback remotely, including smart episode tracking and targeted library scanning.
A Model Context Protocol (MCP) server for interacting with Kodi media center. This server provides tools for querying media libraries, checking existing content, playing media, and managing Kodi remotely.
git clone https://github.com/v-odoo-testing/kodi-mcp-server.git
cd kodi-mcp-server
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
python test_connection.py --host 192.168.1.71 --username kodi --password kodi
Configure the server using environment variables:
export KODI_HOST="192.168.1.71"
export KODI_PORT="8080"
export KODI_USERNAME="kodi"
export KODI_PASSWORD="kodi"
export KODI_TIMEOUT="30"
export USE_HTTPS="false"
export SOCKS5_HOST="localhost"
export SOCKS5_PORT="1080"
export SOCKS5_USERNAME="" # Optional
export SOCKS5_PASSWORD="" # Optional
Add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"kodi": {
"command": "/path/to/kodi-mcp-server/venv/bin/python",
"args": ["/path/to/kodi-mcp-server/src/server.py"],
"env": {
"KODI_HOST": "192.168.1.71",
"KODI_PORT": "8080",
"KODI_USERNAME": "kodi",
"KODI_PASSWORD": "kodi",
"KODI_TIMEOUT": "30",
"USE_HTTPS": "false",
"SOCKS5_HOST": "",
"SOCKS5_PORT": "1080",
"SOCKS5_USERNAME": "",
"SOCKS5_PASSWORD": ""
}
}
}
}
search_movies - Search movies by title, year, or genresearch_tv_shows - Search TV shows by title or genrecheck_movie_exists - Quick check if a movie existscheck_tv_show_exists - Check TV show/season/episode availabilityplay_movie - Play a movie by titleplay_episode - Play a specific TV episodeplay_next_unwatched - NEW v1.2.0 - Find and play the next unwatched episode automaticallycontrol_playback - Pause, stop, or get playback statusget_library_stats - Get library overview and statisticsget_recently_added - List recently added contentupdate_library - Trigger library scan (full library)scan_tv_show - NEW v1.2.0 - Scan specific TV show directory only (fast, targeted)get_episode_details - NEW v1.2.0 - Get detailed episode information with file pathsAll tools support the use_socks5 parameter for remote access.
For remote Kodi access through SSH:
ssh -D 1080 -N user@remote-server
export SOCKS5_HOST="localhost"
export SOCKS5_PORT="1080"
User: "Search my remote Kodi for movies, use SOCKS5"
Assistant: Uses search_movies with use_socks5=true
| Variable | Default | Description |
|---|---|---|
KODI_HOST |
192.168.1.71 |
Kodi server IP address |
KODI_PORT |
8080 |
Kodi web interface port |
KODI_USERNAME |
kodi |
Authentication username |
KODI_PASSWORD |
kodi |
Authentication password |
KODI_TIMEOUT |
30 |
Request timeout in seconds |
USE_HTTPS |
false |
Use HTTPS connection |
SOCKS5_HOST |
- | SOCKS5 proxy host |
SOCKS5_PORT |
1080 |
SOCKS5 proxy port |
SOCKS5_USERNAME |
- | SOCKS5 proxy username (optional) |
SOCKS5_PASSWORD |
- | SOCKS5 proxy password (optional) |
{
"title": "Movie title to search for",
"year": 2023,
"genre": "Action",
"use_socks5": false
}
{
"title": "The Matrix",
"year": 1999,
"use_socks5": false
}
{
"show_title": "Breaking Bad",
"season": 1,
"episode": 1,
"use_socks5": false
}
{
"show_title": "Murderbot",
"use_socks5": false
}
{
"show_title": "Breaking Bad",
"use_socks5": false
}
{
"show_title": "Breaking Bad",
"season": 1,
"episode": 1,
"use_socks5": false
}
{
"action": "pause|stop|status",
"use_socks5": false
}
Scan specific show for new episodes and play next unwatched:
User: "Scan the Murderbot TV show directory for new episodes and play the last one that I have not watched"
Workflow:
1. Uses kodi:scan_tv_show("Murderbot") → Scans only Murderbot directory (fast)
2. Uses kodi:play_next_unwatched("Murderbot") → Finds S01E03 was last watched, plays S01E04
Get detailed episode information:
User: "Get details for Murderbot S1E4"
Assistant: Uses kodi:get_episode_details → Shows file path, rating, plot, episode ID
Check if content exists:
User: "Do I have Inception (2010) in my Kodi library?"
Assistant: Uses kodi:check_movie_exists → "✅ Inception (2010) found in library!"
Search for content:
User: "Show me all action movies from 2022"
Assistant: Uses kodi:search_movies → Lists matching movies with details
Play specific content:
User: "Play The Matrix"
Assistant: Uses kodi:play_movie → "🎬 Started playing The Matrix (1999)"
User: "Play Breaking Bad S1E1"
Assistant: Uses kodi:play_episode → "📺 Started playing Breaking Bad S01E01: Pilot"
Smart unwatched playback:
User: "Play the next episode of Murderbot I haven't seen"
Assistant: Uses kodi:play_next_unwatched → Detects watch status, plays next episode
Targeted scanning (no more full library scans!):
User: "Scan just the Murderbot folder for new episodes"
Assistant: Uses kodi:scan_tv_show → Scans only that show's directory
Get library information:
User: "How many movies do I have?"
Assistant: Uses kodi:get_library_stats → Shows totals and top genres
User: "What did I add recently?"
Assistant: Uses kodi:get_recently_added → Lists recent additions with dates
User: "Check for new Murderbot episodes and play where I left off"
Workflow:
1. kodi:scan_tv_show("Murderbot") → Fast targeted scan
2. kodi:play_next_unwatched("Murderbot") → Plays next unwatched episode
python test_connection.py
curl http://192.168.1.71:8080/jsonrpc -d '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1}'
python test_connection.py --socks5 socks5://localhost:1080
"Cannot connect to Kodi"
"Authentication failed"
"SOCKS5 proxy connection failed"
curl --socks5 localhost:1080 http://example.comEnsure Kodi has the following enabled:
Web Interface:
kodikodiNetwork Access:
8080kodi-mcp-server/
├── src/
│ └── server.py # Main MCP server
├── requirements.txt # Dependencies
├── test_connection.py # Connection testing
├── claude-desktop-config.json # Claude integration
├── README.md # This file
├── CHANGELOG.md # Development log
└── .gitignore # Git ignore rules
MIT License - see LICENSE file for details.
For issues and questions:
test_connection.pyRun in your terminal:
claude mcp add kodi-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.