skip to content

wger

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

MCP server github.com/wger-project/mcp-server
Transport Streamable HTTP
Authentication bearer

In Compose, beside the server of Ambrogio:

services:
wger-mcp:
image: ghcr.io/wger-project/mcp-server:2.7.1
environment:
WGER_BASE_URL: http://<wger-host>
WGER_API_KEY: ${WGER_API_KEY:?}
MCP_AUTH: static_token
MCP_STATIC_TOKEN: ${WGER_MCP_TOKEN:?}

It serves Streamable HTTP on port 8765 at /mcp, so the server of Ambrogio reaches it at http://wger-mcp:8765/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. MCP_AUTH: static_token selects the mode in which the server accepts the bearer token of MCP_STATIC_TOKEN.

WGER_API_KEY is how the MCP server signs in to wger: the API key of the account, created in wger under Settings, API.

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

  2. Choose the token that the MCP server accepts, a random value such as the output of openssl rand -hex 32, of at least 32 characters: the same value goes to the MCP server, as MCP_STATIC_TOKEN above, and to Ambrogio. Write it in .env as WGER_MCP_TOKEN, and pass the variable to the server of Ambrogio in compose.yaml:

    services:
    server:
    environment:
    WGER_MCP_TOKEN: ${WGER_MCP_TOKEN:?}
  3. Add the agent file agents/wger.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 wger.",
    "instructions": "You handle the household's requests about training with the tools of wger. 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://wger-mcp:8765/mcp",
    "auth": {
    "type": "bearer",
    "tokenEnv": "WGER_MCP_TOKEN"
    }
    }
    }
  4. Restart with docker compose up -d.

Authentication: a bearer token, which the agent file names through the variable WGER_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.