A Model Context Protocol (MCP) server that exposes the full public Adapty REST API surface as tools — Server-Side API v2 (12 tools), legacy v1 (7 tools), Web API (3 tools), Analytics Export (3 tools), and webhook utilities (2 tools). 27 tools total.
Install globally:
npm i -g adapty-mcpRun as an MCP stdio server (any MCP-compatible client can spawn it):
ADAPTY_SECRET_API_KEY=secret_live_... adapty-mcpFor Cursor or any other MCP client, point its server config at the adapty-mcp binary and pass ADAPTY_SECRET_API_KEY via env. Optional: ADAPTY_PUBLIC_API_KEY for Web API tools, ADAPTY_SECRET_API_KEY_SANDBOX / ADAPTY_PUBLIC_API_KEY_SANDBOX for the Adapty staging environment.
If you manage multiple Adapty apps from the same machine, write ~/.config/adapty-mcp/accounts.json:
{
"default": "main",
"apps": {
"main": {
"live": { "secretKey": "secret_live_main...", "publicKey": "public_live_main..." },
"sandbox": { "secretKey": "secret_stag_main...", "publicKey": "public_stag_main..." }
},
"side-project": {
"live": { "secretKey": "secret_live_side..." }
}
}
}Override the path with ADAPTY_MCP_CONFIG=/path/to/accounts.json.
Each tool accepts optional app and environment arguments:
app— name from theappsmap. Omit to usedefault.environment—"live"(default) or"sandbox".
When the config file is present, env-var fallbacks are NOT consulted, so multi-app setups behave predictably. The file mode is checked at startup; loose permissions trigger a stderr warning recommending chmod 600.
The default request timeout is 30 seconds; GET requests automatically retry up to three times on 429/502/503/504 responses with exponential backoff. Mutating verbs are never auto-retried.
< 85C1 p dir="auto">(generated bynpx tsx scripts/gen-tool-docs.ts)
| Tool | Description |
|---|---|
adapty_profile_get |
Retrieve an Adapty user profile (access levels, subscriptions, non-subscriptions). Use case: check whether a customer currently has an active access level. |
adapty_profile_create |
Create a new Adapty profile. Use case: pre-create a profile when your backend signs up a user. |
adapty_profile_update |
Update Adapty profile attributes (name, email, custom_attributes, ...). Use case: sync user profile changes from your backend. |
adapty_profile_delete |
Delete an Adapty profile and its data. Use case: GDPR/CCPA delete request. |
adapty_access_level_grant |
Grant or extend an access level for a customer (without an actual purchase). Use case: comp a creator account, refund credit. |
adapty_access_level_revoke |
Revoke a previously granted access level. Use case: undo a manual grant. |
adapty_transaction_set |
Submit a store transaction (App Store or Google Play) for Adapty to verify and record. Use case: server-side receipt validation when your client cannot reach Adapty directly. |
adapty_stripe_purchase_validate |
Validate a Stripe subscription/customer with Adapty. Use case: granting access on Stripe purchase events. |
adapty_integration_identifiers_set |
Attach external integration identifiers (Amplitude, Mixpanel, AppsFlyer, etc.) to an Adapty profile so server-to-server analytics can correlate the same user across systems. |
adapty_paywall_get |
Fetch a single paywall by its developer ID. Use case: server-side rendering of a paywall configuration. |
adapty_paywalls_list |
List all paywalls configured for the current Adapty app. Use case: build a server-side index of paywall keys. |
adapty_paywall_update |
Update a paywall configuration (name, remote_config, products). Use case: rotate remote config or product list from a server-side admin tool. |
| Tool | Description |
|---|---|
adapty_v1_profile_get |
[LEGACY — prefer v2 equivalent] Fetch a v1 SDK profile by profile id or customer user id. Use case: maintain compatibility with apps still on the v1 SDK API surface. |
adapty_v1_profile_create |
[LEGACY — prefer v2 equivalent] Create a v1 SDK profile via the legacy /profiles/ endpoint. Use case: pre-create profiles from a backend integrated against the v1 SDK API. |
adapty_v1_profile_update |
[LEGACY — prefer v2 equivalent] Patch a v1 SDK profile attributes payload. Use case: sync profile changes through the legacy SDK API. |
adapty_v1_profile_delete |
[LEGACY — prefer v2 equivalent] Delete a v1 SDK profile via /profiles/{id}/delete. Use case: GDPR/CCPA delete request for legacy integrations. |
adapty_v1_access_level_grant |
[LEGACY — prefer v2 equivalent] Grant or extend a paid access level via the v1 SDK URL-scoped endpoint. Use case: comp an account through the legacy API. |
adapty_v1_access_level_revoke |
[LEGACY — prefer v2 equivalent] Revoke a previously granted paid access level via the v1 SDK URL-scoped endpoint. Use case: undo a manual grant on legacy stacks. |
adapty_v1_stripe_token_validate |
[LEGACY — prefer v2 equivalent] Validate a Stripe token through the v1 SDK /purchase/stripe/token/validate/ endpoint. Use case: verify a Stripe token in legacy purchase flows. |
| Tool | Description |
|---|---|
adapty_web_paywall_get |
Fetch a web-rendered paywall configuration by its developer ID. Use case: server-side rendering of a paywall on a marketing landing page. |
adapty_web_paywall_view_record |
Record that a paywall was viewed by a customer. Use case: track impressions for conversion analytics. |
adapty_web_attribution_set |
Attach marketing attribution metadata (source/network/attributes) to a profile. Use case: forward MMP postbacks to Adapty. |
| Tool | Description |
|---|---|
adapty_analytics_query |
Query Adapty analytics metrics over a date range. Use case: pull MRR/ARR/conversion numbers into a dashboard or chatbot answer. |
adapty_analytics_cohorts_query |
Query Adapty cohort retention metrics over a date range. Use case: weekly/monthly retention for a marketing review. |
adapty_analytics_export_csv |
Export an analytics dataset as CSV. Use case: bulk download for spreadsheet analysis. |
| Tool | Description |
|---|---|
adapty_webhook_authorization_verify |
Verify an incoming Adapty webhook by constant-time comparing the inbound Authorization header value against the value you configured in the Adapty dashboard. No HMAC — Adapty echoes the configured token verbatim. |
adapty_webhook_event_parse |
Parse a raw webhook JSON body into a typed Adapty event. Validates against the discriminated union of all 18 known event types. |
MIT.