npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@gongrzhe/server-youtube-autoauth-mcp

v1.0.5

Published

YouTube MCP server with auto authentication support

Downloads

423

Readme

YouTube AutoAuth MCP Server

A Model Context Protocol (MCP) server for YouTube integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage YouTube through natural language interactions.

Core Features

1. Video Search & Recommendations

  • Search Videos

    {
      "query": "machine learning tutorial",
      "maxResults": 10,
      "orderBy": "relevance",     // Options: relevance, viewCount, rating, date
      "publishedAfter": "2024-01-01T00:00:00Z",  // Optional
      "language": "en"            // Optional
    }
  • Smart Recommendations

    {
      "topic": "artificial intelligence",
      "maxResults": 10,
      "minViewCount": 10000,      // Optional: minimum view count
      "minRating": 4,            // Optional: minimum rating (1-5)
      "language": "en"           // Optional
    }

    Recommendation scoring system:

    • View count weight: 40%
    • Engagement weight (likes & comments): 40%
    • Recency weight: 20%

2. Video Management

  • Upload Video

    {
      "title": "My Video Title",
      "description": "Video description here",
      "privacy": "private",      // Options: private, unlisted, public
      "filePath": "/path/to/video.mp4",
      "tags": ["tag1", "tag2"]   // Optional
    }
  • Update Video

    {
      "videoId": "video123",
      "title": "Updated Title",
      "description": "Updated description",
      "privacy": "public",
      "tags": ["new", "tags"]
    }

3. Playlist Management

  • Create Playlist
    {
      "title": "My Playlist",
      "description": "Playlist description",
      "privacy": "public"        // Options: private, unlisted, public
    }

4. Interaction Features

  • Add Comment
    {
      "videoId": "video123",
      "text": "Great video!",
      "parentId": "comment123"   // Optional, for replies
    }

Response Data Structure

All API calls return rich information including:

{
    videoId: string,
    title: string,
    description: string,
    channelTitle: string,
    publishedAt: string,
    statistics: {
        viewCount: string,
        likeCount: string,
        commentCount: string
    },
    duration: string,
    url: string,           // Direct video URL
    score?: number         // Only for recommendations
}

Installation & Setup

  1. Install via npm:
npm install @gongrzhe/server-youtube-autoauth-mcp
  1. Create Google Cloud Project:
  • Go to Google Cloud Console
  • Create new project or select existing one
  • Enable YouTube Data API v3
  • Create OAuth 2.0 credentials
  • Download credentials as gcp-oauth.keys.json
  1. Configure Authentication:
# Global config (recommended)
mkdir -p ~/.youtube-mcp
mv gcp-oauth.keys.json ~/.youtube-mcp/
npx @gongrzhe/server-youtube-autoauth-mcp auth

# Or local config
npx @gongrzhe/server-youtube-autoauth-mcp auth
  1. Configure in Claude Desktop:
{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": [
        "@gongrzhe/server-youtube-autoauth-mcp"
      ]
    }
  }
}

Environment Variables

  • YOUTUBE_OAUTH_PATH: Custom path to OAuth keys file
  • YOUTUBE_CREDENTIALS_PATH: Custom path to stored credentials

Security Notes

  • OAuth credentials stored securely in ~/.youtube-mcp/
  • Offline access for persistent authentication
  • Never commit credentials to version control
  • Regular access review recommended
  • Rate limiting and quota management included

Error Handling

The server handles various error scenarios:

  • Authentication failures
  • API quota limits
  • Network issues
  • Invalid parameters
  • File access errors

Best Practices

  1. Video Upload:
  • Use appropriate privacy settings
  • Include descriptive titles and tags
  • Consider file size and format
  1. Search & Recommendations:
  • Use specific queries for better results
  • Consider language and region settings
  • Utilize view count and rating filters
  1. Authentication:
  • Keep OAuth credentials secure
  • Monitor API quota usage
  • Regularly refresh tokens

Troubleshooting

  1. Authentication Issues:
  • Verify OAuth configuration
  • Check file permissions
  • Ensure port 3000 is available
  1. API Limits:
  • Monitor quota usage
  • Implement rate limiting
  • Use efficient search parameters
  1. Connection Problems:
  • Check network connectivity
  • Verify firewall settings
  • Ensure proper port access

Support

For issues or questions:

  • File GitHub issues
  • Check API quotas
  • Review YouTube API documentation

License

ISC License