exerciseapi

v1.0.5
io.github.westvegh/exerciseapi Checked 11 hours ago Published 2 hours ago

Search a library of 2,200 exercises across 12 categories from your AI coding agent.

Building a fitness, workout, training, rehab, or wellness app with Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline, or Zed? Stop asking your agent to make up exercise data. Install this MCP server and your agent gets six tools that pull real, structured exercises directly from the exerciseapi.dev library. LLMs hallucinate exercise instructions. They invent muscle groups. They mix up form cues. They'll happily tell you to do a "reverse-grip incline cable fly" with safety tips that could hurt someone. It's a thin wrapper around the exerciseapi.dev REST API.

Summary extracted from the README.

@exerciseapi/mcp-server

Official MCP server for exerciseapi.dev. Search a library of 2,200 exercises across 12 categories from your AI coding agent.

npm version License: MIT MCP

Building a fitness, workout, training, rehab, or wellness app with Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline, or Zed? Stop asking your agent to make up exercise data. Install this MCP server and your agent gets six tools that pull real, structured exercises directly from the exerciseapi.dev library.

Why this exists

LLMs hallucinate exercise instructions. They invent muscle groups. They mix up form cues. They'll happily tell you to do a "reverse-grip incline cable fly" with safety tips that could hurt someone.

This server gives your agent access to:

  • 12 categories including strength, yoga, mobility, physical therapy, calisthenics, plyometrics, stretching, Pilates, conditioning, Olympic weightlifting, powerlifting, and strongman.
  • Muscle data with anatomical names such as vastus lateralis. Every exercise lists its primary muscles. Records also include secondary muscle data.
  • Form tips, common mistakes, and safety notes for every exercise.
  • Search filters for category, muscle, equipment, and difficulty.
  • Demo videos for 333 of the 2,200 exercises. The rest return an empty videos array.

It's a thin wrapper around the exerciseapi.dev REST API. All filtering and search runs server-side — the MCP layer just makes it callable as tools.

Install

1. Get a free API key

Sign up at exerciseapi.dev/dashboard. The free tier gives you 100 requests/day, which is plenty for development. No credit card required.

2. Add to your MCP client

Open your client's MCP 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.json at the root of your project
  • Cursor: .cursor/mcp.json at the root of your project
  • Codex: ~/.codex/config.toml
  • Zed: your Zed settings.json
  • Windsurf, Cline: see your client's MCP config docs

For Claude Desktop, Claude Code and Cursor, paste the whole snippet only if your file is new or empty. If your file has an mcpServers block, add the exerciseapi entry inside it. Otherwise, add the mcpServers block with its exerciseapi entry inside the file's top-level object.

{
  "mcpServers": {
    "exerciseapi": {
      "command": "npx",
      "args": ["-y", "@exerciseapi/mcp-server"],
      "env": {
        "EXERCISEAPI_KEY": "exlib_your_key_here"
      }
    }
  }
}

For Codex, paste the TOML block at the end of config.toml, or run the command below the block to add the entry for you.

[mcp_servers.exerciseapi]
command = "npx"
args = ["-y", "@exerciseapi/mcp-server"]

[mcp_servers.exerciseapi.env]
EXERCISEAPI_KEY = "exlib_your_key_here"
codex mcp add exerciseapi --env EXERCISEAPI_KEY=exlib_your_key_here -- npx -y @exerciseapi/mcp-server

In Zed, add the exerciseapi entry under context_servers in settings.json.

{
  "context_servers": {
    "exerciseapi": {
      "command": "npx",
      "args": ["-y", "@exerciseapi/mcp-server"],
      "env": {
        "EXERCISEAPI_KEY": "exlib_your_key_here"
      }
    }
  }
}

3. Restart your agent

Restart your MCP client to load the new server. You're done.

Try it

After install, ask your agent something like:

Find me five chest exercises I can do with just dumbbells, intermediate level. For each one, show me the form tips.

Your agent will call search_exercises with the right filters, get real data back, and respond with accurate, library-sourced exercises. No hallucination.

Or:

I'm building a beginner full-body workout app. Pull 8 exercises across push, pull, and legs that don't need any equipment.

Or:

What's the difference between a barbell bench press and a dumbbell bench press in terms of muscle activation?

Tools

This server exposes six tools:

Tool What it does
search_exercises Search by name or filter by category, muscle, equipment, or difficulty. Each request returns up to 20 results on Free, 50 on Starter, or 100 on Pro and Business.
get_exercise Fetch full details for a single exercise by ID — instructions, form tips, safety notes, variations, video.
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-wide stats: total count, breakdown by category, video coverage.

The full tool reference is in the MCP docs page.

API access and plan limits

The REST API, docs, and llms.txt share one source. The docs describe the same exercise data you get through the MCP tools.

Plan Requests per day Max results per search
Free 100 20
Starter 1,000 50
Pro 10,000 100
Business 100,000 100

The Free plan requires no credit card and gives you access to the first 500 results.

Configuration

Required env vars

Var Description
EXERCISEAPI_KEY Your API key from exerciseapi.dev/dashboard. Required. The server will exit on startup if it's missing.

Optional env vars

Var Default Description
EXERCISEAPI_BASE_URL https://api.exerciseapi.dev Override the API base URL. Useful for self-hosting or testing against staging.

Troubleshooting

"EXERCISEAPI_KEY environment variable not set" You forgot to add the key to your MCP client config, or you didn't restart the client after adding it. Check that EXERCISEAPI_KEY is set to your API key in your config file, then restart your client.

"API key is invalid" The key was rejected. Generate a new one at exerciseapi.dev/dashboard and update your config.

"Daily quota reached" You've reached the Free plan's limit of 100 requests per day. Wait until the limit resets at midnight UTC, or upgrade your plan.

The agent isn't using the tools Two common causes: (1) the server didn't start — check your client's MCP server logs, usually in the developer console or a log file. (2) The agent doesn't think the tools are relevant. Try asking more explicitly: "Use the exerciseapi tools to find me…"

Cold start is slow on first run npx -y @exerciseapi/mcp-server downloads the package the first time you use it. To skip the download on every restart, install globally: npm install -g @exerciseapi/mcp-server, then change command to exerciseapi-mcp in your config.

Direct API access (no MCP)

If you'd rather hit the REST API directly instead of using MCP — for example, you're building a server-side integration or you're not on a supported MCP client — see exerciseapi.dev/docs. The same API key works for both.

There's also a universal copy-paste prompt on the landing page you can drop into any AI coding tool to get a working integration in one shot, no MCP required.

Contributing

Issues and PRs welcome. This server is intentionally a thin wrapper — if there's logic you want to change, it probably belongs in the REST API (private repo). Open an issue first if you're not sure.

License

MIT © Vegh Labs LLC


Built by West Vegh. If this saves you a weekend of building exercise data infrastructure, say hi on the dashboard or shoot me a note at west@veghlabs.com.