Skip to main content
Glama

PureGym MCP

puregym-mcp is a Python package and Model Context Protocol server for browsing PureGym centers in Denmark, discovering classes, checking your bookings, and managing bookings from MCP-compatible clients.

This is an independent third-party project and is not affiliated with, endorsed by, or sponsored by PureGym. PureGym is a registered trademark of Pure Gym Limited.

Capabilities

The server exposes a small set of tools for public class discovery and optional authenticated booking actions.

Class discovery

Available without PureGym credentials:

  • get_capabilities

  • list_class_types

  • list_centers

  • search_classes

Booking management

Available when PUREGYM_USERNAME and PUREGYM_PASSWORD are configured:

  • list_my_bookings

  • book_class

  • cancel_booking

  • get_center_live_status - Real-time occupancy and capacity data

  • get_center_open_hours - Opening and staffed hours for a center

Related MCP server: LocalGym MCP Server

Modes

  • Anonymous mode exposes read-only tools and uses a 14-day search window.

  • Authenticated mode unlocks booking tools and expands the default search window to 28 days.

Authentication for HTTP Transports

When running over streamable-http or sse transports, the server requires Bearer token authentication in addition to PureGym credentials. This prevents unauthorized access to your booking capabilities when exposing the MCP server remotely.

Required environment variables for HTTP transports:

  • PUREGYM_USERNAME - Your PureGym account email

  • PUREGYM_PASSWORD - Your PureGym account password

  • MCP_AUTH_TOKEN - A secret Bearer token you choose (e.g., a random string)

Note: stdio transport requires no authentication and runs unauthenticated by default.

Connect from MCP clients (e.g., Mistral) using Simple Auth / HTTP Bearer Token with your MCP_AUTH_TOKEN.

Quickstart

For most users, the easiest setup is local stdio usage from an MCP-compatible client:

{
  "mcp": {
    "puregym": {
      "enabled": true,
      "type": "local",
      "command": ["uvx", "puregym-mcp"],
      "environment": {
        "PUREGYM_USERNAME": "your-username",
        "PUREGYM_PASSWORD": "your-password"
      }
    }
  }
}

The environment block is optional and only needed for authenticated features.

Remote Deployment

The server supports both streamable-http and sse for remote MCP clients.

Bearer Token Authentication

HTTP transports (streamable-http, sse) require Bearer token authentication to protect your booking capabilities:

export PUREGYM_USERNAME="your-email@example.com"
export PUREGYM_PASSWORD="your-password"
export MCP_AUTH_TOKEN="your-secret-bearer-token"

puregym-mcp --transport streamable-http --host 0.0.0.0 --port 8000 --streamable-http-path /mcp

Connect from MCP clients using Simple Auth or HTTP Bearer Token authentication with your MCP_AUTH_TOKEN.

Docker Compose Example

services:
  puregym-mcp:
    image: puregym-mcp
    environment:
      - PUREGYM_USERNAME=${PUREGYM_USERNAME}
      - PUREGYM_PASSWORD=${PUREGYM_PASSWORD}
      - MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN}
    ports:
      - "8000:8000"
    command:
      - --transport
      - streamable-http
      - --host
      - 0.0.0.0
      - --port
      - "8000"
      - --streamable-http-path
      - /mcp

Store sensitive values in a .env file (never commit this file):

PUREGYM_USERNAME=your-email@example.com
PUREGYM_PASSWORD=your-password
MCP_AUTH_TOKEN=your-secret-bearer-token-min-16-chars-recommended

Public Read-Only Hosting

  • Hosted endpoint: https://puregym-mcp.jorgesintes.dev/mcp

  • Runs in anonymous mode (no booking capabilities)

  • Use this for public class discovery only

Python Library

The package also exposes a reusable client and service layer:

from puregym_mcp import PureGymClient, PureGymService

# Anonymous client
client = PureGymClient()

# Authenticated client with custom timeout
client = PureGymClient(
    username="your-username",
    password="your-password",
    timeout=30.0  # seconds
)

