Overview
Hevy HTTP MCP is configured entirely through environment variables. All credentials and server settings are loaded from a.env file or your system environment, ensuring no secrets are committed to your codebase.
Environment Setup
Create a.env file in your project root:
.env with your actual values.
Required Variables
Your Hevy API key for authenticating with the Hevy API.How to get it: Visit hevy.com/settings?developer (requires Hevy Pro subscription)
A secret key that MCP clients must send to access this server. Choose any secure random string.
Optional Variables
HTTP port the server listens on.
Hostname to bind to. Use
0.0.0.0 to listen on all network interfaces.For local development, use
127.0.0.1. For remote access or Docker deployments, use 0.0.0.0.Logging verbosity level.Options:
debug | info | warn | errorComplete Example
Here’s a complete.env file with all variables:
Configuration Loading
The server validates all required environment variables at startup. If any required variable is missing, the server will exit with an error message:Security Best Practices
- Generate strong keys: Use a password manager or
openssl rand -hex 32to generate secure API keys - Rotate regularly: Change your
MCP_API_KEYperiodically, especially if you suspect it’s been compromised - Restrict access: Keep your
HEVY_API_KEYprivate—it provides full access to your Hevy workout data - Use environment-specific configs: Use different
.envfiles for development, staging, and production