@striderlabs/mcp-planetfitness
v1.0.0
Published
MCP server for Planet Fitness gym membership management
Maintainers
Readme
@striderlabs/mcp-planetfitness
MCP (Model Context Protocol) server for Planet Fitness gym membership management. Automates interactions with planetfitness.com using Playwright browser automation.
Tools
| Tool | Description | Login Required |
|------|-------------|----------------|
| get_membership | Get membership details, status, plan, home club | Yes |
| check_in | Check in at a club location | Yes |
| find_clubs | Search nearby Planet Fitness locations | No |
| get_club_hours | Get hours for a specific club | No |
| book_class | Book a fitness class (PE@PF program) | Yes |
Installation
npm install @striderlabs/mcp-planetfitness
# or from tarball:
npm install striderlabs-mcp-planetfitness-1.0.0.tgzConfiguration
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| PF_EMAIL | For auth tools | Your Planet Fitness account email |
| PF_PASSWORD | For auth tools | Your Planet Fitness account password |
| BROWSERBASE_CDP_URL | Optional | Browserbase CDP WebSocket URL for remote browser |
Browserbase Setup
For production use, connect via Browserbase:
export BROWSERBASE_CDP_URL="wss://connect.browserbase.com?apiKey=YOUR_KEY&sessionId=SESSION_ID"Without BROWSERBASE_CDP_URL, the server falls back to a local headless Chromium instance (requires Playwright browsers to be installed: npx playwright install chromium).
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"planetfitness": {
"command": "node",
"args": ["/path/to/node_modules/@striderlabs/mcp-planetfitness/dist/index.js"],
"env": {
"PF_EMAIL": "[email protected]",
"PF_PASSWORD": "yourpassword",
"BROWSERBASE_CDP_URL": "wss://connect.browserbase.com?apiKey=..."
}
}
}
}Usage with MCP CLI
[email protected] PF_PASSWORD=pass node dist/index.jsTool Details
get_membership
Returns member name, status, plan type, home club, member number, join date, and next billing date.
{}check_in
Check in at your home club or a specific club.
{
"club_id": "optional-club-id"
}find_clubs
Search for Planet Fitness locations near you.
{
"location": "Austin, TX",
"radius_miles": 10,
"limit": 10
}get_club_hours
Get operating hours for a specific club.
{
"club_id": "club-id-from-find-clubs"
}book_class
Book a PE@PF group fitness class (available at select locations).
{
"club_id": "optional-club-id",
"class_name": "Yoga",
"date": "2025-01-15",
"time_preference": "morning"
}Browser Automation Pattern
All tools use Playwright to automate a browser session:
// Connect via Browserbase CDP
const browser = await chromium.connectOverCDP(process.env.BROWSERBASE_CDP_URL);
// Or local headless
const browser = await chromium.launch({ headless: true });The server navigates planetfitness.com, performs login when needed (storing credentials only in environment variables), and extracts data from the rendered page.
Notes
- Group fitness classes (PE@PF) are only available at select Planet Fitness locations
- Check-in via web automation may vary by club — the Planet Fitness app barcode scanner is the primary check-in method
- Web scraping selectors may need updates if Planet Fitness changes their website structure
- For production deployments, Browserbase is recommended over local headless for reliability and anti-bot bypass
License
MIT
