puregym-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@puregym-mcpFind yoga classes in Copenhagen tomorrow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Public read-only endpoint:
https://puregym-mcp.jorgesintes.dev/mcpPyPI: puregym-mcp
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_capabilitieslist_class_typeslist_centerssearch_classes
Booking management
Available when PUREGYM_USERNAME and PUREGYM_PASSWORD are configured:
list_my_bookingsbook_classcancel_bookingget_center_live_status- Real-time occupancy and capacity dataget_center_open_hours- Opening and staffed hours for a center
Related MCP server: LocalGym MCP Server
Modes
Anonymous modeexposes read-only tools and uses a 14-day search window.Authenticated modeunlocks 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 emailPUREGYM_PASSWORD- Your PureGym account passwordMCP_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 /mcpConnect 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
- /mcpStore 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-recommendedPublic Read-Only Hosting
Hosted endpoint:
https://puregym-mcp.jorgesintes.dev/mcpRuns 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-mcpRun 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-mcpOverride 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 /sseDevelopment
Clone the repo and install dev dependencies:
uv sync --devRun from source:
uv run puregym-mcp --transport stdioRun checks:
uv run pytest
uv run python -m compileall puregym_mcp tests
uv buildTest the built package locally before publishing:
uvx --from dist/puregym_mcp-0.3.0-py3-none-any.whl puregym-mcp --transport stdioRun real API integration tests (requires credentials):
PUREGYM_USERNAME=your-username PUREGYM_PASSWORD=your-password uv run pytest tests/real_api -m real_apiMCP Inspector
Launch the Inspector against this repo:
npx @modelcontextprotocol/inspector \
uv \
--directory /path/to/puregym-mcp \
run \
puregym-mcp --transport stdioLaunch 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 stdioThe Inspector UI opens at http://localhost:6274.
Available Tools
4 toolsget_capabilitiesA
Return server capabilities and the current PureGym search window.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| to_date | No | ||
| class_ids | No | ||
| from_date | No | ||
| center_ids | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v0.4.0- First observed
get_capabilities - First observed
list_centers - First observed
list_class_types - First observed
search_classes
TDQS
Scored across 4 tools
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.
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.
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.
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
Related MCP Connectors
Danish grocery catalog as MCP tools: live offers across all major chains, stores, EAN lookup, stock.
MCP server for Zooza — class scheduling, attendance, and booking for activity businesses.
- MyoAmigoOAuthcom.myoamigo
Agent-first strength-training platform across iOS, Web & MCP: read & write workouts, PRs & plans.
Wger MCP — wraps wger Workout Manager REST API (free, no auth for read)
Related MCP Servers
- FlicenseBqualityDmaintenanceMCP server for integrating with the EVO gym management API, enabling access control, member management, activity scheduling, sales, and workout management through natural language.12-
- AlicenseNot gradedqualityDmaintenanceRead-only MCP server for searching, comparing, and recommending UK gyms using the public LocalGym Agent API.36 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying Denmark's official open energy data from Energinet through MCP tools.3 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables users to query Polar health data (activity, sleep, recovery, training sessions, heart rate) through MCP with secure authentication, redacted personal info, and bounded responses.-