Docs navigation
Model Context Protocol (MCP) lets AI coding agents call external tools directly. Learn more →
MCP Server
Give your AI coding agent direct access to the exercise library
Install this once and your AI agent stops making up exercises.
Without MCP
Your agent guesses exercise names from training data. Wrong reps, made-up form tips, no videos.
With MCP
Your agent calls real endpoints. Actual form cues, real muscle targeting, real video URLs.
Install
Step 1. Open your MCP client config file
- Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.json - Claude Code:
.mcp.jsonat the root of your project - Cursor:
.cursor/mcp.jsonat the root of your project - Codex, Windsurf, Cline, Zed: see your client’s MCP config docs — the JSON shape below is identical
On macOS, ~/Library/Application Support is hidden in Finder. Open it with ⌘⇧G and paste the path.
Step 2. Paste this into the file
If the file already has an mcpServers block, add "exerciseapi": { ... } inside it. Otherwise paste the whole thing.
{
"mcpServers": {
"exerciseapi": {
"command": "npx",
"args": ["-y", "@exerciseapi/mcp-server"],
"env": {
"EXERCISEAPI_KEY": "YOUR_API_KEY"
}
}
}
}Replace YOUR_API_KEY with the key from your dashboard. Keys are only shown in full once at generation time — regenerate if you’ve lost it.
Step 3. Restart your client fully
On macOS, ⌘Q — closing the window isn’t enough.
Step 4. Test it
Ask your agent:
If it returns real exercise names with instructions, you’re done. If it hallucinates, see troubleshooting below.
Available tools
| Tool | What it does |
|---|---|
| search_exercises | Search by name, category, muscle, equipment, or difficulty. Returns up to 100 exercises. |
| get_exercise | Fetch full details for a single exercise by ID — instructions, form tips, safety notes, variations, video URL. |
| list_categories | List all 12 exercise categories with counts. |
| list_muscles | List anatomical muscles available as filters. |
| list_equipment | List equipment types available as filters. |
| get_stats | Library stats: total count, breakdown by category. |
Try it
After installing, try these prompts in your AI coding agent:
- “Find me five chest exercises I can do with just dumbbells, intermediate level.”
- “I’m building a beginner full-body workout app. Pull 8 exercises across push, pull, and legs.”
- “What’s the difference between a barbell bench press and a dumbbell bench press?”
Troubleshooting
“EXERCISEAPI_KEY not set”
Your config JSON is missing the env block or the key name is misspelled. Must be exactly EXERCISEAPI_KEY.
“API key is invalid”
Generate a new key at /dashboard and replace it in the config.
“Daily quota reached”
Free tier is 100 req/day. Upgrade at /pricing.
Config JSON syntax error
A trailing comma or missing brace will make your client silently skip the server. Validate the JSON, then restart.
Client didn’t restart fully
This is ~80% of install issues. On macOS, closing the window is not enough; use ⌘Q and relaunch.
Agent hallucinates exercises anyway
In the first message of a conversation, say “use the exerciseapi tools” explicitly. Most clients are better at tool use after one successful call.
MCP server isn’t in your client’s tool list
Claude Desktop shows loaded servers via the plug icon in the input box. If exerciseapi isn’t there, it didn’t start — check the config path and JSON syntax.