> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

<Note>The Stigg MCP server is currently in **public beta**. Feedback and bug reports are welcome.</Note>

## Overview

The Stigg MCP server exposes your Stigg environment to any AI agent that supports the [Model Context Protocol](https://modelcontextprotocol.io/). Once connected, your agent can provision customers, manage subscriptions, check entitlements, and report usage in natural language, without writing a single API call.

### Who it's for

Developers who want to use AI coding assistants to interact with Stigg during development, testing, or operations tasks.

### How it works

The MCP server acts as a bridge between your AI client and the Stigg API. It authenticates using a Stigg [environment API key](/documentation/managing-your-account/environments/api-keys), so every action the agent takes is scoped to that environment.

<Note>
  The MCP server URL is `https://mcp.stigg.io`. Clients that support HTTP transport connect directly; others use the `@stigg/typescript-mcp` npm package as a local bridge.
</Note>

***

## Connect your AI client

Select your AI client below and follow the two-step setup.

<Steps>
  <Step title="Get your API key">
    In the Stigg app, go to **Integrations > [API keys](/documentation/managing-your-account/environments/api-keys)** and copy the key for the environment you want the agent to operate on.

    <Tip>
      When available, use a [scoped API key](/documentation/managing-your-account/environments/api-keys#creating-a-scoped-key) rather than the default full-access key. Scoped keys limit what the agent can do and reduce the blast radius if a key is ever exposed. Scoped keys are available on the Scale plan.
    </Tip>
  </Step>

  <Step title="Configure the client">
    <Tabs>
      <Tab title="Claude Code">
        Run the following command in your terminal:

        ```bash theme={null}
        claude mcp add stigg \
          --header "X-API-KEY: <YOUR_API_KEY>" \
          --transport http https://mcp.stigg.io
        ```

        Replace `<YOUR_API_KEY>` with your Stigg environment API key. Start a new Claude Code session, then type `/mcp` to confirm the server is connected and its tools are listed.
      </Tab>

      <Tab title="Claude Desktop">
        Open your Claude Desktop configuration file:

        * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
        * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

        Add the `stigg` entry under `mcpServers` at the top level of the file:

        ```json claude_desktop_config.json theme={null}
        {
          "mcpServers": {
            "stigg": {
              "command": "npx",
              "args": [
                "mcp-remote",
                "https://mcp.stigg.io",
                "--header",
                "X-API-KEY: <YOUR_API_KEY>"
              ]
            }
          }
        }
        ```

        If your config file already has other entries under `mcpServers`, keep them and add the `stigg` entry alongside them — don't replace the whole file.

        Replace `<YOUR_API_KEY>` with your Stigg environment API key, then restart Claude Desktop.
      </Tab>

      <Tab title="ChatGPT">
        In ChatGPT, go to **Settings > Connectors** and add a new MCP server with the following values:

        | Field        | Value                  |
        | ------------ | ---------------------- |
        | Server URL   | `https://mcp.stigg.io` |
        | Connection   | API Key (header)       |
        | Header name  | `X-API-KEY`            |
        | Header value | `<YOUR_API_KEY>`       |

        Replace `<YOUR_API_KEY>` with your Stigg environment API key.
      </Tab>

      <Tab title="Cursor">
        Open `~/.cursor/mcp.json` (create it if it doesn't exist) and add the following entry under `mcpServers`:

        ```json ~/.cursor/mcp.json theme={null}
        {
          "mcpServers": {
            "stigg_typescript_api": {
              "command": "npx",
              "args": ["-y", "@stigg/typescript-mcp"],
              "env": {
                "STIGG_API_KEY": "<YOUR_API_KEY>"
              }
            }
          }
        }
        ```

        Replace `<YOUR_API_KEY>` with your Stigg environment API key. Restart Cursor to apply the change.
      </Tab>

      <Tab title="VS Code">
        Open the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`), run **MCP: Open User Configuration**, and add the following entry under `mcpServers`:

        ```json MCP User Configuration theme={null}
        {
          "mcpServers": {
            "stigg_typescript_api": {
              "command": "npx",
              "args": ["-y", "@stigg/typescript-mcp"],
              "env": {
                "STIGG_API_KEY": "<YOUR_API_KEY>"
              }
            }
          }
        }
        ```

        Replace `<YOUR_API_KEY>` with your Stigg environment API key.
      </Tab>

      <Tab title="Windsurf">
        Open your Windsurf MCP configuration file and add the following entry under `mcpServers`:

        ```json MCP Configuration theme={null}
        {
          "mcpServers": {
            "stigg_typescript_api": {
              "command": "npx",
              "args": ["-y", "@stigg/typescript-mcp"],
              "env": {
                "STIGG_API_KEY": "<YOUR_API_KEY>"
              }
            }
          }
        }
        ```

        Replace `<YOUR_API_KEY>` with your Stigg environment API key.
      </Tab>

      <Tab title="Codex">
        Open your Codex MCP configuration file and add the following entry under `mcpServers`:

        ```json MCP Configuration theme={null}
        {
          "mcpServers": {
            "stigg_typescript_api": {
              "command": "npx",
              "args": ["-y", "@stigg/typescript-mcp"],
              "env": {
                "STIGG_API_KEY": "<YOUR_API_KEY>"
              }
            }
          }
        }
        ```

        Replace `<YOUR_API_KEY>` with your Stigg environment API key.
      </Tab>

      <Tab title="Other">
        For any other MCP-compatible client, add the following entry under `mcpServers` in your client's MCP configuration file:

        ```json MCP Configuration theme={null}
        {
          "mcpServers": {
            "stigg_typescript_api": {
              "command": "npx",
              "args": ["-y", "@stigg/typescript-mcp"],
              "env": {
                "STIGG_API_KEY": "<YOUR_API_KEY>"
              }
            }
          }
        }
        ```

        Replace `<YOUR_API_KEY>` with your Stigg environment API key. If your client supports HTTP transport natively, use the following instead:

        ```json HTTP transport theme={null}
        {
          "mcpServers": {
            "stigg": {
              "url": "https://mcp.stigg.io",
              "headers": {
                "X-API-KEY": "<YOUR_API_KEY>"
              }
            }
          }
        }
        ```
      </Tab>
    </Tabs>
  </Step>
</Steps>

***

## Recommended: install agent skills (Claude Code)

The MCP server gives Claude Code the tools to act on your Stigg environment. The [Stigg agent skills plugin](/api-and-sdks/agent-skills) gives it the domain knowledge to use those tools well — pricing patterns, entitlement gating strategies, subscription lifecycle sequencing, and guardrails for common mistakes.

Install the plugin inside a Claude Code session:

```bash Claude Code session theme={null}
/plugin marketplace add stiggio/skills
/plugin install stigg@stigg-marketplace
```

Once both are set up, you can describe what you want to build in natural language and Claude Code will handle the full loop — knowing what to do and executing it via live API calls:

| Prompt                                                                                                                          | What happens                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| *"Create a three-tier SaaS pricing model: Free with 1,000 API calls/month, Pro with 50,000 and overages, Enterprise unlimited"* | Skills advise on catalog structure; MCP creates the features, plans, and charges in your environment |
| *"Add entitlement checks to our codebase — Pro users get 500 completions/month, show a paywall when they hit the limit"*        | Skills generate gating code using the correct SDK pattern; MCP can verify the feature exists         |
| *"Provision a 14-day trial for customer acme-corp on the Pro plan"*                                                             | Skills know the right provisioning sequence; MCP executes the API call                               |
| *"Show me which customers are above 80% of their API call quota this month"*                                                    | MCP queries usage and entitlement data; skills know how to interpret and present it                  |
| *"Set up credits so users buy packs of 1,000 and each AI generation costs 10 credits"*                                          | Skills design the credit currency and grant structure; MCP creates it in Stigg                       |

<Card title="Agent Skills" icon="wand-magic-sparkles" href="/api-and-sdks/agent-skills">
  See all 11 skills, more example use-cases, and install instructions for Claude Desktop and other clients.
</Card>

***

## Core concepts

**The MCP server is per-environment.** The API key you provide determines which Stigg environment the agent operates on — sandbox, staging, or production. Every action the agent takes (creating customers, provisioning subscriptions, reporting usage) affects that environment.

**To work across environments**, you can configure separate MCP server entries with separate API keys (e.g. `stigg-sandbox` and `stigg-production`). However, this setup is error-prone: the agent may not know which environment to target and can perform destructive actions in the wrong one. Where possible, use a single environment per session and only add the API key for the environment you intend the agent to operate on.

**The agent acts on your behalf.** There is no separate agent identity — the MCP server forwards API calls using the key you provided. The agent can do anything the key permits.

***

## What you can do

Once connected, your AI agent can perform any of the following operations by describing them in natural language. This covers the full Stigg API surface.

**Product catalog**

| Operation           | Description                                                                            |
| ------------------- | -------------------------------------------------------------------------------------- |
| **Manage plans**    | Create, update, archive, and list plans with their pricing, features, and entitlements |
| **Manage features** | Create, update, and list features (boolean, metered, or configuration)                 |
| **Manage add-ons**  | Create, update, and list add-ons and their entitlements                                |
| **Manage packages** | Publish and archive pricing packages                                                   |

**Customers & subscriptions**

| Operation                          | Description                                                                           |
| ---------------------------------- | ------------------------------------------------------------------------------------- |
| **Manage customers**               | Provision, update, and retrieve customer records                                      |
| **Provision subscriptions**        | Subscribe a customer to a plan or add-on, including scheduled and trial subscriptions |
| **Preview subscriptions**          | Calculate pricing before provisioning                                                 |
| **Cancel subscriptions**           | Cancel immediately or at period end                                                   |
| **Grant promotional entitlements** | Give a customer temporary access to a feature outside their plan                      |

**Entitlements & usage**

| Operation                  | Description                                                              |
| -------------------------- | ------------------------------------------------------------------------ |
| **Check entitlements**     | Query whether a customer has access to a feature and at what usage level |
| **Report usage**           | Record metered feature usage for a customer's active subscription        |
| **Report metering events** | Submit raw usage events for aggregation and billing                      |

***

## Security

<Warning>
  **Do not connect a production environment unless you have a clear need and understand the risks.** AI agents can take destructive, hard-to-reverse actions — deleting customers, canceling subscriptions, or modifying your product catalog — based on natural language instructions that may be misinterpreted. Always develop and test against a sandbox environment first.
</Warning>

**Use scoped API keys when available.** Stigg supports API keys with restricted permissions ([Scale plan](/documentation/managing-your-account/environments/api-keys)). If your plan includes scoped keys, create a dedicated one for each AI client rather than reusing the full-access key — this limits the blast radius if a key is ever exposed or if the agent acts unexpectedly. If you're not on the Scale plan, use your full-access key but apply the other controls below.

**Keys are environment-bound.** An API key always belongs to a specific Stigg environment. A key from your sandbox environment cannot access production data.

**Recommended setup:**

* Default to sandbox keys for all AI-assisted development and testing
* If on the Scale plan, create one scoped key per AI client (e.g., `Claude Code - Dev`, `Cursor - Staging`) and grant only the permissions the agent needs
* Rotate keys periodically from **Settings > API keys**

<Warning>
  Never commit API keys to source control or share them in chat. Treat them like passwords.
</Warning>

***

<Card title="CLI vs MCP server" icon="arrow-right-arrow-left" href="/api-and-sdks/cli-vs-mcp">
  Not sure which tool to use? See the side-by-side comparison.
</Card>
