Skip to main content
Glama
README.md
# TrainHeroic MCP server

Connect TrainHeroic to ChatGPT, Claude and any AI agent through Cotlet.dev. Read athlete readiness, compare team compliance, build sessions and assign programs in your own signed-in coach account. Calendar changes and messages ask for approval by default.

## What you can ask

> Show today's team readiness, lowest scores first.

> Compare session compliance across my teams over the past 30 days.

> Draft a TH Chat note to Varsity Strength and show it to me before sending.

## Connect in 2 minutes

Get your API key at https://cotlet.dev/app and export it as `COTLET_API_KEY`.

### ChatGPT

Settings → Apps & Connectors → Create, with connector URL `https://cotlet.dev/mcp/v1/connect`, then sign in with Cotlet.dev. No API key needed.

### Claude

Settings → Connectors → Add custom connector, with URL `https://cotlet.dev/mcp/v1/connect`, then sign in with Cotlet.dev.

### Claude Code

```bash
claude mcp add --transport http cotlet https://cotlet.dev/mcp/v1 --header "Authorization: Bearer $COTLET_API_KEY"
```

### Cursor

Copy `.cursor/mcp.json` from this repo into your project:

```json
{
  "mcpServers": {
    "cotlet": {
      "url": "https://cotlet.dev/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${COTLET_API_KEY}"
      }
    }
  }
}
```

## Run it locally (stdio)

This repo is a real MCP server. It speaks MCP over stdio, lists its TrainHeroic tools without any key, and forwards every tool call to the hosted Cotlet.dev server. The hosted URL above stays the recommended way. Use this when your client only starts local servers.

Run the included Python module with Python 3.10 or later:

```bash
python3 trainheroic_agent.py serve
```

Or with Docker:

```bash
docker build -t trainheroic-mcp .
docker run -i --rm -e COTLET_API_KEY trainheroic-mcp
```

Tools: `trainheroic_guide`, `trainheroic_status`, `trainheroic_open`, `trainheroic_read`, `trainheroic_click`, `trainheroic_type`, `trainheroic_close`. Without `COTLET_API_KEY` a tool call answers: "Set COTLET_API_KEY. Get a key at https://cotlet.dev/app".

## Command line

Python 3.10+, with no third-party runtime dependencies. Clone this repository and run:

```bash
export COTLET_API_KEY="your-key"
python3 trainheroic_agent.py connect   # ready config for ChatGPT, Claude, Claude Code and Cursor
python3 trainheroic_agent.py status    # is TrainHeroic ready in your Cotlet.dev account
python3 trainheroic_agent.py guide     # TrainHeroic screens and sign-in link
python3 trainheroic_agent.py read      # open TrainHeroic, read the page, close the browser
python3 trainheroic_agent.py tools     # list Cotlet.dev tools
python3 trainheroic_agent.py serve     # start the stdio MCP server (same as no argument)
```

## Questions from TrainHeroic users

**Which TrainHeroic account should I connect?**

Sign in with your own coach account at app.trainheroic.com in the Cotlet.dev Cloud Browser.

**Can the agent change programs or send messages?**

It can build sessions, assign programs and draft TH Chat messages. Write actions ask for your approval by default.

**Is Cotlet affiliated with TrainHeroic?**

No. Cotlet.dev is independent and not affiliated with TrainHeroic.

## Learn more

- [TrainHeroic integration and hosted tools](https://cotlet.dev/integrations/trainheroic-api-mcp-server)

---

More: https://cotlet.dev/integrations/trainheroic-api-mcp-server?utm_source=github&utm_medium=readme&utm_campaign=trainheroic

Request access: https://cotlet.dev/signup?app=trainheroic&utm_source=github&utm_medium=readme&utm_campaign=trainheroic

## Workflows on the hosted integration

The live integration page documents these coaching operations, selected from the live page:

- `get_compliance_analytics`
- `get_readiness_analytics`
- `get_lift_analytics`
- `review_athlete_logs`
- `export_athlete_list`
- `build_session`
- `manage_exercises`
- `copy_program`
- `assign_program`
- `delete_calendar_sessions`
- `manage_parent_calendars`
- `manage_teams`
- `add_athlete_access`
- `manage_access_codes`
- `archive_athletes`
- `reactivate_athletes`
- `send_message`

The local stdio adapter exposes seven browser helpers listed above. These helpers forward to Cotlet.dev; the workflow operations are documented on the hosted integration page.