AI Agents
Let Claude Code, Cursor, or any coding agent set up WarpLink deep links and attribution: connect the MCP server, add the agent kit, and verify the setup.
An AI coding agent can do every WarpLink setup step without you opening the dashboard: register the app, create an SDK key, add the SDK, wire Universal Links or App Links, and check that it all works. This page shows how to connect the agent and what it does.
Connect the MCP server
The WarpLink MCP server is at https://api.warplink.app/mcp. Most clients connect with the URL and a one-time browser sign-in. In Claude Code:
claude mcp add --transport http warplink https://api.warplink.app/mcp
Then run /mcp and choose Authenticate. For CI or other non-interactive use, send an API key as Authorization: Bearer wl_live_.... See AI Access for every client and the full tool list.
Add the agent kit
The agent kit is a skill for Claude Code plus a block for your app's AGENTS.md or CLAUDE.md. It holds:
skills/warplink-setup/SKILL.md: the skill. Ask your agent "Set up WarpLink in this app" and it follows the steps below.AGENTS.md: the block to paste into your project, so any agent knows how to work with WarpLink..mcp.json: the server entry.
Install the kit as a Claude Code plugin. The plugin includes the MCP server entry, so skip the claude mcp add command above:
/plugin marketplace add WarpLinkApp/warplink-agent-kit
/plugin install warplink@warplink
Or copy skills/warplink-setup into your project's .claude/skills/ folder and keep the server you added above. Use one path or the other, so you do not end up with two server entries.
The AGENTS.md block
Paste this block into your app's AGENTS.md, or into CLAUDE.md for Claude Code:
## WarpLink
This app uses WarpLink for deep links, install attribution, and link analytics. The WarpLink MCP server is at `https://api.warplink.app/mcp`. Connect with the one-time browser sign-in (OAuth, no header). That is the default. For CI, or to use an agent sign-up token, send a bearer header instead: add the server with `claude mcp add --transport http --scope local --header "Authorization: Bearer ..." warplink https://api.warplink.app/mcp`, or put `"headers": { "Authorization": "Bearer ${WARPLINK_TOKEN}" }` in `.mcp.json` and set `WARPLINK_TOKEN` in the environment. Never write a token or an API key into a committed file, and never print it in chat.
To set up or check WarpLink in this project, call the MCP tools in this order:
1. `list_apps`, then `create_app` if the project has no app yet. An app needs its iOS bundle ID and team ID, its Android package, or both. The Android SHA256 certificate hashes are needed for App Links verification.
2. `create_key` with `type: "sdk"` and the `app_id`. The raw key is shown once.
3. `get_sdk_setup` with the `app_id` and the platform (`ios`, `android`, `react-native`, or `flutter`). Follow its install, configure, and link-domain steps. It returns the current SDK version.
4. `create_link` for the app, with an `idempotency_key`.
5. `verify_setup` with the `app_id`. Fix each failing check with its `fix` text, then call it again. Stop when only checks that need a person remain: a device tap, the first click, the SDK connecting from a real device, or claiming the workspace. Report those to the user.
6. Open `https://<app host>/test` for the app's host. It confirms the host serves the app's link files.
Links in an unclaimed workspace stay paused. They open after the user claims the workspace from the claim email. Do not hand out a short link before the claim.
Rules:
- Keep the SDK key out of source control and out of chat. Read it from the app's own config or secret store. Use the `YOUR_SDK_KEY` placeholder in committed files.
- Use the exact link host from `get_sdk_setup` in Associated Domains and in the Android intent filter. Never use a wildcard.
- Use the SDK key only in the app. Use an API key only for the MCP server and the REST API. The MCP server refuses SDK keys.
- When an error has `details.fix`, apply it before you retry.
- To preview a create or update without saving it, pass `dry_run: true` on `create_link`, `create_app`, or `update_link`. To retry a create safely, pass an `idempotency_key`.
- Do not delete a link, an app, or a key unless the user asked for it. To stop a link, use `deactivate_link`.
The setup flow
An agent sets up an app with these tools, in order:
list_apps, thencreate_appif the project has no app yet.create_keywithtype: "sdk"and theapp_id. The key is tied to that app. The raw key is shown once.get_sdk_setupwith theapp_idand the platform. It returns the install step with the current SDK version, the configure snippet with aYOUR_SDK_KEYplaceholder, the link hosts, the iOS Associated Domains lines or the Android intent filter, and the test address.create_linkfor the app, with anidempotency_key.verify_setupwith theapp_id. It returnsreadyand a list of checks, each with a status ofpass,fail,warn,needs_human, orskipped, and afixfor every check that needs one. The agent applies each fix and calls the tool again. It stops when onlyneeds_humanchecks remain: a device tap, the first click, the SDK connecting from a real device, claiming the workspace, or the Associated Domains and manifest lines to confirm in your project. The result lists them inneeds_humanwith the exact step, and the agent reports them to you.- Open
https://<app host>/test, where<app host>is the app's own link host. The page confirms the host serves the app's link files.
The same steps are available over REST: GET /v1/apps/{id}/sdk-setup and GET /v1/apps/{id}/setup-check.
An SDK key goes only into the mobile app. An API key goes only to the MCP server and the REST API. The MCP server refuses SDK keys with 403 SDK_KEY_ROUTE_FORBIDDEN. Keep both out of source control.
Prompts and resources
Besides tools, the MCP server offers ready-made prompts and read-only resources that an agent or a person can pick from the client.
| Prompt | What it asks the assistant to do | Arguments |
|---|---|---|
weekly_link_report | Summarize how links performed over a period: totals against the previous period, top movers, sources and silent links | days: Days to cover, 1 to 90. Default 7. |
find_broken_links | List paused, expired, destinationless and silent links, each with a fix to confirm | days: Days without taps that make an active link silent, 1 to 90. Default 30. |
setup_deep_linking | Walk an assistant through the SDK setup of an app and prove it with a setup check | app_id: The ID (a UUID) of the app to set up. Leave empty to pick or create one. |
debug_link | Find why one link does not open the app or the page it should | slug_or_url (required): The link's slug or its full short URL, at most 2048 characters. |
| Resource | What it holds | Required Scopes |
|---|---|---|
warplink://docs/setup-guide | The steps from sign-in to a first tracked tap, with the tool to call at each step | none |
warplink://docs/errors | Every error code the API and tools return, with what it means and how to fix it | none |
warplink://sdk/{platform} | Generic install and configure snippets for one platform: ios, android, react-native or flutter | none |
warplink://apps/{app_id}/setup | The SDK setup steps of one app of the organization, with its hosts and a placeholder for the SDK key | apps:read |
Errors an agent can fix
Every error keeps the shape { "error": { "code", "message" } } and, when WarpLink knows the remedy, adds details.fix and details.docs_url. The MCP server returns the same fix in the error text and in structuredContent.error. An agent applies the fix before it retries. See Errors for every code.
Safe retries and previews
- Idempotency. Send an
Idempotency-Keyheader onPOST /v1/linksandPOST /v1/apps, or passidempotency_keyto the MCP toolscreate_linkandcreate_app. A retry with the same key and the same request returns the first response with the headerIdempotent-Replayed: true. An MCP tool result carries the same marker as_meta["warplink/idempotent_replayed"]: true. The same key with a different request returns422 IDEMPOTENCY_KEY_REUSED. A retry while the first request still runs returns409 IDEMPOTENCY_IN_PROGRESS. Keys last 24 hours. - Dry run. Add
?dry_run=truetoPOST /v1/links,POST /v1/apps, andPATCH /v1/links/{id}, or passdry_run: truetocreate_link,create_app, andupdate_link. WarpLink runs every check a real call runs and returns the result it would have saved, without saving anything.
Start with no account
An agent can start before you have a WarpLink account. It calls POST https://api.warplink.app/v1/agent/signup with an agent_name and your email. WarpLink creates a workspace on the Free plan and sends a claim email to that address. The response holds an access token that works on the MCP server.
Until you claim the workspace, the agent can register one app and create up to 10 links, and every link stays paused. Open the claim email, sign in or create an account, and choose Claim workspace. The workspace becomes yours and its links become active. An unclaimed workspace is removed after 7 days. The Agent sign-up API lists the limits and the errors.
Next steps
- AI Access for every MCP client and the full tool list
- Quickstart for the manual setup
- Authentication for API key scopes
- Errors for every error code and its fix
AI Access
Connect Claude, Cursor, Windsurf, or any MCP client to WarpLink, the deep linking MCP server for links, install attribution, and click analytics.
API Overview
Reference for the WarpLink REST API: authentication, rate limiting, error handling, and the endpoints for links, apps, and attribution.