Model Context Protocol (MCP)

Connect your AI assistant to the Salable API and go from zero to working checkout in a single conversation — or use the raw MCP tools to manage products, pricing, and entitlements conversationally.

Overview

Salable's Model Context Protocol server lets you manage your pricing and billing setup through conversation. Ask an AI assistant to create Products, configure Plans, set up Entitlements, inspect Subscriptions — whatever you'd normally do in the dashboard or via API calls. Your assistant discovers the available tools automatically and figures out how to use them.

Prerequisites

You'll need a Salable API key, use your secret key:

export SALABLE_API_KEY="your_api_key_here"

Restart your terminal or run source ~/.zshrc (or source ~/.bashrc) to pick it up.

Important MCP clients read environment variables from your shell, not from .env files. SALABLE_API_KEY must be exported in your shell before you launch your client. Never commit your API key to version control.

Setting Up Claude Code

The recommended path in Claude Code is the marketplace plugin:

claude plugin marketplace add Salable/salable-claude-code-plugin
claude plugin install salable

Once installed, type /salable-monetize in Claude Code to start the workflow.

The /salable-monetize Workflow

In Claude Code, type /salable-monetize, answer a few questions about your pricing model, and the skill handles the rest — from reading your codebase all the way through to generating production-ready code.

Your app needs authentication in place before you run the skill. It generates gating and checkout code that depends on knowing who the current user is. If auth isn't set up yet, the skill will recommend solutions, but the generated code won't work end to end until you've wired it in.

Important Identity fields in Salable (Grantee IDs, Owner IDs) must use non-email identifiers — org IDs, user IDs, or hashed values.

The skill moves through four phases, each building on what came before.

It starts with discovery — reading your project to understand your framework, authentication provider, and existing integrations. You don't need to explain your stack; the skill figures it out from your dependencies, config files, and project structure, then maps out where monetization code should live.

Next comes monetization planning, where the skill works with you to define which features to gate behind paid Plans, what Entitlements to create, and how to structure your tiers and pricing. It proposes a model based on common patterns for your type of application, but you're in control — accept the defaults, adjust individual pieces, or redesign from scratch.

Once you've agreed on a model, the skill provisions your catalog — creating Products, Plans, Line Items, Prices, and Entitlements in Salable automatically. All the API calls, ID generation, and relationship wiring happens in the background.

Finally, the skill generates code tailored to your framework and auth setup: a pricing page with plan comparisons and checkout buttons, entitlement gating that conditionally renders features, a checkout flow wired to the Salable Cart API and Stripe, a Subscription management page, API routes, and navigation wiring. The code uses your actual Product and Plan IDs and integrates with your existing auth — it isn't generic boilerplate.

The skill supports everything Salable offers — flat-rate, per-seat, metered, and hybrid pricing across multiple cadences and currencies. For more on how these models work, see the Products & Pricing guide.

MCP-Only Setup (Without Plugin)

If you only want raw MCP tools (and not the guided plugin workflow), connect Claude Code directly to the Salable MCP server.

The fastest path is downloading the configuration file straight into your project:

curl -o .mcp.json https://beta.salable.app/mcp.json

Claude Code detects the .mcp.json file automatically and expands the ${SALABLE_API_KEY} reference from your shell at startup. Open Claude Code in your project directory and you're connected.

You can also add the server via the CLI:

claude mcp add --transport http salable https://beta.salable.app/api/mcp \
  --header 'Authorization: Bearer ${SALABLE_API_KEY}'

By default, this stores configuration in .mcp.json at the project root — shared across the team, with each person using their own API key. If you'd prefer the server available across all your projects, add it at user scope instead:

claude mcp add --transport http --scope user salable https://beta.salable.app/api/mcp \
  --header 'Authorization: Bearer ${SALABLE_API_KEY}'

Setting Up MCP for Codex

Add the Salable MCP server with a single command:

codex mcp add salable \
  --url https://beta.salable.app/api/mcp \
  --bearer-token-env-var SALABLE_API_KEY

This stores the server in Codex's user config. If Codex prompts you for an OAuth login, skip it — Salable uses API key authentication only.

Next Steps