Personal PB Vision MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Personal PB Vision MCP server
A small MCP server for one player's PB Vision library, hosted on Vercel and added to Claude as a custom connector. It lets Claude find all your recorded games, so you no longer have to paste video links one at a time. A scheduled Claude routine can then review each new game and keep a running list of things to work on.
Official API only. It uses PB Vision's Connected Apps OAuth API with the
profile:read,library:readandtrends:readscopes. All three are read-only.Works with PB Vision's own MCP. This server finds your games and returns your trends. For shot-by-shot analysis Claude passes each game's
videoIdandsessionNumto PB Vision's public MCP server (https://share.pb.vision/mcp), which you add as a second connector.Only you. Signing in to the connector means signing in to PB Vision. The first PB Vision account that connects claims the server, and any other account is refused (its token is revoked right away). You can set
OWNER_PBV_UIDto pin the owner explicitly.Stores almost nothing. Redis holds OAuth bookkeeping, short-lived rate-limit counters (keyed by a hash of the caller's IP), your PB Vision token (encrypted with AES-256-GCM), and the coach's own notes plus the list of game IDs it has reviewed. Game data is fetched live from PB Vision on every call and never cached.
Tools
Tool | What it does |
| Your games, newest first. A video with several games becomes one entry per game. Each entry has |
| Your folders, with a game count for each. |
| PB Vision's per-game trend data, ratings and stats. |
| Your PB Vision UID and display name. |
| The coach's running notes (markdown, up to 20k characters): focus areas, evidence, drills, progress. |
| Records which games the coach has reviewed, so |
The last three write only to this server's Redis, never to PB Vision.
Related MCP server: claudex-strava-mcp
Setup
You'll do six things: deploy to Vercel, add Redis, register a Connected App with PB Vision, set environment variables, connect in Claude, and (optionally) schedule the coach.
1. Deploy to Vercel
Fork or import this repo into Vercel (Add New → Project). Leave the framework as Other, since
vercel.jsonsets the build.Pick a project name that's unique to you, for example
pbvision-mcp-yourname. Your production address becomeshttps://pbvision-mcp-yourname.vercel.app. PB Vision matches the callback URL exactly, so settle on this name before registering.Deploy once. It will answer
server_misconfigureduntil the next steps are done; that's expected.
2. Add Redis
In the Vercel project, open Storage → Create Database → Upstash for Redis (the free plan is enough) and connect it to Production only. That adds KV_REST_API_URL and KV_REST_API_TOKEN. (UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN also work.)
Upstash's free plan allows only one database per account. If you already use it for another app, open Storage, pick that database, and connect it to this project instead of creating a new one. Every key this server writes starts with pbvision-mcp: (change it with REDIS_KEY_PREFIX), so it won't collide with the other app's keys.
3. Register a Connected App with PB Vision
Registration is manual. Apply at pb.vision/apps or email support@pb.vision with:
Display name: e.g. "Pickleball Coach MCP". It's shown on PB Vision's consent screen and in your Connected apps list.
Description: a personal MCP server that lists my own games and trends so my AI assistant can review them.
Redirect URI:
https://<your-vercel-address>/pbvision/callback, exactly as written.Client type: confidential (hosted backend; the secret stays on the server).
Scopes:
profile:read,library:read,trends:read.
PB Vision sends back a Client ID and a Client Secret. Keep both out of the repo and out of chats.
4. Set environment variables in Vercel
In Settings → Environment Variables, set these for Production only. If Preview builds had them, a preview could read your stored sign-in.
Variable | Value |
| from PB Vision |
| from PB Vision |
| a random string, e.g. the output of |
| recommended after your first sign-in: your PB Vision UID (see below) |
| optional: only if you use a custom domain (defaults to Vercel's production address) |
| optional: comma-separated list of MCP client callbacks. The default allows Claude ( |
| optional: any value (default |
Then Redeploy. Opening https://<your-vercel-address>/ should say "Personal PB Vision MCP server".
Pin the owner. After your first sign-in, copy the Redis key owner:pbv_uid from the Upstash console, or call the get_profile tool, then put that value in OWNER_PBV_UID and redeploy. Once that's set, a lost or reset Redis can't hand the server to another account.
Deployment protection. Under Settings → Deployment Protection, choose Standard Protection. Per-deployment URLs then sit behind Vercel's login, while your production address stays public for Claude.
5. Add the connectors in Claude
In Claude, open Settings → Connectors → Add custom connector. Give it a name (e.g. "PB Vision library") and the URL
https://<your-vercel-address>/mcp. Leave the advanced OAuth fields empty. Click Connect, approve on PB Vision's consent screen, and you're sent back to Claude.If you haven't already, add PB Vision's own MCP as a second custom connector:
https://share.pb.vision/mcp.Try: "List my last 10 PB Vision games, then analyze my dinking in the most recent one."
6. Optional: schedule the coach
Create a scheduled routine in Claude (for example weekly, or the morning after you usually play) with both connectors enabled. Use coach-routine.md as the prompt. Each run reads the coach's notes, finds games it hasn't reviewed, analyzes them with PB Vision's tools, updates the notes, and marks the games reviewed. You get a short report back.
Disconnecting
Remove the connector in Claude, and disconnect the app in PB Vision under Settings → Account → Connected apps. The second step revokes the PB Vision token.
To sign every MCP client out at once, change
SESSION_EPOCHand redeploy. Clients can also revoke their own tokens at/revoke(RFC 7009).To drop the stored sign-in, delete the
pbv:tokenkey in Upstash (andowner:pbv_uidif a different account should claim the server). Deletecoach:notesandcoach:reviewedto reset the coach.
Notes on PB Vision's API
PB Vision access tokens don't expire, and PB Vision issues no refresh tokens. If you disconnect in PB Vision, reconnect the connector in Claude.
Authorizing again with the same scopes returns the same token. Authorizing with different scopes issues a new token and invalidates the old one, so this server always asks for all three scopes.
PB Vision doesn't document rate limits or pagination for
/library/get, solist_gamesfetches the whole library on each call. The response shape of/trend/getisn't documented either, soget_trendspasses it through as is (truncated at 150k characters).When you authorize, PB Vision may attribute a referral to the app's registrant. See their guide for details.
Development
npm install
npm test # vitest, with a fake PB Vision API
npm run build # tsc → dist/, which api/index.js loads on VercelHow it fits together:
api/index.js: the single Vercel function.vercel.jsonrewrites every path to it.src/app.ts: router, CORS, and the stateless Streamable HTTP MCP endpoint at/mcp.src/oauth.ts: a minimal OAuth 2.1 server for MCP clients (discovery metadata, dynamic client registration limited to known callback URLs, PKCE S256, rotating refresh tokens, revocation). Sign-in is delegated to PB Vision through a second PKCE flow.src/pbvision.ts: the PB Vision Connected Apps client (OAuth code exchange, revoke, read-only API calls).src/mcp.ts: the tools.src/ratelimit.ts: per-caller limits on the public sign-in endpoints.
Adapted from the structure of a personal WHOOP MCP server. Not affiliated with or endorsed by PB Vision.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server for live sports data. Ask for scores, standings, player stats and Elo ratings across 9 sports directly from Claude or any MCP client. Backed by the Big Balls Sports API, with one unified schema for every sport.
tri-train is a training platform for triathletes that syncs activities from Strava and Garmin and exposes them to Claude through a remote MCP server. Ask Claude how your last block went, why your run pace dropped, or whether you are fresh enough for Sunday's race, and it answers from your real data: activities with laps and grade-adjusted pace, weekly load and the performance management chart (CTL/ATL/TSB), sleep, HRV and resting heart rate, and your race calendar with predictions. Claude can also act: create and adjust planned workouts with structured intervals, push them to your Garmin watch, add races and write notes. Every change is journaled and can be undone. Read and write access are separate OAuth scopes, and the server enforces them on every call. Built and hosted in Switzerland by a triathlete; data stays on our own servers (Swiss revDSG / GDPR).
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
- platform7nDeprecatedtech.p7n
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables Claude to access and query your Garmin Connect data, including sleep, activities, training load, and health metrics, through a set of read-only MCP tools.287MIT
- FlicenseAqualityNot gradedmaintenanceConnects Claude to your Strava fitness data, enabling natural language queries about your training history such as activities, stats, and routes.8-
- AlicenseBqualityBmaintenanceEnables Claude to access and query your Garmin Connect data—sleep, training, heart rate, and more—through a suite of read-only tools, with an optional write path for creating strength workouts.63MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to read Garmin Connect data such as activities, sleep, HRV, VO2 max and training readiness, and optionally view or manage TrainingPeaks workouts and sync them to a watch, over streamable HTTP secured with MCP OAuth 2.1 and GitHub login.MIT