exerciseapi.dev

How do I give Claude Code, Cursor or Codex an exercise library for my app?

Connect your coding agent to exerciseapi.dev with the MCP server. It can look up exercises while you build, and your app can fetch the records by ID.

Give your agent exercises it can look up

The exerciseapi.dev MCP server lets your agent search 2,200 exercises across 12 disciplines from your conversation. When you ask it to build a workout, it can open each record and keep the exercise ID. That gives your app something it can look up later, even if two exercises have similar names.

Connect the MCP server

You’ll need Node.js 18 or later, which comes with npx. For Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline or Zed, the “MCP server for exercise data” link at the bottom of this page shows the config and where to put it. For Codex, replace YOUR_API_KEY with your key and run this command: codex mcp add exerciseapi --env EXERCISEAPI_KEY=YOUR_API_KEY -- npx -y @exerciseapi/mcp-server

The server starts with npx -y @exerciseapi/mcp-server and reads your key from EXERCISEAPI_KEY. After either setup, fully quit and reopen your client. Check that exerciseapi appears in its tool list. Keep any file that holds your key out of git.

What came back from the live library

On December 2, 2026, we called all six tools directly with MCP server version 1.0.6. In search_exercises, we set muscle to chest, equipment to dumbbell and difficulty to intermediate. We got nine exercises, including Dumbbell_Squeeze_Press. All nine listed only dumbbell under equipment, but their instructions also called for a bench.

A chest search with dumbbells and no difficulty filter came back empty, without an error. The filter needs the exact name. list_equipment returned 35 names, including dumbbell. Some names have no exercises yet.

We also tried a made-up ID with get_exercise. It returned “Exercise not found: Dumbbell_Super_Press_9000. Use search_exercises to find a valid ID.” The other tools let you look up muscle and category names with list_muscles and list_categories, or check counts with get_stats.

Give the agent a first workout to find

Your agent can still answer from memory. Ask it to use the library.

Use the exerciseapi tools to find three intermediate chest exercises for someone with dumbbells and a flat bench only. Call list_equipment before filtering by equipment. Open each record and read its instructions. Skip exercises that need anything else. Keep the IDs of the exercises you pick.

Look for a search_exercises call in your client. Check that each ID the agent names appears in the results.

Use the API when the app runs

Give your agent https://exerciseapi.dev/llms.txt for the REST endpoints, response fields, errors and rate limits. Have it store the chosen IDs and fetch each record with GET /v1/exercises/:id from your app’s server. The MCP config supplies the key only to the agent. Store a copy in an environment setting on your app’s server and send it in the X-API-Key header. This keeps the key out of the browser and the full library out of your code.

Try it with a free key

Get a free key from exerciseapi.dev and try the prompt above. You get 100 requests a day and up to 20 results per search. Each search_exercises or get_exercise call uses one request. No card required.