Skip to main content

YouTube video analysis and content generation pipeline exposed as MCP tools

Project description

mcp-content-pipeline

PyPI version Python License: MIT

A YouTube video analysis and content generation pipeline exposed as MCP tools. Extract transcripts, generate key takeaways, TLDRs, and Twitter/X hook drafts — all callable by any MCP-compatible AI client like Claude Desktop.

Why?

Manually copying YouTube transcripts into AI tools, crafting prompts, and formatting output is tedious and error-prone. This MCP server turns the entire workflow into chainable tools that any AI agent can call. List videos from a channel, analyse them in batch, and sync the results to GitHub — all in a single conversation.

Quick Start

uvx mcp-content-pipeline

Or install explicitly:

uv tool install mcp-content-pipeline
mcp-content-pipeline

Claude Desktop Configuration

Add to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "content-pipeline": {
      "command": "/usr/local/bin/uvx",
      "args": ["mcp-content-pipeline"],
      "env": {
        "MCP_CP_ANTHROPIC_API_KEY": "sk-ant-...",
        "MCP_CP_GITHUB_TOKEN": "ghp_...",
        "MCP_CP_GITHUB_REPO": "your-username/your-repo"
      }
    }
  }
}

Tools

Tool Description Requires
analyse_video Analyse a single YouTube video — transcript, takeaways, TLDR, Twitter hook ANTHROPIC_API_KEY
batch_analyse Analyse multiple videos from a URL list or config file ANTHROPIC_API_KEY
list_channel_videos Fetch recent videos from a YouTube channel YOUTUBE_API_KEY
sync_to_github Push analyses as markdown files to a GitHub repo GITHUB_TOKEN, GITHUB_REPO

Environment Variables

All prefixed with MCP_CP_:

Variable Required Description
MCP_CP_ANTHROPIC_API_KEY Yes Anthropic API key for Claude analysis
MCP_CP_YOUTUBE_API_KEY No YouTube Data API v3 key (only for list_channel_videos)
MCP_CP_GITHUB_TOKEN For sync GitHub personal access token
MCP_CP_GITHUB_REPO For sync Target repo in owner/repo format
MCP_CP_GITHUB_BRANCH No Branch to push to (default: main)
MCP_CP_GITHUB_OUTPUT_DIR No Output directory in repo (default: content/videos)
MCP_CP_CLAUDE_MODEL No Claude model to use (default: claude-sonnet-4-20250514)
MCP_CP_MAX_TRANSCRIPT_TOKENS No Max transcript length in tokens (default: 100000)

Example Workflow

Chain tools together in a single conversation:

1. "List the last 5 videos from channel UC_x5XG1OV2P6uZZ5FSM9Ttw"
   → list_channel_videos returns 5 video URLs

2. "Analyse all of these videos"
   → batch_analyse processes all 5, returns analyses

3. "Sync the results to GitHub"
   → sync_to_github pushes markdown files + index to your repo

Development

git clone https://github.com/your-username/mcp-content-pipeline.git
cd mcp-content-pipeline
uv sync
uv run pytest -v --cov=src/mcp_content_pipeline
uv run ruff check src/ tests/

Security

  • All credentials are configured via local environment variables — never committed to the repo
  • The tool is open source but your API keys, YouTube key, and GitHub token stay on your machine
  • Never create a .env file in the repo — use shell exports or Claude Desktop config instead

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Commit using Conventional Commits (feat: add new feature)
  4. Push and open a Pull Request

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_content_pipeline-0.1.0.tar.gz (107.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_content_pipeline-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_content_pipeline-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_content_pipeline-0.1.0.tar.gz
  • Upload date:
  • Size: 107.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_content_pipeline-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b8d518180067e5754b44d05b9ec2e61f8af7a920b1836a1eaf4ea76320a0632
MD5 969538aab4b034b3135f432200ac8865
BLAKE2b-256 e85a21dd09724e3c26ec6109b149e762f5f78af82956ce660def9b919069d1a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_content_pipeline-0.1.0.tar.gz:

Publisher: release.yml on berkayyildirim/mcp-content-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_content_pipeline-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_content_pipeline-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c58b091f5d83ad0be5784409946f2b14c80159928d131c6c7a4f23385076f35e
MD5 7502408440298b4b46d104ae7239e40d
BLAKE2b-256 36cf0ffcfdb49655dd7a34a21fdd0aa01c00187f58efcb336fbe0e9cd21c70a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_content_pipeline-0.1.0-py3-none-any.whl:

Publisher: release.yml on berkayyildirim/mcp-content-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page