ytptube-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ytptube-mcpadd this video to the download queue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ytptube MCP Server
A local stdio Model Context Protocol server that lets an MCP client inspect and, when explicitly enabled, manage a self-hosted ytptube HTTP API.
What is this?
This server gives an AI assistant a focused interface to your ytptube instance without putting API credentials in prompts or source control. It can inspect downloads, history, tasks, presets, logs, and service configuration. Changes are disabled by default and are rejected locally before the server makes a network request.
Ask your MCP client things such as:
"Is my ytptube instance reachable?"
"What is downloading right now?"
"Show the latest completed downloads."
"Inspect this video URL before I add it."
"What scheduled tasks are configured?"
"List my download presets."
When you deliberately enable write access, it can also add downloads, manage the queue and history, update tasks and presets, and generate metadata.
Related MCP server: metube-mcp
Features
Safe by default —
YTPTUBE_ALLOW_MUTATIONS=falseblocks every state-changing request before it reaches ytptube.Focused API access — inspect health, configuration, queue/history, archive entries, scheduled tasks, presets, and recent logs.
Validated inputs — download and task URLs must use HTTP or HTTPS; write tools reject raw yt-dlp CLI strings.
Credential-aware — authentication is optional, but the username and password must be configured together and sensitive API results are redacted.
Small deployment surface — standard input/output transport and a configured ytptube HTTP API; no file browser, shell access, notifications, task/preset deletion, or SSE.
Quick start
Prerequisites
Node.js
^20.19.0or>=22.12.0.A reachable self-hosted ytptube HTTP API.
An MCP-compatible client, such as Codex or Claude Desktop.
Install from npm
npm install --global ytptube-mcpThis makes the ytptube-mcp command available on your PATH. Configure the
server through your MCP client's environment, as shown below.
Install from source
git clone https://github.com/Snuffy2/ytptube-mcp.git
cd ytptube-mcp
npm ci
cp .env.example .env
# Edit .env and set YTPTUBE_BASE_URL.
npm run buildThe build produces dist/index.js. Re-run npm run build after changing the
TypeScript source.
At startup, the built server reads the .env file from the checkout that
contains dist/index.js, even when an MCP client starts it from another
directory. Explicit environment variables take precedence over .env.
Configure your MCP client
For an npm installation, use the ytptube-mcp command and keep values specific
to your ytptube instance in its environment configuration:
[mcp_servers.ytptube]
command = "ytptube-mcp"
[mcp_servers.ytptube.env]
YTPTUBE_BASE_URL = "https://media.example.net/ytptube"
YTPTUBE_ALLOW_MUTATIONS = "false"
# Set these two together only when the API requires authentication.
# YTPTUBE_USERNAME = "your-user"
# YTPTUBE_PASSWORD = "your-password"For a source checkout, run its built server with Node. Replace the placeholder with the absolute path to your checkout:
[mcp_servers.ytptube]
command = "node"
args = ["/absolute/path/to/ytptube-mcp/dist/index.js"]The checkout's .env file supplies its configuration. Do not commit actual
credentials or store them in shared shell history.
Environment variables
Variable | Required | Description |
| Yes | Root URL of the ytptube API, including any reverse-proxy path prefix. |
| Together, if needed | Optional HTTP API credentials. Providing only one is a configuration error. |
| No |
|
| No | Request timeout from |
| No | Exact string |
Safety and write access
The server is read-only by default. With YTPTUBE_ALLOW_MUTATIONS=false, a
request such as ytptube_add_downloads returns MUTATIONS_DISABLED locally
and sends no request to ytptube. Read-only inspection tools remain available.
Set the value to the exact string true only for a session that must change
state, then restart the server/client so it receives the new setting. Return
it to false when you are done.
YTPTUBE_ALLOW_MUTATIONS=trueThe gate covers download additions/retries, queue controls, history and archive changes, task and preset changes, and metadata generation. Clearing history does not remove media unless the request explicitly asks for it.
Available Tools
Every tool name begins with ytptube_. Tools marked Yes in the Mutating
column require YTPTUBE_ALLOW_MUTATIONS=true; otherwise the server rejects the
request before contacting ytptube.
Health and Inspection Tools
Tool | Description | Mutating |
| Check whether the configured ytptube API is reachable. | No |
| Read system configuration with sensitive fields redacted. | No |
| Read the active yt-dlp option configuration. | No |
| Parse and validate yt-dlp CLI options without starting a download. | No |
| Inspect URL metadata without adding it to the download queue. | No |
| Read recent application logs when file logging is enabled. | No |
| Read current in-memory queue progress and counts. | No |
Queue and History Tools
Tool | Description | Mutating |
| List a paginated queue or completed-history page. | No |
| Read one queue or history item by ID. | No |
| Add one or more URLs to the download queue. | Yes |
| Requeue a history item using only its saved download-request fields. | Yes |
| Start, pause, force-start, reorder, or cancel queued downloads. | Yes |
| Delete selected queue/history records; media deletion is opt-in. | Yes |
Archive and Metadata Tools
Tool | Description | Mutating |
| List archive entries for a preset, optionally filtered by archive IDs. | No |
| Archive or unarchive a history item using its configured archive file. | Yes |
| Generate task metadata, NFO, and image sidecar files. | Yes |
| Generate an NFO sidecar for a completed history item. | Yes |
Task Tools
Tool | Description | Mutating |
| List scheduled tasks with pagination. | No |
| Read a scheduled task by numeric ID. | No |
| Preview task handling and items for a URL without queuing downloads. | No |
| Create one or more scheduled tasks. | Yes |
| Partially update a scheduled task. | Yes |
| Replace a scheduled task using the API PUT contract. | Yes |
Preset Tools
Tool | Description | Mutating |
| List download presets with pagination and sorting. | No |
| Read a download preset by numeric ID. | No |
| Create a download preset. | Yes |
| Partially update a non-default download preset. | Yes |
| Replace a non-default download preset using the API PUT contract. | Yes |
Important limits
Task URL inspection is a preview; ytptube does not offer a scheduled-task "run now" endpoint.
Global yt-dlp options are read-only through this server.
Write tools do not accept raw yt-dlp CLI strings. The validation tool only parses and validates a string; it never starts a download.
Download
extrasaccepts onlyignore_conditions, a non-empty array of condition names. Use"*"to ignore all conditions.Per-download authentication and settings belong in presets. Task create and update inputs reject arbitrary configuration and cookies.
Development
Install prek to run the repository's
quality hooks or refresh its hooks with the dependency-update script.
# Install dependencies, type-check, test, and build.
./scripts/test.sh
# Run the repository quality hooks.
prek run --all-filesprek is the repository's only linter and formatter. It checks repository
files, GitHub Actions syntax, formatting, and TypeScript types.
Troubleshooting
The server says YTPTUBE_BASE_URL is required. Set a valid HTTP or HTTPS
base URL in the MCP client environment or .env, including any proxy prefix.
Authentication fails. Confirm the URL is correct for your proxy and that
both YTPTUBE_USERNAME and YTPTUBE_PASSWORD are set. Use basic unless
your ytptube API/proxy specifically requires the apikey fallback.
A mutation is unavailable. Confirm it is really required, set
YTPTUBE_ALLOW_MUTATIONS=true, restart the MCP client/server, perform the
operation, and then disable mutations again.
A tool returns redacted values. This is intentional: the server protects credentials and sensitive values when it formats API results and errors.
Contributing
Please open an issue before starting a large change. Keep the stdio transport,
the ytptube HTTP API boundary, and the read-only default intact. Run the local
test script and prek before opening a pull request.
License
This project is licensed under the MIT License.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceA fully functional MCP server and CLI for YouTube to automate YouTube operation.Last updated603Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that enables users to control a MeTube instance for managing yt-dlp video and audio downloads through AI assistants. It supports operations like queuing URLs, listing active downloads, and managing authentication cookies.Last updated91MIT
- Flicense-qualityCmaintenanceMCP server for Loadingplay that exposes its tools via Streamable HTTP, supporting health check and standard MCP endpoint.Last updated
- AlicenseAqualityCmaintenanceA local-first MCP server for inspecting and managing a creator-owned YouTube channel, using Google's official YouTube Data API v3 and Analytics API.Last updated1020MIT
Related MCP Connectors
MCP server for the FFmpeg Micro video transcoding API — create, monitor, download transcodes.
MCP server for managing Prisma Postgres.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Snuffy2/ytptube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server