# 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/mcp Website: https://cuprice.io --- ## What is Cuprice? Cuprice lets you build feature-based pricing pages and embed them on any website. Users can pick a plan, customize features, and pay via Stripe — all without leaving your site. ## What is this MCP server? This server exposes Cuprice's public APIs as MCP tools. AI assistants can fetch pricing data, generate embed code, look up purchase receipts, and get CSS class names for customization. ## Setup ### Remote (no install) Add to `.cursor/mcp.json`: ```json { "mcpServers": { "cuprice": { "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 (e.g. "nTZ7axXQHU") **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. **Input:** - `shareId` (string, required) — The project's Share ID - `framework` (string, optional) — "html", "nextjs", or "react". Default: "html" **Output:** Code snippet for the specified framework. **HTML output example:** ```html
``` --- ### get-receipt Get purchase details from a Stripe checkout session. **Input:** - `sessionId` (string, required) — Stripe Checkout session ID (from the redirect URL after payment) - `shareId` (string, required) — The project's Share ID **Output:** Receipt with planName, customPlan (boolean), total, currency, customer email, billingInterval, subscriptionId, and metadata containing purchased feature details. **Public endpoint used:** `GET /api/stripe/receipt?session_id=...&shareId=...` **Feature extraction from metadata:** - Regular plans: `metadata.planId` — look up features via get-pricing tool - Custom plans: `metadata.featureDetails_0`, `featureDetails_1`, etc. — join and parse as JSON --- ### 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 | 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. ## Feature Gating After Stripe checkout, the success URL receives a `session_id`. Use the get-receipt tool to find which features were purchased: - **Regular plans:** Receipt metadata contains `planId`. Use get-pricing to look up plan features. - **Custom plans:** Receipt metadata contains `featureDetails_0`, `featureDetails_1`, etc. Join and parse as JSON to get feature names and prices.