
MCP server for Tvheadend DVR, EPG, DVB tuner configuration, networks, muxes, channels, SAT>IP and
MCP server for Tvheadend DVR, EPG, DVB tuner configuration, networks, muxes, channels, SAT>IP and Unicable.
·
English · Deutsch
An MCP server for Tvheadend DVR, EPG and API-exposed DVB configuration. Its 53 tools let an MCP client inspect and configure tuners, networks, muxes, services and channels, including satellite reception with DiSEqC and Unicable/JESS.
The server reads the running Tvheadend instance's classes, field metadata and options instead of maintaining a fixed list of supported tuner models. It uses the official MCP Python SDK 2.x and supports stdio and loopback Streamable HTTP. No AI service or API key is required by this server.
| Area | Capabilities |
|---|---|
| Hardware | Adapter/frontend tree, enabled state, priorities, SAT>IP discovery |
| Satellite | Satconfig, LNB, DiSEqC, rotor and Unicable/JESS fields exposed by the device's child nodes |
| Networks and muxes | Create, inspect, update, assign, scan and delete; use the connected server's schemas |
| Channels | Inspect services, run the native mapper, assign multiple services, manage channel tags and EPG fields |
| DVR and EPG | Search and measure EPG, configure grabbers/schedules, map sources, trigger collection, manage recordings and rules |
| Diagnostics | Server version, signal values, bounded MPEG-TS reception probes, input error deltas and EPG coverage |
| Maintenance | Duplicate/HD-SD audit, reviewed channel merges and DVB network consolidation without object deletion |
| Change control | Field validation, previews, read-only mode, snapshots, expiring plans and guarded rollback |
“API-exposed” is an important boundary: drivers, firmware, physical wiring and operating-system networking are outside this server. Some builds omit classes or endpoints. Development targets Tvheadend 4.3; older versions depend on the API they provide. Missing endpoints produce errors rather than simulated success.
Install uv and use Python 3.11 or newer. Clone the repository for a reproducible setup:
git clone https://github.com/NemoN/tvheadend-mcp.git
cd tvheadend-mcp
git checkout v0.2.0
uv sync --frozen
cp .env.example .envEdit .env locally with the URL and credentials of your own Tvheadend instance.
The example enables TVH_READ_ONLY=true for initial exploration. Change it to
false when you want tools to apply changes. The code default, if this variable
is omitted, is false.
TVH_URL=http://tvheadend.example:9981
TVH_USER=mcp
TVH_PASS=replace-locally
TVH_AUTH=digest
TVH_VERIFY_SSL=true
TVH_TIMEOUT=30
TVH_TIMEZONE=Europe/Berlin
TVH_READ_ONLY=trueThe Tvheadend account needs web-interface access and administrator privileges for DVB administration, plus the appropriate video-recorder permissions for DVR work. Tvheadend continues to enforce these permissions. See configuration.
Check connectivity without changing the configuration:
uv run tvheadend-mcp --checkExit code 0 means all three status endpoints answered successfully; 1 indicates
an API, connection or permission error. Starting without --check runs an MCP
server and waits for a client.
For clients using the common mcpServers JSON format, replace both absolute paths:
{
"mcpServers": {
"tvheadend": {
"command": "uv",
"args": [
"run", "--directory", "/absolute/path/tvheadend-mcp",
"--frozen", "tvheadend-mcp",
"--env-file", "/absolute/path/tvheadend.env"
]
}
}
}The env file can be the checkout's .env or another private file. If a desktop
client cannot find uv, use its full executable path. Clients with a different
configuration format use the same command and arguments in their MCP settings.
See examples.
Alternatively, install directly from the versioned Git source without a checkout:
uvx --from git+https://github.com/NemoN/[email protected] \
tvheadend-mcp --env-file /absolute/path/tvheadend.envThis installation uses Git source; a PyPI package or container-registry image is
not required. For a fully locked environment, use the checkout and uv sync --frozen.
uv run tvheadend-mcp --transport streamable-http --port 8000Connect to http://127.0.0.1:8000/mcp. The HTTP listener accepts only loopback
addresses and has no built-in authentication. For a remote host, use an SSH
tunnel; see configuration.
Inspect my DVB-C and DVB-S/S2 hardware and networks. Show missing assignments and use the actual tuner schemas and options before changing anything.
Find free-to-air TV services, show the proposed channel list and map the services I choose. Prefer HD services and preserve existing channel numbers.
Find the next showing of a programme in my EPG and schedule a recording using my default recording profile.
Follow the DVB setup guide for tuners, Unicable, SAT>IP,
networks, scans, channel mapping and EPG. The same basic workflow is available to
MCP clients as the resource tvheadend://workflow.
See the EPG, reception and maintenance guide for complete workflows and recovery limits. The new tools can measure EPG time coverage and description presence, manage native grabbers, test received media packets, and prepare channel/network cleanup plans that preserve retained channel UUIDs.
A tuner-specific probe temporarily isolates the selected frontend, requires an idle server and no imminent DVR, and records a recovery journal before changing settings. Probes and maintenance execution preview by default.
All tools start with tvh_. The complete reference documents
their arguments and descriptions.
| Group | Tools, without the tvh_ prefix |
|---|---|
| Status and hardware | status, hardware_tree, discover_satip, diagnose_network |
| Schemas and nodes | list_classes, get_schema, get_node, get_field_options, update_node, delete_node, api_read |
| Networks | network_types, list_networks, create_network, assign_networks, scan_networks |
| Muxes | list_muxes, mux_schema, create_mux |
| Services and channels | list_services, map_services, mapper_status, stop_mapper, list_channels, create_channel, assign_services, list_channel_tags, create_channel_tag |
| DVR and EPG | search_epg, list_recordings, schedule_recording, create_timer, recording_action, list_dvr_rules, create_dvr_rule, list_dvr_profiles, create_dvr_profile |
| EPG administration | get_epg_config, update_epg_config, list_epg_modules, update_epg_module, list_epg_sources, assign_epg_sources, trigger_epg_grab, epg_coverage |
| Reception | probe_reception, reception_recoveries |
| Maintenance | audit_channels, plan_channel_merge, plan_network_consolidation, apply_maintenance_plan |
| Snapshots | snapshot, restore_snapshot |
List calls default to 100 entries, EPG searches to 50; the maximum is 1000 per
request. Advance start until total is reached. assign_networks and
assign_services default to adding entries; a general update_node replaces
each supplied array in full.
create_mux.frequency_hz uses Hz and converts DVB-S/S2 to Tvheadend's native kHz.
Native settings.frequency is also supported, but cannot be supplied together
with frequency_hz. Symbol rates use symbols per second.
Write tools accept dry_run=true to preview their endpoint and parameters.
Normally they execute immediately; restore_snapshot, probe_reception and
apply_maintenance_plan preview by default. Maintenance planning never writes to
Tvheadend; applying a plan requires its unexpired ID from the same process.
TVH_READ_ONLY=true blocks writes while allowing reads and previews.
Snapshots contain selected writable settings, excluding password, read-only and write-once fields. They are not complete backups and cannot recreate deleted objects, restore media or recover old hardware child UUIDs. Restoration is non-atomic and reports partial results. Back up the complete Tvheadend configuration directory before structural changes.
Deleting a network can also delete its muxes and services. DVR stop, cancel
and remove_files have different meanings: remove_files permanently deletes
recording files. Consult the security and trust model.
docker build -t tvheadend-mcp .
docker run --rm -i --env-file .env tvheadend-mcpUse -i without -t for stdio. TVH_URL must resolve and be reachable from the
container; localhost inside the container refers to that container. The image
runs as an unprivileged user and installs hashed runtime dependencies from
requirements.lock. No prebuilt container image is currently published. For tuner-isolation probes,
mount a persistent state folder writable by UID 65534 and set TVH_STATE_DIR to
that folder inside the container (for example /state).
uv sync --frozen
uv run pytest -q
uv run ruff check src tests scripts
uv run ruff format --check src tests scripts
uv build
uv run python scripts/check_artifacts.py dist/*Tests use mocked Tvheadend HTTP responses and a real MCP stdio subprocess; they do not require access to a live tuner. CI runs them on Python 3.11–3.14, checks formatting and package contents, and builds the Docker image. See CONTRIBUTING.md and CHANGELOG.md.
MIT licensed. Independent project; not affiliated with Tvheadend or a tuner manufacturer. Report reproducible problems through GitHub Issues without credentials or configuration backups. Please use the private reporting route described in SECURITY.md for vulnerabilities.
Implementation references: Tvheadend JSON API, Tvheadend source, and the official MCP Python SDK.
Pick your client and paste the snippet. Each one is the same server, written the way that client expects it.
claude mcp add tvheadend -- uv run --directory /absolute/path/tvheadend-mcp --frozen tvheadend-mcp --env-file /absolute/path/tvheadend.env{
"mcpServers": {
"tvheadend": {
"args": [
"run",
"--directory",
"/absolute/path/tvheadend-mcp",
"--frozen",
"tvheadend-mcp",
"--env-file",
"/absolute/path/tvheadend.env"
],
"command": "uv"
}
}
}code --add-mcp '{"name":"tvheadend","args":["run","--directory","/absolute/path/tvheadend-mcp","--frozen","tvheadend-mcp","--env-file","/absolute/path/tvheadend.env"],"command":"uv"}'[mcp_servers.tvheadend]
command = "uv"
args = ["run", "--directory", "/absolute/path/tvheadend-mcp", "--frozen", "tvheadend-mcp", "--env-file", "/absolute/path/tvheadend.env"]Runs locally on your device. Your client starts the server itself, so nothing has to be hosted.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/mcp/tvheadend-mcp to learn what the "Tvheadend MCP" MCP server does and how to install it. Add it to my coding agent's MCP configuration as documented on that page, then confirm the server connects and list the tools it exposes.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
docker run --rm -i --env-file .env tvheadend-mcpThis server runs locally, so we can't read its tool list over the web yet.
We could not run this server: it ships no npx package for our sandbox and no public endpoint. The four checks that need a live server are left out, and the grade tops out at B until one exists.
Paste this line near the top of your repository's README. The badge always renders the current score.
[](https://aiagentslisting.com/mcp/tvheadend-mcp)Nothing comparable is listed yet.
v0.2.0Tvheadend MCP v0.2.0Release notesv0.1.0Tvheadend MCP v0.1.0Release notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "tvheadend-mcp" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
One email a week. New agents, MCP servers and skills, and what is actually getting traction.