puregym-mcp
Enables browsing PureGym centers, discovering classes, and managing bookings in Denmark via MCP clients.
README
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.
- Docs: puregym-mcp.jorgesintes.dev
- Public read-only endpoint:
https://puregym-mcp.jorgesintes.dev/mcp - PyPI: 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
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 /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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。