Skip to main content
Glama
README.md
# tdarr-mcp

A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server for [Tdarr](https://tdarr.io) — the distributed media transcoding/health-check automation platform. It gives AI assistants (Claude Desktop, Claude Code, and any MCP-compatible client) programmatic control over a Tdarr server through its HTTP API.

Speaks MCP over stdio and exposes **105 tools** across **12 categories**.

## Features

| Category | Tools | Examples |
| --- | --- | --- |
| **Libraries** | 19 | scan, create/update/delete libraries, folder & filter settings, transcode/health-check options |
| **Nodes** | 19 | list nodes & workers, pause/resume, set worker limits, reassign jobs |
| **Server** | 18 | server status, settings, schedules, statistics, maintenance |
| **Files** | 11 | search, bulk update/delete, create samples, inspect file records |
| **Plugins** | 9 | list/get plugins, plugin stacks, community plugins |
| **Stats** | 7 | transcode/health stats, space saved, processing history |
| **Users** | 7 | list/create/update/delete users, auth settings |
| **Backups** | 5 | create backup, status, reset |
| **Jobs** | 5 | queue management, job control |
| **Database** | 3 | `cruddb`, search DB, client queries |
| **Automations** | 1 | run an automation |
| **Processes** | 1 | process info |

All tools are prefixed `tdarr_*` (e.g. `tdarr_get_nodes`, `tdarr_search_db`, `tdarr_run_automation`).

## Prerequisites

- **Node.js ≥ 18** (uses the native `fetch` API), or **[Bun](https://bun.sh)**.
- A running **[Tdarr](https://tdarr.io) server** reachable over HTTP.

## Installation & build

```bash
git clone https://github.com/maximeallanic/tdarr-mcp.git
cd tdarr-mcp

# with Bun
bun install
bun run build      # tsc → dist/

# …or with npm
npm install
npm run build
```

This compiles `src/` to `dist/`.

## Configuration

The server reads its target from environment variables:

| Variable | Required | Description |
| --- | --- | --- |
| `TDARR_URL` | ❌ | Base URL of the Tdarr server. Defaults to `http://localhost:8265`. |
| `TDARR_API_KEY` | ❌ | API key, sent as the `x-api-key` header. Only needed if your Tdarr instance has API auth enabled. |

## Usage with an MCP client

Add the server to your MCP client configuration (e.g. Claude Desktop / Claude Code `mcpServers` block):

```json
{
  "mcpServers": {
    "tdarr": {
      "command": "node",
      "args": ["/absolute/path/to/tdarr-mcp/dist/main.js"],
      "env": {
        "TDARR_URL": "http://your-tdarr-host:8265"
      }
    }
  }
}
```

During development you can run the TypeScript entry directly with Bun (no build step):

```bash
TDARR_URL=http://your-tdarr-host:8265 bun run src/main.ts
```

## How it works

Each tool is a thin declarative mapping (`TdarrToolDef`) to a Tdarr API endpoint: HTTP method, path (with `:param` substitution), and an input JSON schema. POST bodies are wrapped in `{ data: ... }` by default (Tdarr's convention) unless a tool sets `dataWrapped: false`. Responses are returned as pretty-printed JSON text.

## License

[MIT](./LICENSE) © Maxime Allanic

TDQS

C2.6/5.0

Scored across 105 tools

Disambiguation2/5

While most tools are named by resource+action, several generic database accessors overlap: tdarr_cruddb, tdarr_client, and legacy tdarr_search_db all provide table/file lookups or updates. tdarr_status/tdarr_is_server_alive and tdarr_read_plugin/tdarr_read_plugin_text also blur boundaries, so an agent may not reliably pick the right tool.

Naming Consistency3/5

All tools share the tdarr_ prefix and mostly use snake_case verb_noun names, but conventions are mixed: generic tools like tdarr_cruddb, tdarr_client, tdarr_status, tdarr_debug, and tdarr_item_proc_end break the verb_noun pattern, while stats_get_* and auth_*/admin_*/public_auth_* introduce different orderings. The pattern is readable but not predictable enough for a set this large.

Tool Count1/5

105 tools is far beyond a typical MCP surface and includes low-level node handshake/relay methods, updater mechanics, and raw database access that duplicate higher-level operations. The sheer count makes browsing and selection impractical, fitting the extreme mismatch calibration.

Completeness4/5

The set covers most Tdarr workflows: backups, libraries/scans, transcode decisions, plugins, nodes, stats, auth, and job reports. It lacks explicit library create/delete operations and some higher-level flow management, but the generic db/client tools and broad coverage mean agents can work around minor gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues