Agent integration
Instead of wiring tiun by hand, you can let your AI coding agent do it. Two pieces make this work well:
A skill — a curated, agent-readable instruction pack that teaches the agent the patterns it should follow when integrating tiun.
An MCP server — a live read-only connection to your my.tiun.business account, so the agent fetches your snippet ID, provider, and product list directly instead of asking you to copy-paste them.
With both in place, you can prompt your agent with something as short as "integrate tiun" and it'll discover the right products, confirm the integration mode, and generate the code.
1. Prerequisites
Install the GitHub CLI. It's how you install the tiun-sdk skill in the next step.
gh --versionIf the command prints a version, you're set. Otherwise install it and re-check.
2. Install the tiun-sdk skill
A skill adds tiun-specific instructions to your codebase so your agent knows how to integrate tiun correctly — which APIs to call, how to handle login, when to use userChange vs. paywallShow, etc.
gh skill install tiun-app/skills tiun-sdkThis installs the skill into your project where your agent can pick it up automatically.
3. Connect the MCP server
Add the tiun MCP server to your agent's MCP settings:
How you register an MCP server depends on the agent — Cursor, Claude Code, and other clients all wire MCP servers in slightly different ways (a config file, a settings panel, a CLI command, etc.). Check your agent's documentation for "MCP" or "Model Context Protocol" to find the exact steps.
Once connected, the agent can list your providers, snippet IDs, and products in real time. The tiun-sdk skill detects the MCP and uses it automatically — so when you ask the agent to integrate, it pulls data from your account instead of relying on what you paste in.
Sandbox and live are separate environments with their own snippet IDs and product IDs. MCP returns both (each provider is tagged sandbox or live). If you have products set up in sandbox and in live, the agent can pick the right IDs for the environment you're building against — sandbox while you're developing (sandbox: true), live when you're shipping production traffic.
This step is optional, but recommended: without MCP the agent has no view of your dashboard and you'll have to hand it the snippet ID and product IDs yourself.
See Sandbox for how the two environments relate.
4. Prompt your agent
You're ready. Open your agent in your project and ask it to integrate tiun. Examples:
General — "Integrate tiun." The agent will ask which integration mode (subscription, time-based, or both), which products to wire, and any routes to gate.
Specific — "Set up a subscription paywall on the
/premiumroute using my Pro plan." The agent will confirm the product ID via the MCP and write the integration.Time-based — "Add a time-based paywall to the article view and meter content on route changes."
Before writing code, the agent will confirm the integration mode, the product(s) to use, and the gating points — so nothing is wired silently.
Available skills
The tiun-sdk skill is one of several maintained skills. The full list lives at tiun-app/skills on GitHub.
Last updated
Was this helpful?