{"id":22344427,"url":"https://github.com/knuckles-team/media-downloader","last_synced_at":"2026-06-01T02:01:53.263Z","repository":{"id":46043467,"uuid":"515018730","full_name":"Knuckles-Team/media-downloader","owner":"Knuckles-Team","description":"Download videos and audio from the internet! Out of the box A2A Server and MCP Server","archived":false,"fork":false,"pushed_at":"2026-01-30T03:55:16.000Z","size":177,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T19:53:09.824Z","etag":null,"topics":["a2a","a2a-server","ag-ui","audio","downloader","mcp-server","python","video","youtube"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Knuckles-Team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-18T03:11:04.000Z","updated_at":"2026-01-30T03:54:57.000Z","dependencies_parsed_at":"2026-01-25T11:01:09.514Z","dependency_job_id":null,"html_url":"https://github.com/Knuckles-Team/media-downloader","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.17391304347826086","last_synced_commit":"8a19f4617ccd12d77b998202b9a9584b2dc54ccf"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/Knuckles-Team/media-downloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knuckles-Team%2Fmedia-downloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knuckles-Team%2Fmedia-downloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knuckles-Team%2Fmedia-downloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knuckles-Team%2Fmedia-downloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Knuckles-Team","download_url":"https://codeload.github.com/Knuckles-Team/media-downloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knuckles-Team%2Fmedia-downloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28975278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T09:57:52.632Z","status":"ssl_error","status_checked_at":"2026-02-01T09:57:49.143Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a","a2a-server","ag-ui","audio","downloader","mcp-server","python","video","youtube"],"created_at":"2024-12-04T09:11:02.942Z","updated_at":"2026-06-01T02:01:53.256Z","avatar_url":"https://github.com/Knuckles-Team.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Media Downloader\n## CLI or API | MCP | Agent\n\n![PyPI - Version](https://img.shields.io/pypi/v/media-downloader)\n![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')\n![PyPI - Downloads](https://img.shields.io/pypi/dd/media-downloader)\n![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/media-downloader)\n![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/media-downloader)\n![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/media-downloader)\n![PyPI - License](https://img.shields.io/pypi/l/media-downloader)\n![GitHub](https://img.shields.io/github/license/Knuckles-Team/media-downloader)\n![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/media-downloader)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/media-downloader)\n![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/media-downloader)\n![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/media-downloader)\n![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/media-downloader)\n![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/media-downloader)\n![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/media-downloader)\n![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/media-downloader)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/media-downloader)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/media-downloader)\n\n*Version: 2.25.0*\n\n---\n\n## Overview\n\n**Media Downloader** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with Download audio/videos from the internet!\nHost an MCP Server for Agentic AI to download videos!.\n\n---\n\n## Key Features\n\n- **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.\n- **Enterprise-Grade Security:** Comprehensive support for Eunomia policies, OIDC token delegation, and granular execution context tracking.\n- **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).\n- **Native Telemetry \u0026 Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.\n\n---\n\n## CLI or API\n\nThis agent wraps the Download audio/videos from the internet!\nHost an MCP Server for Agentic AI to download videos! API. You can interact with it programmatically or via its integrated execution entrypoints.\n\nDetailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in [docs/index.md](docs/index.md).\n\n---\n\n## MCP\n\nThis server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.\n\n### Available MCP Tools\n\nDetailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](docs/mcp.md).\n\n### Dynamic Tool Selection \u0026 Visibility\n\nThis MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows you to restrict the set of exposed tools in order to prevent blowing up the LLM's context window.\n\nYou can configure tool filtering via multiple input channels:\n\n- **CLI Arguments:** Pass `--tools` or `--toolsets` (or their disabled counterparts `--disabled-tools` and `--disabled-toolsets`) during startup.\n- **Environment Variables:** Define standard environment variables:\n  - `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS`\n  - `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS`\n- **HTTP SSE Request Headers:** Pass custom headers during transport initialization:\n  - `x-mcp-enabled-tools` / `x-mcp-disabled-tools`\n  - `x-mcp-enabled-tags` / `x-mcp-disabled-tags`\n- **HTTP SSE Request Query Parameters:** Append query parameters directly to your transport connection URL:\n  - `?tools=tool1,tool2`\n  - `?tags=tag1`\n\nWhen query strings or parameters are supplied, an LLM-free **Knowledge Graph resolution layer** (using `DynamicToolOrchestrator`) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.\n\n---\n\n### MCP Configuration Examples\n\n#### stdio Transport (Recommended for local IDEs e.g., Cursor, Claude Desktop)\nConfigure your IDE's `mcp.json` to launch the MCP server via `uvx`:\n\n```json\n{\n  \"mcpServers\": {\n    \"media-downloader\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"media-downloader\",\n        \"media-downloader-mcp\"\n      ],\n      \"env\": {\n        \"YT_DLP_PATH\": \"your_yt_dlp_path_here\",\n        \"BREW_INSTALL_CMD\": \"your_brew_install_cmd_here\"\n      }\n    }\n  }\n}\n```\n\n#### Streamable-HTTP Transport (Recommended for production deployments)\nConfigure your client's `mcp.json` to launch the Streamable-HTTP server via `uvx` with explicit host and port definition:\n\n```json\n{\n  \"mcpServers\": {\n    \"media-downloader\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\",\n        \"media-downloader\",\n        \"media-downloader-mcp\"\n      ],\n      \"env\": {\n        \"TRANSPORT\": \"streamable-http\",\n        \"HOST\": \"0.0.0.0\",\n        \"PORT\": \"8000\",\n        \"YT_DLP_PATH\": \"your_yt_dlp_path_here\",\n        \"BREW_INSTALL_CMD\": \"your_brew_install_cmd_here\"\n      }\n    }\n  }\n}\n```\n\nAlternatively, connect to a pre-deployed remote or local Streamable-HTTP instance:\n\n```json\n{\n  \"mcpServers\": {\n    \"media-downloader\": {\n      \"url\": \"http://localhost:8000/media-downloader/mcp\"\n    }\n  }\n}\n```\n\nDeploying the Streamable-HTTP server via Docker:\n\n```bash\ndocker run -d \\\n  --name media-downloader-mcp \\\n  -p 8000:8000 \\\n  -e TRANSPORT=streamable-http \\\n  -e PORT=8000 \\\n  -e YT_DLP_PATH=\"your_value\" \\\n  -e BREW_INSTALL_CMD=\"your_value\" \\\n  knucklessg1/media-downloader:latest\n```\n\n---\n\n## Agent\n\nThis repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts seamlessly with the **Agent Web UI (AG-UI)** and Terminal interface.\n\n### Running the Agent CLI\nTo start the interactive command-line agent:\n\n```bash\n# Set credentials\nexport YT_DLP_PATH=\"your_value\"\nexport BREW_INSTALL_CMD=\"your_value\"\n\n# Run the agent server\nmedia-downloader-agent --provider openai --model-id gpt-4o\n```\n\n### Docker Compose Orchestration\nThe following `docker/agent.compose.yml` configures the Agent, Web UI, and Terminal Interface together:\n\n```yaml\nversion: '3.8'\n\nservices:\n  media-downloader-mcp:\n    image: knucklessg1/media-downloader:latest\n    container_name: media-downloader-mcp\n    hostname: media-downloader-mcp\n    restart: always\n    env_file:\n      - ../.env\n    environment:\n      - PYTHONUNBUFFERED=1\n      - HOST=0.0.0.0\n      - PORT=8000\n      - TRANSPORT=streamable-http\n    ports:\n      - \"8000:8000\"\n    healthcheck:\n      test: [\"CMD\", \"python3\", \"-c\", \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health')\"]\n      interval: 30s\n      timeout: 10s\n      retries: 3\n      start_period: 10s\n    logging:\n      driver: json-file\n      options:\n        max-size: \"10m\"\n        max-file: \"3\"\n\n  media-downloader-agent:\n    image: knucklessg1/media-downloader:latest\n    container_name: media-downloader-agent\n    hostname: media-downloader-agent\n    restart: always\n    depends_on:\n      - media-downloader-mcp\n    env_file:\n      - ../.env\n    command: [ \"media-downloader-agent\" ]\n    environment:\n      - PYTHONUNBUFFERED=1\n      - HOST=0.0.0.0\n      - PORT=9000\n      - MCP_URL=http://media-downloader-mcp:8000/mcp\n      - PROVIDER=${PROVIDER:-openai}\n      - MODEL_ID=${MODEL_ID:-gpt-4o}\n      - ENABLE_WEB_UI=True\n      - ENABLE_OTEL=True\n    ports:\n      - \"9000:9000\"\n    healthcheck:\n      test: [\"CMD\", \"python3\", \"-c\", \"import urllib.request; urllib.request.urlopen('http://localhost:9000/health')\"]\n      interval: 30s\n      timeout: 10s\n      retries: 3\n      start_period: 10s\n    logging:\n      driver: json-file\n      options:\n        max-size: \"10m\"\n        max-file: \"3\"\n\n```\n\nDetailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in [docs/agent.md](docs/agent.md).\n\n---\n\n## Security \u0026 Governance\n\nBuilt directly upon the enterprise-ready [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities) core, standard security parameters are fully supported:\n\n### Access Control \u0026 Policy Enforcement\n- **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.\n- **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.\n- **Scoped Credentials:** Execution context runs restricted to the specific caller identity.\n\n### Runtime Security Grid\n| Feature | Functionality | Enablement |\n|---------|---------------|------------|\n| **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |\n| **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |\n| **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |\n\n---\n\n## Installation\n\nInstall the Python package locally:\n\n```bash\n# Using uv (highly recommended)\nuv pip install media-downloader[all]\n\n# Using standard pip\npython -m pip install media-downloader[all]\n```\n\n---\n\n## Repository Owners\n\n\u003cimg width=\"100%\" height=\"180em\" src=\"https://github-readme-stats.vercel.app/api?username=Knucklessg1\u0026show_icons=true\u0026hide_border=true\u0026\u0026count_private=true\u0026include_all_commits=true\" /\u003e\n\n![GitHub followers](https://img.shields.io/github/followers/Knucklessg1)\n![GitHub User's stars](https://img.shields.io/github/stars/Knucklessg1)\n\n---\n\n## Contribute\n\nContributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:\n- Format code using `ruff format .`\n- Lint code using `ruff check .`\n- Validate type-safety with `mypy .`\n- Execute test suites using `pytest`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknuckles-team%2Fmedia-downloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknuckles-team%2Fmedia-downloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknuckles-team%2Fmedia-downloader/lists"}