Personal Intelligence MCP
Connects to a user's Spotify account through a per-user OAuth flow (with token refresh) and exposes normalized listening data, e.g. a get_recent_activity tool that lets the AI client answer questions like what the user has been listening to lately.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Personal Intelligence MCPwhat have I been listening to lately?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Personal Intelligence MCP
A multi-tenant Personal Context Platform. Phase 1: single connector (Spotify), exposed to any MCP-compatible AI client, with per-user OAuth.
Architecture
api/ FastAPI backend: user auth, Spotify OAuth flow, DB models
connectors/ One folder per data source. Phase 1 = spotify only.
mcp_server/ The MCP server that exposes tools to AI clients (Claude, etc.)Each layer is independently swappable:
apiowns who the user is and how their tokens get stored.connectors/<source>owns how to talk to that provider's API and returns normalized data — it doesn't know about users or MCP.mcp_serverowns how an AI client asks for this user's context — it resolves a user identity, calls into the connector layer, and returns MCP tool results.
Related MCP server: Spotify MCP
Setup
Copy
.env.exampleto.envand fill in your Spotify Client ID/Secret (from https://developer.spotify.com/dashboard) and generate anENCRYPTION_KEY(see comment in the file for how).Create a virtualenv and install dependencies:
python3 -m venv .venv && source .venv/bin/activate pip install -r requirements.txtInitialize the database (SQLite file, local dev only):
python -m api.db initRun the API server (handles login + Spotify OAuth):
uvicorn api.main:app --reload --port 8000In a separate terminal, run the MCP server:
python -m mcp_server.serverVisit
http://127.0.0.1:8000/auth/spotify/login?user_id=<your_user_id>to walk through the OAuth grant. (Dev-mode auth stub — seeapi/auth.py— issues a user_id without a real login page yet.)Point your MCP client (Claude Desktop / Claude Code config) at the MCP server and ask it something like "what have I been listening to lately."
What's stubbed vs. real in this scaffold
Real: DB schema, Spotify OAuth flow, token refresh, one working MCP tool (
get_recent_activity) backed by real Spotify data.Stubbed:
api/auth.pyissues a fake user_id instead of integrating a real auth provider (Clerk/Auth0/Supabase Auth) — swap this in before you have real users. The MCP server's user-identity resolution (mcp_server/identity.py) currently trusts a passed-in API key looked up directly in the DB; harden this before exposing it publicly.
Next steps (not in this scaffold)
Real auth provider integration
Token encryption using a KMS instead of a local Fernet key
Second connector (Reddit) to prove the normalization layer generalizes
Deploy to Fly.io / Railway
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Personal context and preferences for AI via OAuth-approved profile sections and taste data.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Related MCP Servers
- FlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants like Claude Desktop to interact with Spotify's music streaming service, supporting playback control, playlist management, music search, and user profile access.412-
- FlicenseNot gradedqualityDmaintenanceEnables remote interaction with Spotify through the Model Context Protocol, allowing users to search tracks, control playback, and manage playlists with per-user OAuth authentication. It is hosted on Cloudflare Workers and supports remote MCP over HTTP for compatible clients.2-
- AlicenseNot gradedqualityDmaintenanceEnables control of Spotify playback, track search, and user profile retrieval via MCP tools with automatic OAuth token management.383MIT
- AlicenseNot gradedqualityCmaintenanceA robust MCP server that connects Spotify playback, search, and library management to LLM agents via tools, with dual authentication and reliable token handling.2MIT