plex-mcp-multi-account

keithah/plex-mcp-multi-account

3.1

If you are the rightful owner of plex-mcp-multi-account and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that manages multiple Plex accounts through plex.tv integration, designed for users managing multiple Plex accounts who want seamless access through Claude Desktop or Claude Code.

🎬 Plex MCP Multi-Account Server

Start using Plex MCP Multi-Account Server with Claude Desktop in seconds:

npx plex-mcp-multi-account@latest init

A powerful Model Context Protocol (MCP) server that lets you manage multiple Plex accounts seamlessly through Claude Desktop. Connect to all your Plex accounts via plex.tv and search, browse, and manage your media libraries from a single interface.

✨ Features

  • 🔐 Multiple Account Support: Manage unlimited Plex accounts simultaneously
  • 🌐 plex.tv Integration: Direct connection through plex.tv (no localhost setup needed)
  • 📊 Flexible Input: Accepts CSV data or simple token lists
  • 🔍 Auto-Resolution: Automatically resolves account names and servers from tokens
  • Data Validation: Validates provided server info against actual Plex data
  • One-Command Setup: Install and configure with a single npx command
  • 🔄 Account Switching: Switch between accounts for different operations

🚀 Quick Start

1. Install with Claude Desktop (Recommended)

npx plex-mcp-multi-account@latest init

That's it! This will:

  • ✅ Install the MCP server
  • ✅ Configure Claude Desktop automatically
  • ✅ Set up everything you need

2. Restart Claude Desktop

After running the init command, restart Claude Desktop to load the new MCP server.

3. Configure Your Accounts

In Claude Desktop, configure your Plex accounts:

configure_accounts(`your_plex_token_1
your_plex_token_2
your_plex_token_3`)

Or use CSV format for validation:

configure_accounts(`token,account_name,servers
abc123token,myaccount1,Server1
def456token,myaccount2,\"Server2,Server3\"`)

🎯 Available Commands

CommandDescriptionExample
configure_accounts(data)Set up accounts from CSV or token listSee above
list_accounts()Show all configured accounts and serverslist_accounts()
set_active_account(name)Set which account to use for operationsset_active_account(\"myaccount1\")
get_libraries(account?)Get libraries for account (or active)get_libraries()
search_media(query, account?)Search across account serverssearch_media(\"Star Wars\")
get_servers(account?)Get server informationget_servers(\"myaccount1\")

💡 Example Usage

// 1. Configure your accounts (tokens only - auto-resolves everything)
configure_accounts(`6nSDxJztUqxpk1pEVok7
WpFQGhrMX_wvtFhfeyrj
Kb_2LchjxSVyvwKhzhNV`)

// 2. List all accounts and their servers  
list_accounts()

// 3. Set active account
set_active_account(\"username1\")

// 4. Search across all servers in active account
search_media(\"Avengers\")

// 5. Get libraries for specific account
get_libraries(\"username2\")

// 6. Get detailed server information
get_servers()

🔧 Manual Installation (Alternative)

If you prefer manual setup:

For Claude Desktop

  1. Install globally

    npm install -g plex-mcp-multi-account
    
  2. Add to Claude Desktop config (~/.claude_desktop_config.json):

    {
      \"mcpServers\": {
        \"plex-mcp-multi-account\": {
          \"command\": \"plex-mcp-multi-account\",
          \"args\": [],
          \"env\": {}
        }
      }
    }
    

For Claude Code

  1. Clone and install

    git clone https://github.com/keithah/plex-mcp-multi-account.git
    cd plex-mcp-multi-account
    npm install
    npm run build
    
  2. Add to Claude Code MCP config:

    {
      \"mcpServers\": {
        \"plex-mcp-multi-account\": {
          \"command\": \"node\",
          \"args\": [\"/path/to/plex-mcp-multi-account/dist/index.js\"],
          \"env\": {}
        }
      }
    }
    

🔒 Security & Privacy

  • Secure: Tokens stored in memory only during session
  • Private: No data logged or persisted to disk
  • Direct: Connects directly to plex.tv (no third-party services)
  • Open Source: Full source code available for audit

🛠️ How It Works

  1. Token Validation: Validates each Plex token against plex.tv
  2. Account Discovery: Automatically discovers account usernames
  3. Server Resolution: Finds and connects to all accessible Plex servers
  4. Multi-Account Management: Seamlessly switch between accounts
  5. Real-time Operations: Search, browse, and manage media in real-time

📋 Requirements

  • Node.js 18+
  • Valid Plex account tokens
  • Internet connection for plex.tv
  • Claude Desktop

🔍 Getting Plex Tokens

  1. Log in to plex.tv
  2. Go to Settings → Account → Privacy & Security
  3. Create a new token or use an existing one
  4. Copy the token for use with this server

🐛 Troubleshooting

Common Issues

"No accounts configured"

  • Ensure your Plex tokens are valid and not expired
  • Check internet connectivity to plex.tv
  • Verify tokens have appropriate permissions

"Connection timeout"

  • Some server timeouts are normal for offline/private servers
  • The MCP server will work with accessible servers

"Failed to connect to Plex"

  • Verify your Plex account has access to the servers
  • Check that servers are online and reachable
  • Ensure tokens have proper permissions

Need Help?

📦 Development

# Clone the repository
git clone https://github.com/keithah/plex-mcp-multi-account.git
cd plex-mcp-multi-account

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run in development mode
npm run dev

# Run the server
npm start

📜 License

MIT License - see file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

⭐ Support

If this project helps you manage your Plex accounts more efficiently, please give it a star!


Built with ❤️ for the Plex and Claude communities