# Cuprice MCP Server — Full Reference > Public API tools for integrating Cuprice pricing widgets via Model Context Protocol. Endpoint: POST https://mcp.cuprice.io/mcp Docs: https://docs.cuprice.io Docs search MCP server: https://docs.cuprice.io/mcp Website: https://cuprice.io --- ## What is Cuprice? Cuprice lets you build feature-based pricing pages and embed them on any website. Buyers pick a plan or build their own, then continue to the checkout link you set for that plan. ## What is this MCP server? This server exposes Cuprice's public APIs as MCP tools. AI assistants can fetch pricing data, generate embed code, and get CSS class names for customization. The tools are read-only and need no API key. ## Setup ### Remote (no install) Cursor, `.cursor/mcp.json`: ```json { "mcpServers": { "cuprice": { "url": "https://mcp.cuprice.io/mcp" } } } ``` Claude Code: ```bash claude mcp add --transport http cuprice https://mcp.cuprice.io/mcp ``` VS Code, `.vscode/mcp.json`: ```json { "servers": { "cuprice": { "type": "http", "url": "https://mcp.cuprice.io/mcp" } } } ``` Windsurf, `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { "cuprice": { "serverUrl": "https://mcp.cuprice.io/mcp" } } } ``` Claude Desktop: Settings → Connectors → Add custom connector, URL `https://mcp.cuprice.io/mcp`. --- ## Tools Reference ### get-pricing Get public pricing data for a project — plans, features, prices, and theme settings. **Input:** - `shareId` (string, required) — The project's Share ID (for example: `"YOUR_SHARE_ID"`) **Output:** Project object with name, description, currency, annualDiscount, plans (with features and limits), and themeSettings. **Public endpoint used:** `GET /api/share/{shareId}` --- ### get-embed-code Get a ready-to-use code snippet to embed a Cuprice pricing table or billing widget. **Input:** - `shareId` (string, required) — The project's Share ID - `framework` (string, optional) — "html", "nextjs", "react", or "vue". Default: "html" - `widget` (string, optional) — "pricing" or "billing". Default: "pricing" **Output:** Code snippet for the specified framework. **HTML output example:** ```html
``` --- ### get-receipt (deprecated) Stripe checkout was removed from Cuprice, so this tool no longer returns receipts. It stays registered so existing setups do not break, and it answers with a deprecation notice. Use get-pricing for plan details and your payment provider for receipts. --- ### get-css-classes Get all CSS class names available for customizing the Cuprice pricing widget. **Input:** none **Output:** Array of objects with `selector` and `description`: | Selector | Description | |----------|-------------| | `.cuprice-pricing-card` | Each plan card | | `.cuprice-pricing-button` | "Choose Plan" buttons | | `.cuprice-pricing-badge` | "Most Popular" badge | | `.cuprice-billing-toggle` | Monthly/Annual toggle | | `.cuprice-pricing-header` | Page title and description | | `.cuprice-custom-plan-card` | Custom plan card | | `.cuprice-custom-plan-button` | "Create Now" button | | `.cuprice-custom-plan-badge` | "Custom" badge | | `.cuprice-custom-plan-title` | Custom card title | | `.cuprice-custom-plan-feature-text` | Feature bullet text | | `.cuprice-custom-plan-feature-icon` | Feature checkmark icon | | `.cuprice-comparison-table` | Feature comparison table container | | `.cuprice-powered-by` | Powered by Cuprice footer | Use `!important` on all CSS properties to override scoped widget styles. --- ## Embed Widget Add to any HTML page: ```html
``` The widget auto-resizes, loads asynchronously, and is CSS-isolated. ## Checkout and feature access Cuprice hands the buyer to the checkout link you set on each plan. Receipts and feature access live with your payment provider; use get-pricing to read which features a plan includes. --- ## API v1 — Authenticated REST API All v1 endpoints require an API key passed as `Authorization: Bearer cpk_...`. API keys are created in Dashboard → Settings → API Keys. Keys with `read` permission can list/read. Keys with `read_write` can also create, update, delete. Base URL: `https://app.cuprice.io/api/v1` --- ### Projects #### List Projects `GET /api/v1/projects` Returns: `{ projects: [{ id, name, slug, description, shareId, currency, isActive, createdAt, updatedAt, _count: { features, pricingPlans } }] }` #### Create Project `POST /api/v1/projects` (read_write) Body: `{ name (required, max 100), description, pricingPageDescription, currency (default "USD") }` Returns: created project object (status 201) #### Get Project `GET /api/v1/projects/{slug}` Returns: project with themeSettings, features (with countableData), pricingPlans (with planFeatures) #### Update Project `PUT /api/v1/projects/{slug}` (read_write) Body: `{ name, description, pricingPageDescription, currency, annualDiscount, annualDiscountEnabled, isActive, checkoutSuccessUrl, checkoutCancelUrl, checkoutTestSuccessUrl, checkoutTestCancelUrl, theme }` The `theme` object accepts all design settings: - Colors: primaryColor, hoverColor, buttonTextColor, pricingBackgroundColor, pricingBorderColor, pricingHeaderTextColor, pricingPriceColor, pricingTextColor, pricingDescriptionColor, pricingHeaderBackgroundColor - Badge: popularBadgeColor, popularBadgeTextColor, popularBadgeBorderColor, popularBadgePosition - Custom plan card: customPlanButtonColor, customPlanButtonTextColor, customPlanCardBackgroundColor, customPlanCardBorderColor, customPlanCardTitleColor, customPlanCardFeatureColor, customPlanCardCheckmarkColor, customPlanCardBadgeBgColor, customPlanCardBadgeTextColor, customPlanCardBadgeBorderColor - Layout: fontFamily, borderRadius, headerAlign, descriptionAlign, toggleAlign, showProjectName, showPricingHeader - Custom CSS: customCSS (string with CSS rules) All fields optional — only provided fields are updated. #### Delete Project `DELETE /api/v1/projects/{slug}` (read_write) Cascades: deletes all plans, features, theme. Returns: `{ success: true }` --- ### Features #### List Features `GET /api/v1/projects/{slug}/features` Returns: `{ features: [{ id, name, description, basePrice, featureType, isCountable, order, countableData }] }` #### Create Feature `POST /api/v1/projects/{slug}/features` (read_write) Body: `{ name (required), description, basePrice (required >= 0), isCountable, featureType ("Standart"|"Limits"|"Usage Based"), usageCount, condition, countPrice, eventAggregationMethod }` Max 50 features per project. Returns: created feature (status 201) #### Update Feature `PUT /api/v1/projects/{slug}/features/{featureId}` (read_write) Body: `{ name, description, basePrice, isCountable, featureType, usageCount, condition, countPrice }` All fields optional. #### Delete Feature `DELETE /api/v1/projects/{slug}/features/{featureId}` (read_write) Also removes the feature from all plans. Returns: `{ success: true }` --- ### Plans #### List Plans `GET /api/v1/projects/{slug}/plans` Returns: `{ plans: [{ id, name, description, isPopular, isVisible, basePrice, isFree, planFeatures: [{ featureId, multiplier, feature }] }] }` #### Create Plan `POST /api/v1/projects/{slug}/plans` (read_write) Body: `{ name (required), description, isPopular, isVisible, basePrice, isFree, features: [{ featureId, multiplier }] }` Returns: created plan with features (status 201) #### Update Plan `PUT /api/v1/projects/{slug}/plans/{planId}` (read_write) Body: `{ name, description, isPopular, isVisible, basePrice, isFree, freemiumDay, isPerUserPricing, perUserMultiplier }` #### Delete Plan `DELETE /api/v1/projects/{slug}/plans/{planId}` (read_write) Returns: `{ success: true }` #### Duplicate Plan `POST /api/v1/projects/{slug}/plans/{planId}/duplicate` (read_write) Body: `{ name }` (optional, defaults to "Original (Copy)") Copies all plan features. Returns: duplicated plan (status 201) --- ### Plan Features (assign features to plans) #### List Plan Features `GET /api/v1/projects/{slug}/plans/{planId}/features` Returns: `{ features: [{ id, planId, featureId, multiplier, order, feature }] }` #### Add Features to Plan `POST /api/v1/projects/{slug}/plans/{planId}/features` (read_write) Body (single): `{ featureId, multiplier }` Body (batch): `{ features: [{ featureId, multiplier }] }` Skips already assigned features. Returns: `{ added, skipped, features }` #### Remove Feature from Plan `DELETE /api/v1/projects/{slug}/plans/{planId}/features?featureId={id}` (read_write) Returns: `{ success: true }`