skip to content

openGym

An agent for training, for requests such as “log today’s workout”.

MCP server github.com/DuarteSantos8/openGym, as its docs/MCP_REMOTE.md describes
Transport Streamable HTTP
Authentication bearer

The remote MCP server of openGym is described in docs/MCP_REMOTE.md of its repository.

In Compose, beside openGym’s own API and the server of Ambrogio, as docs/MCP_REMOTE.md of its repository describes:

services:
opengym-mcp:
image: ghcr.io/duartesantos8/opengym-mcp:1.4.5
environment:
MCP_PORT: "3100"
OPENGYM_API_URL: http://<opengym-api-host>:3000
ORIGIN: <address at which the browser opens openGym>

It serves Streamable HTTP on port 3100 at /mcp, so the server of Ambrogio reaches it at http://opengym-mcp:3100/mcp, the name of its Compose service on a network the two share; from another host, use the name or address of the host that runs it, with the same port and path. The MCP server holds no credential of its own: each request acts with the token Ambrogio sends.

  1. Run the MCP server, as Run the MCP server shows.

  2. Create the token in openGym, under Settings, Integrations, API tokens: a scoped token, ogt_..., with the categories Ambrogio may see or change, which the MCP server passes on to openGym. Write it in .env as OPENGYM_MCP_TOKEN, and pass the variable to the server of Ambrogio in compose.yaml:

    services:
    server:
    environment:
    OPENGYM_MCP_TOKEN: ${OPENGYM_MCP_TOKEN:?}
  3. Add the agent file agents/opengym.json, with the address of the Streamable HTTP endpoint of the MCP server in mcp.url:

    {
    "description": "Answers the household's requests about training, with the tools of openGym.",
    "instructions": "You handle the household's requests about training with the tools of openGym. Requests may come from speech recognition and contain misheard words; interpret them in context. Answer briefly.",
    "llm": {
    "provider": "mistral",
    "model": "mistral-medium-latest",
    "apiKeyEnv": "MISTRAL_API_KEY"
    },
    "maxToolCalls": 4,
    "mcp": {
    "url": "http://opengym-mcp:3100/mcp",
    "auth": {
    "type": "bearer",
    "tokenEnv": "OPENGYM_MCP_TOKEN"
    }
    }
    }
  4. Restart with docker compose up -d.

Authentication: a bearer token, which the agent file names through the variable OPENGYM_MCP_TOKEN. The description, the instructions, the language model and maxToolCalls are an example: adapt them to the household. See Agents for every field of the file.