Skip to main content

PureGym Python client and MCP server for class discovery and booking management

Project description

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

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.

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.

Public read-only hosting:

  • Hosted endpoint: https://puregym-mcp.jorgesintes.dev/mcp
  • Prefer anonymous mode for public deployments.

Security note:

  • Do not expose a publicly reachable deployment configured with your personal PureGym credentials.
  • Keep authenticated deployments private unless you have proper access control in front of them.

Example commands:

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

Python Library

The package also exposes a reusable client and service layer:

from puregym_mcp import PureGymClient, PureGymService

client = PureGymClient()
service = PureGymService(client)

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:

docker run --rm -p 8000:8000 \
  -e PUREGYM_USERNAME=your-email \
  -e PUREGYM_PASSWORD=your-password \
  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.2.0-py3-none-any.whl puregym-mcp --transport stdio

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

puregym_mcp-0.2.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

puregym_mcp-0.2.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file puregym_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: puregym_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for puregym_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3961780c10d1f80fdf2690cfc33607955f33a3e7d4a646784a4481bc87aac68b
MD5 76ebffe2f84bfde8c6be040d036051ea
BLAKE2b-256 0e8b46191815909ef9b158bcbb5f4e144a08c62a1d600ccd4774acb7fda3c93c

See more details on using hashes here.

Provenance

The following attestation bundles were made for puregym_mcp-0.2.0.tar.gz:

Publisher: publish.yml on JorgeSintes/puregym-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file puregym_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: puregym_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for puregym_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 03d6a837c5177f648d25df73602ab10a98cd0cb55aac4de6f5fcaf281de0a523
MD5 6b278f3a334363e3ca5e6038020f7a64
BLAKE2b-256 3f6b14f3eb337e0e8c4ff4aba1406b6993e595038349c7e39ea7c17dc60f292f

See more details on using hashes here.

Provenance

The following attestation bundles were made for puregym_mcp-0.2.0-py3-none-any.whl:

Publisher: publish.yml on JorgeSintes/puregym-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page