A unified personal data hub built on MCP (Model Context Protocol) that allows AI assistants to access your digital life from multiple platforms, providing truly personalized and contextual interactions. 1. Clone the repository 2. Install dependencies > ๐ See detailed installation instructions: Installation and Setup 3. Configure your API keys 4. Add to Cursor settings > ๐ See detailed MCP config
Add this skill
npx mdskills install YangLiangwei/personalizationmcpComprehensive multi-platform data hub with OAuth2 support and excellent documentation
1# ๐ฏ PersonalizationMCP23[](https://opensource.org/licenses/MIT)4[](https://www.python.org/downloads/)5[](https://modelcontextprotocol.io/)67A unified personal data hub built on MCP (Model Context Protocol) that allows AI assistants to access your digital life from multiple platforms, providing truly personalized and contextual interactions.89> ๐ **ไธญๆๆๆกฃ**: [README_zh.md](README_zh.md)1011## ๐ Quick Start12131. **Clone the repository**14 ```bash15 git clone https://github.com/YangLiangwei/PersonalizationMCP.git16 cd PersonalizationMCP17 ```18192. **Install dependencies**2021 > ๐ **See detailed installation instructions: [Installation and Setup](#-installation-and-setup)**22233. **Configure your API keys**24 ```bash25 cp config.example config26 # Edit config file with your actual API keys27 ```28294. **Add to Cursor settings**3031 > ๐ **See detailed MCP configuration: [Cursor Configuration](#-cursor-configuration)**3233## ๐ Features3435### ๐ฎ Steam Integration36- Get your game library with detailed statistics and playtime37- View recent gaming activity and currently playing games38- Get detailed game information and achievements39- Compare games with friends and get recommendations40- Analyze gaming habits and preferences4142### ๐ฅ YouTube Integration43- Search YouTube videos and get detailed video information44- Get channel information and trending videos45- Access personal data with OAuth2 (subscriptions, playlists, liked videos)46- Get personalized recommendations based on your viewing history47- ๐ **Smart Token Management** - Automatically detect and refresh expired OAuth2 tokens48- ๐ก๏ธ **Maintenance-Free Configuration** - Prioritize token files, no need to manually update MCP configuration4950### ๐บ Bilibili Integration51- Get user profile information and statistics52- Search videos and get detailed video information53- Access personal data (watch history, favorites, liked videos, coin history)54- Get following list and user-uploaded videos55- Browse "to view later" list and personal collections5657### ๐ต Spotify Integration58- Complete OAuth2 authentication with automatic token management59- Get user profile and music library data60- Access top artists, tracks, and recently played music61- Social features: follow/unfollow artists and playlists62- Library management: saved tracks, albums, shows, episodes, audiobooks63- Playlist operations: view and manage personal playlists6465### ๐ฌ Reddit Integration66- Complete OAuth2 authentication with automatic token management67- Access user account information, karma breakdown, and preferences68- Get submitted posts, comments, and user activity overview69- View saved content, hidden posts, and voting history70- Explore subscribed communities and moderation permissions71- Message system access (inbox, unread, sent messages)7273## ๐ฆ Installation and Setup7475### 1. Install Dependencies7677Due to the complexity of bilibili-api dependencies (especially lxml compilation issues), installation requires specific steps. Choose one of the methods below:7879#### **Option A: Using conda (Recommended)**80```bash81# 1. Create conda environment82conda create -n personalhub python=3.1283conda activate personalhub8485# 2. Install lxml via conda (avoids compilation issues)86conda install lxml8788# 3. Install remaining packages89pip install bilibili-api --no-deps90pip install -r requirements.txt91```9293#### **Option B: Using uv**94```bash95# 1. Install uv if not already installed96# Visit: https://docs.astral.sh/uv/getting-started/installation/9798# 2. Create environment and install core dependencies99uv venv100uv sync101source .venv/bin/activate # On Windows: .venv\Scripts\activate102103# 3. Install bilibili-api and its dependencies separately (due to version conflicts)104uv pip install lxml # Install lxml first (uses precompiled wheel)105uv pip install bilibili-api --no-deps # Install bilibili-api without dependencies106uv pip install aiohttp beautifulsoup4 colorama PyYAML brotli urllib3 # Install required dependencies107```108109#### **Option C: Using pip (Manual Multi-Step Installation)**110```bash111# 1. Create virtual environment112python -m venv venv113source venv/bin/activate # On Windows: venv\Scripts\activate114115# 2. Install packages in specific order to avoid compilation issues116pip install lxml # Install lxml first (uses precompiled wheel)117pip install bilibili-api --no-deps # Install bilibili-api without dependencies118pip install -r requirements.txt # Install all other dependencies119```120121> **โ ๏ธ Important**: The bilibili-api package has complex dependency requirements that can cause compilation failures on some systems. The multi-step installation approach ensures compatibility by installing lxml first, then bilibili-api without its conflicting dependencies, and finally all other required packages.122123### 2. Configuration Setup124125Copy the example configuration file and fill in your credentials:126```bash127cp config.example config128```129130Then edit the `config` file with your actual API keys and tokens.131132## ๐ง Platform Configuration133134### ๐ฎ Steam API Setup135136> ๐ **Detailed setup guide**: [platforms/steam/README.md](platforms/steam/README.md) | [ไธญๆๆๅ](platforms/steam/README_zh.md)137138**Quick summary**: Get Steam API key and User ID, then configure:139```bash140STEAM_API_KEY=your_steam_api_key_here141STEAM_USER_ID=your_steam_user_id_here142```143144### ๐ฅ YouTube API Setup145146> ๐ **Detailed setup guide**: [platforms/youtube/README.md](platforms/youtube/README.md) | [ไธญๆๆๅ](platforms/youtube/README_zh.md)147148**Quick summary**:1491. Get YouTube API key from Google Cloud Console1502. For personal data access, set up OAuth2 with "TV and Limited Input device" type1513. Use MCP tools for easy authentication152153**Configuration:**154```bash155YOUTUBE_API_KEY=your_youtube_api_key_here156# OAuth2 tokens are managed automatically after setup157```158159### ๐บ Bilibili Setup160161> ๐ **Detailed setup guide**: [platforms/bilibili/README.md](platforms/bilibili/README.md) | [ไธญๆๆๅ](platforms/bilibili/README_zh.md)162163**Quick summary**: Extract cookies from your browser after logging into Bilibili164165**Configuration:**166```bash167BILIBILI_SESSDATA=your_bilibili_sessdata_cookie168BILIBILI_BILI_JCT=your_bilibili_bili_jct_cookie169BILIBILI_BUVID3=your_bilibili_buvid3_cookie170```171172### ๐ต Spotify API Setup173174> ๐ **Detailed setup guide**: [platforms/spotify/README.md](platforms/spotify/README.md) | [ไธญๆๆๅ](platforms/spotify/README_zh.md)175176**Quick summary**:1771. Create a Spotify app in [Spotify Developer Dashboard](https://developer.spotify.com/dashboard)1782. Configure redirect URIs in your app settings1793. Use MCP tools for OAuth2 authentication with automatic token management180181**Configuration:**182```bash183SPOTIFY_CLIENT_ID=your_spotify_client_id_here184SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here185SPOTIFY_REDIRECT_URI=https://example.com/callback186# OAuth2 tokens are managed automatically after authentication187```188189### ๐ฌ Reddit API Setup190191> ๐ **Detailed setup guide**: [platforms/reddit/README.md](platforms/reddit/README.md) | [ไธญๆๆๅ](platforms/reddit/README_zh.md)192193**Quick summary**:1941. Create a Reddit app in [Reddit Apps](https://www.reddit.com/prefs/apps)1952. Configure as "web app" with redirect URI1963. Use MCP tools for OAuth2 authentication with automatic token management197198**Configuration:**199```bash200REDDIT_CLIENT_ID=your_reddit_client_id_here201REDDIT_CLIENT_SECRET=your_reddit_client_secret_here202REDDIT_REDIRECT_URI=http://localhost:8888/callback203# OAuth2 tokens are managed automatically after authentication204```205206## ๐ฅ๏ธ Cursor Configuration207208Add the MCP server to your Cursor settings:209210**If using conda:**211```json212{213 "mcpServers": {214 "personalhub": {215 "command": "/path/to/your/conda/envs/personalhub/bin/python",216 "args": ["/absolute/path/to/your/project/server.py"],217 "env": {218 "STEAM_API_KEY": "your_steam_api_key",219 "STEAM_USER_ID": "your_steam_user_id",220 "YOUTUBE_API_KEY": "your_youtube_api_key",221 "BILIBILI_SESSDATA": "your_bilibili_sessdata",222 "BILIBILI_BILI_JCT": "your_bilibili_bili_jct",223 "BILIBILI_BUVID3": "your_bilibili_buvid3",224 "REDDIT_CLIENT_ID": "your_reddit_client_id",225 "REDDIT_CLIENT_SECRET": "your_reddit_client_secret"226 }227 }228 }229}230```231232**If using uv:**233```json234{235 "mcpServers": {236 "personalhub": {237 "command": "uv",238 "args": ["run", "python", "/absolute/path/to/your/project/server.py"],239 "env": {240 "STEAM_API_KEY": "your_steam_api_key",241 "STEAM_USER_ID": "your_steam_user_id",242 "YOUTUBE_API_KEY": "your_youtube_api_key",243 "BILIBILI_SESSDATA": "your_bilibili_sessdata",244 "BILIBILI_BILI_JCT": "your_bilibili_bili_jct",245 "BILIBILI_BUVID3": "your_bilibili_buvid3",246 "REDDIT_CLIENT_ID": "your_reddit_client_id",247 "REDDIT_CLIENT_SECRET": "your_reddit_client_secret"248 }249 }250 }251}252```253254**If using pip with virtual environment:**255```json256{257 "mcpServers": {258 "personalhub": {259 "command": "/absolute/path/to/your/project/venv/bin/python",260 "args": ["/absolute/path/to/your/project/server.py"],261 "env": {262 "STEAM_API_KEY": "your_steam_api_key",263 "STEAM_USER_ID": "your_steam_user_id",264 "YOUTUBE_API_KEY": "your_youtube_api_key",265 "BILIBILI_SESSDATA": "your_bilibili_sessdata",266 "BILIBILI_BILI_JCT": "your_bilibili_bili_jct",267 "BILIBILI_BUVID3": "your_bilibili_buvid3",268 "REDDIT_CLIENT_ID": "your_reddit_client_id",269 "REDDIT_CLIENT_SECRET": "your_reddit_client_secret"270 }271 }272 }273}274```275276**Note**: For YouTube OAuth2 tokens, we recommend using automatic token management. No need to add `YOUTUBE_ACCESS_TOKEN` in the above configuration. The system will automatically read and refresh tokens from the `youtube_tokens.json` file.277278## ๐ YouTube Smart Token Management279280This system implements intelligent YouTube OAuth2 token management with the following features:281282### โจ Core Features283- **Automatic Expiration Detection**: System automatically detects tokens expiring within 5 minutes284- **Auto-Refresh**: No manual intervention needed, system automatically refreshes expired tokens285- **Smart Priority**: Prioritizes token files, with environment variables as backup286- **Maintenance-Free Configuration**: No need to manually update tokens in MCP configuration files287288### ๐ง Token Priority2891. **Explicitly passed access_token parameter** (Highest priority)2902. **Auto-refresh tokens from token file** (Recommended method)2913. **Tokens from environment variables** (Backup method)292293294The system automatically handles all token management - no manual maintenance required!295296## ๐ ๏ธ Available Tools297298### ๐ฎ Steam Tools299- `get_steam_library()` - Get your game library with statistics300- `get_steam_recent_activity()` - Get recent gaming activity301- `get_steam_friends()` - Get your Steam friends list302- `get_steam_profile()` - Get Steam profile information303- `get_player_achievements(app_id)` - Get achievements for a specific game304- `get_user_game_stats(app_id)` - Get detailed game statistics305- `get_friends_current_games()` - See what games your friends are playing306- `compare_games_with_friend(friend_steamid)` - Compare game libraries307- `get_friend_game_recommendations(friend_steamid)` - Get game recommendations308309### ๐ฅ YouTube Tools310- `search_youtube_videos(query)` - Search for videos311- `get_video_details(video_id)` - Get detailed video information312- `get_channel_info(channel_id)` - Get channel information313- `get_trending_videos()` - Get trending videos314- `get_youtube_subscriptions()` - Get your subscriptions (OAuth2 required)315- `get_youtube_playlists()` - Get your playlists (OAuth2 required)316- `get_youtube_liked_videos()` - Get your liked videos (OAuth2 required)317- `refresh_youtube_token()` - Manually refresh OAuth2 token318- `get_youtube_token_status()` - Check OAuth2 token status319320### ๐บ Bilibili Tools321- `get_bilibili_user_info(uid)` - Get user profile information322- `get_my_bilibili_profile()` - Get your own profile323- `search_bilibili_videos(keyword)` - Search for videos324- `get_bilibili_video_info(bvid)` - Get detailed video information325- `get_bilibili_user_videos(uid)` - Get videos uploaded by a user326- `get_bilibili_following_list()` - Get your following list327- `get_bilibili_watch_history()` - Get your watch history328- `get_bilibili_favorites()` - Get your favorite videos329- `get_bilibili_liked_videos()` - Get your liked videos330- `get_bilibili_coin_videos()` - Get videos you've given coins to331- `get_bilibili_toview_list()` - Get your "to view later" list332333### ๐ต Spotify Tools (17 Total)334335**Authentication & Configuration (7 tools):**336- `test_spotify_credentials()` - Test API credentials337- `setup_spotify_oauth()` - Initialize OAuth flow338- `complete_spotify_oauth()` - Complete OAuth authentication339- `get_spotify_token_status()` - Get token status340- `refresh_spotify_token()` - Manual token refresh341342**Music Discovery & Social (9 tools):**343- `get_current_user_profile()` - Get your Spotify profile344- `get_user_top_items()` - Get top artists/tracks345- `get_user_recently_played()` - Get recently played music346- `get_followed_artists()` - Get followed artists347- `follow_artists_or_users()` / `unfollow_artists_or_users()` - Social features348349**Library & Playlists (6 tools):**350- `get_user_saved_tracks()` / `get_user_saved_albums()` - Library management351- `get_user_saved_shows()` / `get_user_saved_episodes()` - Podcast content352- `get_current_user_playlists()` / `get_playlist_items()` - Playlist operations353354### ๐ฌ Reddit Tools (25 Total)355356**Authentication & Configuration (6 tools):**357- `test_reddit_credentials()` - Test API credentials358- `setup_reddit_oauth()` - Initialize OAuth flow359- `complete_reddit_oauth()` - Complete OAuth authentication360- `get_reddit_token_status()` - Get token status361- `refresh_reddit_token()` - Manual token refresh362- `auto_refresh_reddit_token_if_needed()` - Auto token management363364**Account Information (6 tools):**365- `get_user_subreddits()` - Get subscribed communities366- `get_user_trophies()` - Get Reddit trophies and achievements367- `get_user_preferences()` - Get account settings368- `get_user_karma_breakdown()` - Get karma distribution369- `get_moderated_subreddits()` - Get moderated communities370- `get_contributor_subreddits()` - Get contributor permissions371372**Content & Activity (10 tools):**373- `get_user_submitted_posts()` - Get submitted posts374- `get_user_comments()` - Get comment history375- `get_user_overview()` - Get mixed activity timeline376- `get_saved_content()` - Get saved posts/comments377- `get_hidden_posts()` - Get hidden content378- `get_upvoted_content()` - Get upvoted content379- `get_downvoted_content()` - Get downvoted content380381**Messaging (3 tools):**382- `get_inbox_messages()` - Get inbox messages383- `get_unread_messages()` - Get unread messages384- `get_sent_messages()` - Get sent messages385386### ๐ง System Tools387- `test_connection()` - Test if MCP server is working388- `get_personalization_status()` - Get overall platform status389- `test_steam_credentials()` - Test Steam API configuration390- `test_youtube_credentials()` - Test YouTube API configuration391- `test_bilibili_credentials()` - Test Bilibili configuration392- `test_spotify_credentials()` - Test Spotify API configuration393- `test_reddit_credentials()` - Test Reddit API configuration394395## ๐ฌ Usage Examples396397### Gaming Analysis398- "What games have I been playing recently?"399- "Show me my most played Steam games"400- "What games do my friends recommend?"401- "Compare my game library with my friend's"402403### Video Content Discovery404- "Find YouTube videos about machine learning"405- "What are the trending videos on YouTube today?"406- "Show me my YouTube liked videos"407- "Find popular Bilibili videos about programming"408409### Personal Data Insights410- "Analyze my gaming habits and preferences"411- "What type of YouTube content do I watch most?"412- "Show me my Bilibili favorites and liked videos"413414### Music & Audio Analysis415- "What artists have I been listening to most lately on Spotify?"416- "Show me my recently played music and find patterns"417- "What are my top tracks from the past month?"418- "Find new music recommendations based on my Spotify data"419420### Reddit Activity Analysis421- "What communities am I most active in on Reddit?"422- "Show me my recent Reddit posts and comments"423- "What's my karma breakdown across different subreddits?"424- "Find my saved Reddit content and analyze my interests"425426## ๐ Development427428### Running the Server429430**If using conda:**431```bash432conda activate personalhub433python server.py434```435436**If using uv:**437```bash438uv run python server.py439```440441**If using pip with virtual environment:**442```bash443source venv/bin/activate # On Windows: venv\Scripts\activate444python server.py445```446447### Testing Configuration448Use these tools to test your setup:449```python450# Test individual platforms451test_steam_credentials()452test_youtube_credentials()453test_bilibili_credentials()454test_reddit_credentials()455456# Check overall status457get_personalization_status()458```459460### Adding New Platforms4611. Create a new `platform_mcp.py` file4622. Implement the platform-specific tools using `@mcp.tool()` decorator4633. Add setup function to `server.py`4644. Update configuration files and documentation465466## ๐ Privacy and Security467468- **Local Storage**: All API keys and tokens are stored locally on your machine469- **No Data Transmission**: Your personal data is never transmitted to third parties470- **Direct API Calls**: All API calls are made directly from your machine to the respective platforms471- **Secure Configuration**: Use environment variables or local config files472- **Regular Updates**: Rotate API keys and tokens regularly for security473474### Security Best Practices4751. **Don't commit sensitive files**: Ensure `config`, `.env`, `myinfo.json`, and `youtube_tokens.json` are in `.gitignore`4762. **Update cookies regularly**: Bilibili cookies expire and need periodic updates4773. **Use environment variables**: In production, use system environment variables4784. **File permissions**: Ensure config files are only readable by you4795. **YouTube token security**: The system automatically manages OAuth2 tokens securely in local files4806. **Gradual configuration**: You can configure platforms incrementally - missing credentials won't cause errors481482## ๐ Troubleshooting483484### Common Issues485486**Q: Bilibili cookies not working?**487A: Cookies expire regularly. Re-extract them from your browser and update your config.488489**Q: Steam API rate limits?**490A: Steam API has rate limits. Avoid frequent calls and implement reasonable delays.491492**Q: YouTube API quota exceeded?**493A: YouTube API has daily quotas. You can request quota increases or optimize your usage.494495**Q: YouTube OAuth2 token expired?**496A: The system automatically refreshes expired tokens. If manual refresh is needed, use `refresh_youtube_token()`.497498**Q: Can I use only some platforms?**499A: Yes! You can configure only the platforms you want to use. Missing credentials won't cause errors.500501**Q: How to verify my configuration?**502A: Use the test tools or call `get_personalization_status()` to check all platforms.503504### Getting Help5051. Check configuration file format5062. Verify API keys and cookies are valid5073. Review MCP server logs5084. Use test tools to validate each platform configuration509510## ๐ค Contributing511512Contributions are welcome! Here's how you can help:5135141. **Fork the repository**5152. **Create a feature branch**: `git checkout -b feature/amazing-feature`5163. **Make your changes** and add tests if applicable5174. **Commit your changes**: `git commit -m 'Add amazing feature'`5185. **Push to the branch**: `git push origin feature/amazing-feature`5196. **Open a Pull Request**520521### Adding New Platforms522523Want to add support for a new platform? Follow these steps:5245251. Create a new `platform_mcp.py` file (e.g., `spotify_mcp.py`)5262. Implement platform-specific tools using the `@mcp.tool()` decorator5273. Add a setup function and integrate it in `server.py`5284. Update configuration files and documentation5295. Add tests and examples530531## ๐ License532533This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.534535## ๐ Acknowledgments536537- [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) for the amazing protocol538- [Anthropic](https://www.anthropic.com/) for Claude and MCP development539- All the platform APIs that make this integration possible540541## โญ Star History542543If you find this project useful, please consider giving it a star on GitHub!544545---546547**Made with โค๏ธ for connecting your digital life with AI**548549550551552553554555556557558559560561562563
Full transparency โ inspect the skill content before installing.