# JustGains

Connect workouts, training history, and meal logging from JustGains directly to your IDE. An AI agent can build and save workouts, track progress, search exercises, and log meals from within Claude Code or other MCP-compatible editors.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: JustGains
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/JustGains/justgains-connector
- Updated: 2026-10-13
- HTML: https://affpapa.org/en/nevibecode/mcp/justgains

## What it does

JustGains publishes an official MCP server that lets an agent read and write training data in your JustGains account. The agent can generate a workout from a text description and save it, fetch completed sessions and personal records, search the exercise library, plan routes, and log meals with calorie estimates. Two deployment options: connect to the hosted endpoint at `https://justgains.com/connect/mcp` (nothing to install), or run a stdio server locally with Bun. The hosted server authenticates via browser OAuth; authentication credentials are never stored in this repository. The local stdio server, written in TypeScript on the MCP SDK, serves the same live tool catalog and executes calls through the JustGains API.

Workout plans and food entries sync to the mobile app. The server includes search and analysis tools: rank personal bests by exercise, fetch weekly volume and consistency metrics, and retrieve full training history. The hosted option works everywhere; running it locally lets you embed it in CI/CD pipelines or run fully offline with a stored refresh token.

## Requirements
- Remote server: `https://justgains.com/connect/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http mcp-server https://justgains.com/connect/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add justgains --url https://justgains.com/connect/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "justgains": {
            "url": "https://justgains.com/connect/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "justgains": {
            "type": "http",
            "url": "https://justgains.com/connect/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http justgains https://justgains.com/connect/mcp
```

## When to use it
- generate and save a workout from a text request
- track progress on a specific lift over a date range
- log a meal and get macro estimates
- search the exercise library by name or muscle group
- fetch weekly training volume and frequency summaries

## Example prompts
- Show me my completed workouts from the last seven days
- Log my breakfast in JustGains: two eggs, two slices of toast, coffee with milk

## Similar
- [Hevy MCP Server](https://affpapa.org/en/nevibecode/mcp/hevy-mcp-server.md) — MCP server · ★ 526
- [rp-diet](https://affpapa.org/en/nevibecode/skills/rp-diet.md) — skill · 472 installs
- [fitness-coach](https://affpapa.org/en/nevibecode/skills/fitness-coach.md) — skill · 822 installs
- [cronometer-api-mcp](https://affpapa.org/en/nevibecode/mcp/cronometer-api-mcp.md) — MCP server · ★ 66
- [firecrawl-build-interact](https://affpapa.org/en/nevibecode/skills/firecrawl-build-interact.md) — skill · 61300 installs
- [build-mcp-server](https://affpapa.org/en/nevibecode/skills/build-mcp-server.md) — skill · 6711 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