service = PureGymService(client)

# Book and cancel return typed results
result = await service.book_class(booking_id, activity_id, payment_type)
print(result.participation_id)  # snake_case field

cancel_result = await service.cancel_booking(participation_id)
print(cancel_result.status)

Docker

Build the image:

docker build -t puregym-mcp .

Run a public read-only server:

docker run --rm -p 8000:8000 puregym-mcp

Run a private authenticated server (HTTP transport with Bearer token auth):

docker run --rm -p 8000:8000 \
  -e PUREGYM_USERNAME=your-email \
  -e PUREGYM_PASSWORD=your-password \
  -e MCP_AUTH_TOKEN=your-secret-token \
  puregym-mcp

Override the default container transport or path when needed:

docker run --rm -p 8000:8000 puregym-mcp \
  --transport sse \
  --host 0.0.0.0 \
  --port 8000 \
  --sse-path /sse

Development

Clone the repo and install dev dependencies:

uv sync --dev

Run from source:

uv run puregym-mcp --transport stdio

Run checks:

uv run pytest
uv run python -m compileall puregym_mcp tests
uv build

Test the built package locally before publishing:

uvx --from dist/puregym_mcp-0.3.0-py3-none-any.whl puregym-mcp --transport stdio

Run real API integration tests (requires credentials):

PUREGYM_USERNAME=your-username PUREGYM_PASSWORD=your-password uv run pytest tests/real_api -m real_api

MCP Inspector

Launch the Inspector against this repo:

npx @modelcontextprotocol/inspector \
  uv \
  --directory /path/to/puregym-mcp \
  run \
  puregym-mcp --transport stdio

Launch it in authenticated mode:

npx @modelcontextprotocol/inspector \
  -e PUREGYM_USERNAME=your-email \
  -e PUREGYM_PASSWORD=your-password \
  -- \
  uv \
  --directory /path/to/puregym-mcp \
  run \
  puregym-mcp --transport stdio

The Inspector UI opens at http://localhost:6274.

Available Tools

4 tools
get_capabilitiesA

Return server capabilities and the current PureGym search window.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says 'Return', which implies a read-only operation, but it does not describe side effects, authentication requirements, rate limits, or any constraints on when the returned search window is valid. The lack of additional behavioral context leaves important gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one focused sentence with no filler. The primary action ('Return server capabilities') is front-loaded, and the additional detail about the search window is delivered compactly. Every word contributes to understanding the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description must explain the return value, and it does only at a high level. 'Server capabilities' and 'current PureGym search window' are named but not detailed, so an agent may not know what fields or format to expect. For a zero-parameter tool this is adequate but still leaves interpretation room.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the description does not need to explain parameter behavior. The input schema is empty and schema description coverage is 100% trivially. The baseline of 4 applies here, and the description adds no confusion about parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return') and names a clear resource ('server capabilities and the current PureGym search window'). This distinguishes it from sibling tools like list_class_types and search_classes, which handle domain data rather than server-level capabilities. Even a null title does not obscure the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool — when an agent needs capabilities or the active search window — but it does not explicitly state usage context or contrast it with alternatives. There is no mention of prerequisites, ordering, or scenarios where a sibling should be preferred, leaving the inference entirely to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_centersB

