vespo92/MindbodyMCP
If you are the rightful owner of MindbodyMCP 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.
The Mindbody MCP Server is a high-performance server designed to facilitate interactions between AI assistants and the Mindbody API, specifically for managing fitness and wellness studios.
Mindbody MCP Server
A high-performance Model Context Protocol (MCP) server that enables AI assistants to interact with the Mindbody API for fitness and wellness studio management.
๐ Features
- โก Lightning Fast: Built with Bun for 4x faster startup times
- ๐ Secure Authentication: OAuth 2.0 with automatic token refresh
- ๐พ Smart Caching: Intelligent caching to respect API rate limits
- ๐ก๏ธ Robust Error Handling: Graceful failures with clear error messages
- ๐ Rich Data: Comprehensive schedule data with summaries and insights
- ๐ Auto-Retry: Built-in retry logic for transient failures
๐ฆ Installation
Prerequisites
- Bun (recommended) or Node.js 18+
- Mindbody API credentials
- Claude Desktop
Quick Start
# Clone the repository
git clone https://github.com/yourusername/mindbody-mcp.git
cd mindbody-mcp
# Install dependencies (using Bun)
bun install
# Copy environment variables
cp .env.example .env
# Edit .env with your Mindbody credentials
# Then run the development server
bun run dev
Using Node.js Instead
# Switch to Node.js configuration
./switch.bat node # Windows
# or manually: cp package.node.json package.json
# Install and build
npm install
npm run build
npm start
โ๏ธ Configuration
Environment Variables
Create a .env
file with your Mindbody credentials:
# Required
MINDBODY_API_KEY=your_api_key_here
MINDBODY_SITE_ID=-99
MINDBODY_SOURCE_NAME=your_source_name
MINDBODY_SOURCE_PASSWORD=your_source_password
# Optional
MINDBODY_API_URL=https://api.mindbodyonline.com/public/v6
CACHE_TTL_MINUTES=5
RATE_LIMIT_BUFFER=100
Claude Desktop Integration
Add to your Claude Desktop configuration:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mindbody": {
"command": "bun",
"args": ["run", "C:\\path\\to\\mindbody-mcp\\src\\index.ts"],
"env": {
"MINDBODY_API_KEY": "your_api_key",
"MINDBODY_SITE_ID": "-99",
"MINDBODY_SOURCE_NAME": "your_source_name",
"MINDBODY_SOURCE_PASSWORD": "your_source_password"
}
}
}
}
๐ ๏ธ Available Tools
getTeacherSchedule
Retrieves a teacher's class schedule for any date range.
Parameters:
teacherName
(string, required): The teacher's full namestartDate
(string, optional): Start date in YYYY-MM-DD formatendDate
(string, optional): End date in YYYY-MM-DD format
Example Usage:
"Get Alexia Bauer's schedule for this week"
"Show me John Smith's classes for next Monday"
"What is Sarah teaching between March 15-22?"
Coming Soon
- ๐
getClassSchedule
- View all classes by date/location - ๐
createSubstitution
- AI-powered substitute teacher matching - ๐
updateEvent
- Modify class details and descriptions - ๐ฅ
getClientBookings
- View and manage client reservations - ๐ฐ
generateReports
- Financial and attendance analytics
๐๏ธ Project Structure
mindbody-mcp/
โโโ src/
โ โโโ index.ts # MCP server entry point
โ โโโ api/
โ โ โโโ auth.ts # OAuth token management
โ โ โโโ client.ts # Axios client with retry logic
โ โโโ cache/
โ โ โโโ index.ts # In-memory caching system
โ โโโ tools/
โ โ โโโ teacherSchedule.ts
โ โโโ types/
โ โ โโโ mindbody.ts # TypeScript type definitions
โ โโโ utils/
โ โโโ dates.ts # Date helper functions
โโโ .env.example # Environment variable template
โโโ bunfig.toml # Bun configuration
โโโ Claude.md # AI assistant instructions
โโโ package.json # Project dependencies
๐งช Testing
# Test the teacher schedule tool
bun run test:tool
# Run performance benchmark
bun run benchmark
# Compare Bun vs Node.js performance
./switch.bat benchmark
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Workflow
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Adding New Tools
- Create a new file in
src/tools/
- Follow the pattern from
teacherSchedule.ts
- Add types to
src/types/mindbody.ts
- Register in
src/index.ts
- Update documentation
๐ Performance
Using Bun provides significant performance improvements:
Metric | Node.js | Bun | Improvement |
---|---|---|---|
Cold Start | ~800ms | ~200ms | 4x faster |
First API Call | ~1200ms | ~400ms | 3x faster |
Memory Usage | ~50MB | ~30MB | 40% less |
๐ Security
- OAuth 2.0 authentication with automatic token refresh
- Environment variables for sensitive configuration
- No credentials stored in code
- Automatic token expiration handling
- Input validation on all user inputs
๐ License
This project is licensed under the MIT License - see the file for details.
๐ Acknowledgments
- Anthropic for the MCP specification
- Mindbody for their comprehensive API
- Bun for the incredible runtime performance
๐ Support
- ๐ง Email:
- ๐ฌ Discord: Join our server
- ๐ Issues: GitHub Issues
Built with โค๏ธ for the fitness and wellness community