Look, don't touch
Schedules, free class spots, membership offers, studio info. No member data, and nothing can be changed. This is the safe starting point.
One connector links your AI assistant to Magicline or PerfectGym Next. Ask questions and give instructions in plain language — no dashboards, no code. This guide has everything in one place: what it is, how it stays safe, the full illustrated set-up, and what day-to-day use looks like.
It's a small connector that lets an AI assistant — such as Claude — talk to your studio platform on your behalf. You ask in everyday language; the connector turns the request into safe, permission-checked actions in Magicline or PerfectGym Next and brings the answer back. Nobody needs to write code or learn the system's menus. Once it's set up, the front desk can simply ask:
It works with every common AI app: Claude Desktop, Claude Code, Cursor, Windsurf, Gemini CLI and Antigravity. One installation serves both platforms — a group can connect a Magicline studio and a PerfectGym Next club side by side in the same assistant, each with its own key and its own permissions.
Which product is this for? Magicline, and PerfectGym Next — Sport Alliance's current platform. It does not work with the classic PerfectGym product (perfectgym.pl), which uses a different system.
Access comes in three levels. The connector starts at the first one and never moves up unless you switch the others on:
Schedules, free class spots, membership offers, studio info. No member data, and nothing can be changed. This is the safe starting point.
Profiles, contracts, balances, check-in history. Real personal data of real members — switch it on only when you're ready for that responsibility.
Booking classes, checking members in, creating leads, pausing contracts. Real actions in your studio — the assistant always shows you what it's about to do.
And four protections that are always on, whatever you enable:
The set-up below takes roughly half an hour and you only do it once. You'll need three things: an AI app from the list above, a terminal window — that's the Terminal app on a Mac or PowerShell on Windows, used only to paste the two commands this guide gives you — and an email inbox you can read, because your access key arrives by mail.
Two things worth knowing before you begin:
All of Part A happens at developer.sportalliance.com, under the Sandbox tab.
Go to developer.sportalliance.com and register — either with an email and password or by continuing with Google.
On first login the portal offers two paths. If your company already has a partner account, ask its administrator to add you. Otherwise choose Create New Partner Account.
Give the partner a name, add your company name, accept the terms and conditions, and save.
Pick your brand (Magicline or PerfectGym) in the dropdown at the top, then open Sandbox → Details and click Request Sandbox Credentials. Provisioning takes two to three minutes and gives you a dedicated test studio that is completely separate from any live data.
Open Sandbox → Applications and click Add New Application. The application is what the studio will later see and activate as an integration.
In the dialog, set:
GenericMCPSelect your application, open its Scopes tab, and click Add Scopes.
The scopes you grant here are exactly what the MCP server will be able to read and write through its tools — nothing outside them is reachable, whatever an assistant asks for. If you want system-level control over the MCP's abilities (say, read-only access, or no finance endpoints), this screen is where you enforce it. Select All is convenient for sandbox testing; for production, grant deliberately.
Part B happens inside your sandbox studio's own web interface — Magicline in the screenshots below.
Back on Sandbox → Details, the provisioned environment now shows everything you need to get in:
Open the Web URL and log in with that username and password. The Base-URL is the API host the MCP server will talk to.
Inside the sandbox studio, go to Settings → Integrations → Overview, find your application in the partner list, and click Activate.
The activation dialog asks which customer data the studio shares with the integration, in two groups: existing customers (members, prospects and former members) and new customers (new members and new prospects) — five checkboxes in total. Everything is off by default. Tick all of the sharing options before clicking Activate, otherwise the MCP will see an empty studio.
What happens next: the activation email arrives at the address from step 5, carrying the tenant name and the API key in a password-protected PDF. Continue with Part C to unlock the key and wire the MCP into your AI clients.
Part C happens in your terminal. One command does the whole configuration — the captures below show the full wizard run.
The server runs via uv, which installs its own Python — nothing else is needed on the machine.
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Activating the integration (step 8) sent an activation email to the address from step 5. The email names your tenant, and the API key is inside a password-protected PDF attached to it. The password to open that PDF is shown in the developer portal — open the PDF with it and keep the tenant name and key at hand for the next step.
Which value is which: the tenant is the first part of the Base-URL from step 7 — for https://mcp.open-api.sandbox.magicline.com the tenant is mcp. The key is the long string from the PDF.
uvx sportalliance-mcp setup
The first question is your platform. Pick Magicline or PerfectGym Next — if you're unsure, the last menu entry explains how to tell them apart from the hostname in your activation email.
╭─────────────────────────────────────────────────────────────────────╮ │ │ │ ───────────────────────────────────────────────────────────── │ │ │ │ ███████╗██████╗ ██████╗ ██████╗ ████████╗ │ │ ██╔════╝██╔══██╗██╔═══██╗██╔══██╗╚══██╔══╝ │ │ ███████╗██████╔╝██║ ██║██████╔╝ ██║ │ │ ╚════██║██╔═══╝ ██║ ██║██╔══██╗ ██║ │ │ ███████║██║ ╚██████╔╝██║ ██║ ██║ │ │ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ │ │ █████╗ ██╗ ██╗ ██╗ █████╗ ███╗ ██╗ ██████╗███████╗ │ │ ██╔══██╗██║ ██║ ██║██╔══██╗████╗ ██║██╔════╝██╔════╝ │ │ ███████║██║ ██║ ██║███████║██╔██╗ ██║██║ █████╗ │ │ ██╔══██║██║ ██║ ██║██╔══██║██║╚██╗██║██║ ██╔══╝ │ │ ██║ ██║███████╗███████╗██║██║ ██║██║ ╚████║╚██████╗███████╗ │ │ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝╚══════╝ │ │ │ │ Sport Alliance MCP v0.2.1 │ │ │ │ One install, every platform: │ │ Magicline <tenant>.open-api.magicline.com │ │ PerfectGym Next <tenant>.open-api.perfectgym.com │ │ │ │ Read-only by default — member data and writes are opt-in. │ │ │ │ Documentation: developer.sportalliance.com │ │ ───────────────────────────────────────────────────────────── │ │ │ ╰─────────────────────────────────────────────────────────────────────╯ ? Which platform is this studio on? (↑/↓, enter) » Magicline <tenant>.open-api.magicline.com PerfectGym Next <tenant>.open-api.perfectgym.com --------------- I'm not sure — help me tell them apart
Type the tenant name, then choose the environment — pick Sandbox for the studio from Part B. Each option shows the fully resolved API host, so a key can't silently land on the wrong environment.
▌ API Key Configuration ───────────────────────────── You need the tenant name and API key from your Magicline activation email. The base URL looks like https://<tenant>.open-api.magicline.com ? Tenant name: mcp ? Is this a production or sandbox studio? (Use arrow keys) » Production (https://mcp.open-api.magicline.com) Sandbox (https://mcp.open-api.sandbox.magicline.com) Custom URL
Paste the API key from the PDF at the key prompt (input is hidden). The wizard validates it against the live API and shows the studio the key actually opens — Studio-1 for a fresh sandbox. By default the server starts in safe read-only mode; the key is stored in the OS key store (macOS Keychain / Windows Credential Manager), never in a plain-text file.
? API key for mcp.open-api.sandbox.magicline.com: Validating against the live API ... ✓ Connected successfully — Studio-1 (this is the studio the key actually opens — it is stored and re-checked every time the server starts) ▌ Tool Permissions ──────────────────────── ✓ Safe read-only mode — no member data, no writes. To enable elevated capabilities, re-run with setup --advanced, or use sportalliance-mcp permissions any time. ▌ Key Storage ─────────────────── ✓ API key stored in the macOS Keychain.
If your organisation has the enterprise data warehouse service (Amazon Redshift), answer y here to unlock the SQL analytics tools. Enter the cluster host, port (5439 is the default), database, user and password — the password goes into the system keyring, alongside the API key. No warehouse? Press enter to skip; nothing else changes.
▌ Data Warehouse (optional) ───────────────────────────────── ? Configure a Redshift data warehouse connection? [y/n] (n): y Use a warehouse user with read-only grants — the server opens read-only transactions but cannot enforce them against arbitrary SQL. ? Warehouse host: examplecluster.abc123xyz789.eu-central-1.redshift.amazonaws.com ? Warehouse port (5439): ? Warehouse database: dwh ? Warehouse user: mcp_readonly ? Warehouse password: ✓ Warehouse password stored in the system keyring.
The wizard lists the supported AI clients and pre-selects the ones it detects on your
machine. Confirm with enter — Claude Code is configured via
claude mcp add --scope user automatically; the others get the server written
into their own config files.
▌ MCP Clients ─────────────────── ? Select the AI clients to configure (↑/↓ move, space to toggle, enter to confirm) » ○ Claude Desktop (not detected) ○ Cursor (not detected) ○ Windsurf (not detected) ○ Gemini CLI (not detected) ○ Antigravity (not detected) ● Claude Code
For Claude Code, one last choice: how much to pre-approve. The recommended option lets non-personal read tools run without a prompt while member data and writes still ask.
▌ Permission Prompts (Claude Code) ──────────────────────────────────────── ? Claude Code asks for approval before every tool call. Pre-approve Magicline tools? Pre-approve non -personal reads — member data and writes still ask (recommended) ✓ Pre-approved non-personal read-only Magicline tools in ~/.claude/settings.json ✓ Magicline configured. Restart your AI client and the Magicline tools will be available. Fine-tune tiers or disable individual tools any time with sportalliance-mcp permissions.
Validate the setup: restart your AI client and ask a simple question — "What classes are on tomorrow's schedule?" — to confirm the tools respond. From the terminal, uvx sportalliance-mcp test checks every configured studio against the live API and prints the studio name each key opens.
Back at developer.sportalliance.com, under the Production tab.
Once the sandbox MCP behaves the way you want, repeat the application setup — application, details, scopes — under the portal's Production tab, and submit the application for review. Scopes deserve extra care here: what you grant is what every activating studio exposes.
After Sport Alliance approves the application, live studios can activate it exactly as
in step 8. Activation again delivers the key as a password-protected PDF; run
uvx sportalliance-mcp setup once more with the production tenant and key —
choosing Production this time in step 12 — and the MCP works against your live
Magicline or PerfectGym Next environment.
Open your AI app and ask — that's the whole workflow.
Good to know: before any booking or contract change, the assistant first checks the action is actually possible for that member — restricted classes, membership rules and freeze limits are respected automatically. And if a class or offer "doesn't exist", it usually means it hasn't been created in the back office yet — the connector can read and book your inventory, but creating classes and offers stays a back-office job.
Every command below is pasted into the same terminal as Part C — no set-up re-run needed.
Second platform? Run uvx sportalliance-mcp setup again and pick the other platform — the wizard even offers this at the end of the first run. Both studios then live side by side in your AI app, each in its own colours.
Each of these is something the connector tells you on purpose — here's what it means.
Practice (sandbox) studios and live studios live at different addresses. Your studio exists — just on the other environment. The set-up wizard offers the switch with one keystroke.
The key works, but the application was never granted any permissions in the developer portal. Go back to step 6, add the scopes you need, and try again.
Tenant and key don't belong together. Both come from the same activation email — re-check them there. If you run both platforms, make sure this key isn't from the other one; status spots exactly that mix-up.
The key opens a different studio than this connection was set up for — that's the identity check doing its job. Re-run the set-up wizard for that platform.
Member data and change-making abilities only appear when their level is switched on — check uvx sportalliance-mcp permissions, then restart the AI app. Restart it after any settings change.
Some members opt out of third-party data access. That's their right, the platform is honouring it, and the connector reports it rather than retrying.
Everything above is also configurable by hand. The connector is the open-source Python package sportalliance-mcp; an AI client launches it on demand over stdio — there is no server to host. A client entry looks like this (the key is not in the file — it's resolved from the OS key store):
{ "mcpServers": { "PerfectGymNext": {
"command": "uvx", "args": ["sportalliance-mcp"],
"env": { "SPORTALLIANCE_PLATFORM": "perfectgym-next",
"SPORTALLIANCE_TENANT": "sport-alliance-de",
"SPORTALLIANCE_ENVIRONMENT": "sandbox",
"SPORTALLIANCE_TOOLS": "read" } } } }
Full reference — every environment variable, headless/CI use, the optional Redshift data-warehouse tools, and per-tool deny-lists — lives in the package README on PyPI. Legacy magicline-mcp installations keep working unchanged; running the new set-up offers a one-time migration that copies keys forward and deletes nothing.
Everything the guide summarises, in full: the complete tool catalog straight from the running package, every command and variable, manual configuration, the data warehouse, and operating practices. Written for admins and IT.
Generated from sportalliance-mcp v0.2.1 — identical on Magicline and PerfectGym Next. Tools marked always asks are excluded from every pre-approval list; a human confirms each call.
Prefix with uvx, or uv run inside the repo.
Written by the wizard; set them yourself only in non-interactive environments (CI, Docker, headless Linux). MAGICLINE_* twins remain supported for existing Magicline configs — if both prefixes are set they must agree, or the server refuses to start.
The wizard edits these files for you; the format is identical everywhere.
{ "mcpServers": {
"Magicline": { "command": "uvx", "args": ["sportalliance-mcp"],
"env": { "SPORTALLIANCE_PLATFORM": "magicline",
"SPORTALLIANCE_TENANT": "acme-fitness",
"SPORTALLIANCE_ENVIRONMENT": "production",
"SPORTALLIANCE_TOOLS": "read" } },
"PerfectGymNext": { "command": "uvx", "args": ["sportalliance-mcp"],
"env": { "SPORTALLIANCE_PLATFORM": "perfectgym-next",
"SPORTALLIANCE_TENANT": "sport-alliance-de",
"SPORTALLIANCE_ENVIRONMENT": "sandbox",
"SPORTALLIANCE_TOOLS": "read" } } } }
Server keys are exactly Magicline and PerfectGymNext — Claude Code permission rules embed them (mcp__Magicline__list_classes), so they never change. Keys are per studio: never paste the same key into two platform entries — status flags exactly that. Keys resolve from the OS keyring (service sportalliance-mcp, username platform:tenant); on keyring-less machines use SPORTALLIANCE_API_KEY inline. On Windows, prefer the full path to uvx.exe as the command — GUI apps don't always inherit PATH (the wizard does this automatically).
Optional — for operators with enterprise data warehouse access (Amazon Redshift, schema erp_v2). Docs: Magicline · PerfectGym Next.
The judgement calls, spelled out.