List PureGym centers grouped by city or area.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, yet it only notes that centers are 'grouped by city or area'. It does not describe ordering, result size, whether grouping is fixed or selectable, or any operational limits. Since the output schema exists, return-structure details are off-loaded there, but the description still adds little behavioral nuance beyond the bare operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence with no wasted words; the verb and resource are front-loaded ahead of the grouping detail. It is appropriately sized for a zero-parameter tool, though slightly more structure (e.g., clarifying how grouping works) could nudge it higher.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with an output schema that presumably documents return values, the description covers the core purpose adequately. The phrase 'grouped by city or area' introduces minor ambiguity about whether grouping is a fixed hierarchy or a mode, and since there are no parameters to select a mode, this is left for the output schema to resolve. Reasonably complete but with a small gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, and schema description coverage is 100% (trivially, since there are no properties). Per the baseline for zero-parameter tools, a 4 is appropriate — there is nothing for the description to clarify, and the mention of 'grouped by city or area' hints at the fixed behavior but requires no parameter explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('List'), a concrete resource ('PureGym centers'), and a distinguishing detail (grouping by city or area). This differentiates it from siblings like get_capabilities, list_class_types, and search_classes, which target entirely different resources, so an agent can reliably select this tool for center discovery. It lacks explicit sibling naming but the resource distinction is obvious enough to make the purpose clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, no mention of alternatives, and no exclusions. The only signal is the resource name itself, so an agent must infer that this tool is for listing centers rather than, say, searching classes at a center. No guidance distinguishes appropriate use cases or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_class_typesA

List available PureGym class types grouped the same way as the site.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, 'List' clearly signals a non-mutating read, and 'grouped the same way as the site' discloses an important behavioral trait beyond the schema. It does not mention pagination or data freshness, but for a zero-parameter listing tool this is minor.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no filler. Every word earns its place, and the key scope and grouping behavior are stated immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with an output schema, the description fully covers what the tool does. The 'available' qualifier and grouping reference are enough for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so the description does not need to explain semantics. The baseline of 4 applies because the schema and description are both sufficient for a parameterless call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'List available PureGym class types.' The added grouping detail makes the tool's shape clear and distinguishes it from siblings like list_centers and search_classes by resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus alternatives, no exclusions, and no context tying it to a workflow. An agent must infer usage purely from the tool name and sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_classesC

Search upcoming classes, optionally filtered by class type, center, or date range.

ParametersJSON Schema
NameRequiredDescriptionDefault
to_dateNo
class_idsNo
from_dateNo
center_idsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It communicates a read-only operation on 'upcoming classes' and adds the 'upcoming' scope, but it does not disclose default date-range behavior, authentication needs, pagination, or result limits. Basic but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is an efficient single sentence with the action first and filters following. It is appropriately short and front-loaded, though the misleading 'class type' phrase prevents it from being perfectly clean.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has four optional parameters and no annotations, but the description leaves class_ids unexplained and mislabels one filter. An output schema exists, so return-value details are less critical, but the description is still insufficient for an agent to confidently compose requests across all parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description needs to compensate, but it only loosely maps 'center' and 'date range' to parameters. It never mentions class_ids and introduces 'class type' as a filter even though no such parameter exists, which could lead an agent to send an invalid argument.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description provides a clear verb and resource ('Search upcoming classes') and names potential filters, so an agent can identify this as a search operation. However, it says filtering by 'class type' while the schema only exposes class_ids, center_ids, and date fields, making the stated purpose partially inaccurate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool instead of siblings like list_class_types, list_centers, or get_capabilities. The description implies a general search use case but does not state exclusions, alternatives, or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.4.0
    • First observedget_capabilities
    • First observedlist_centers
    • First observedlist_class_types
    • First observedsearch_classes

TDQS

A3.5/5.0

Scored across 4 tools

Disambiguation5/5

Each tool focuses on a distinct concern: server capabilities, reference data for class types, reference data for centers, and class search. Even though search_classes can filter by class type or center, it does not overlap with the list tools because it returns dynamic schedule results.

Naming Consistency4/5

The naming pattern is mostly predictable: list_* for reference data and search_classes for the main query. The get_capabilities tool introduces a get_ prefix, which is a minor deviation, but the intent of each verb is clear and consistent with its purpose.

Tool Count5/5

Four tools is a well-scoped size for a focused class-search server. Each tool serves a clear purpose and there is no unnecessary redundancy or bloat.

Completeness4/5

The toolset covers the core class discovery workflow well: understand capabilities, browse class types, browse centers, and search for classes. A booking or class-detail tool would be a natural extension, but the current surface is not incomplete for a read-only schedule lookup server.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers