Use Strait from Claude, Cursor or Codex (MCP)
After this page, your AI tool can create, find and pause Strait links, read your taps, installs and events, and check your App Links setup when you ask, with 31 tools and a secret key of its own.
On this page 7
- Time
- About 5 minutes
- You need
- A Strait workspace and Claude Code, Cursor, Claude Desktop or Codex (Node.js 20 or newer only for the local server)
- Works on
- Any (the hosted server) · macOS, Windows and Linux (the local server)
MCP (Model Context Protocol) is the standard way AI tools such as Claude and Cursor plug into other services. Strait gives you the same 31 tools two ways:
- Hosted:
https://strait.link/mcp. Nothing to install: your tool sends your secret key in anAuthorizationheader. Works in Claude Code, Cursor, VS Code and any client that can send a header. - Local:
@straitlink/mcpon npm (version 0.5.0 since 26 October 2026). Your tool starts it on your computer. Use it for Claude Desktop and Codex.
Sign-in with OAuth (no key to copy) is not available yet, so the Claude web connector, which needs OAuth, can't use the hosted server today.
1. Make a secret key for your AI tool
Do this: open Dashboard → Settings → Secret keys and create a key named after the tool, for example claude-code. Pick Read only if the tool should only look, or Full access to let it create and pause links (what each access allows). Copy it (it starts with st_live_…). The dashboard shows it only once.
You should see: the new key in the list, with its name. A key of its own means you can revoke it later without touching your servers.
2. Add Strait to your AI tool
Do this: pick your tool and paste its block. Put your key where it says st_live_…your_key.
Claude Code (plugin, hosted): in Claude Code, run /plugin install strait --marketplace strait-link/strait-mcp. It asks for the key when you enable it, keeps it in your system's credential store, and also adds the strait-setup skill that sets Strait up in an app. Or, without the plugin, in a terminal run:
claude mcp add --transport http strait https://strait.link/mcp --header "Authorization: Bearer st_live_…your_key"Cursor (hosted): put this in ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project; don't commit that file with a key in it):
{
"mcpServers": {
"strait": {
"url": "https://strait.link/mcp",
"headers": { "Authorization": "Bearer st_live_…your_key" }
}
}
}Claude Desktop (local): open Settings → Developer → Edit config, add this inside the file, then quit and reopen Claude Desktop.
{
"mcpServers": {
"strait": {
"command": "npx",
"args": ["-y", "@straitlink/mcp"],
"env": { "STRAIT_SECRET_KEY": "st_live_…your_key" }
}
}
}Codex (local): add this to ~/.codex/config.toml:
[mcp_servers.strait]
command = "npx"
args = ["-y", "@straitlink/mcp"]
env = { STRAIT_SECRET_KEY = "st_live_…your_key" }The local server also works in Claude Code and Cursor: claude mcp add strait --env STRAIT_SECRET_KEY=st_live_…your_key -- npx -y @straitlink/mcp.
You should see: a server called strait marked connected, with 31 tools under it. In Claude Code, type /mcp; in Cursor, open Settings → MCP.
3. Ask it something that reads
Do this: in a chat, ask: "List my Strait links."
You should see: your links with their short URLs, the same ones as Dashboard → Links. With no links yet, the answer is an empty list.
4. Make a test link, then pause it
Do this: ask: "Create a Strait link mcp-test to https://shop.example.com/product/42." Then ask: "Pause mcp-test."
You should see: a short URL like https://hilltop.strait.link/mcp-test, listed in Dashboard → Links. For the pause, the tool first shows you the link and asks you to confirm; nothing changes until you say yes.
What the 31 tools do
Eleven tools write; twenty only read. Every write that changes something live shows a preview first and acts only after you confirm. There is no delete tool: a paused link keeps its history.
| Group | Tools |
|---|---|
| Links and QR codes | create, batch create, get, list, search, update, pause, resume, deactivate, QR code |
| Analytics, taps and events | analytics, compare two periods, top links, recent taps, recent events, record an event, usage, referrals |
| Setup checks and custom domains | your workspace and key, App Links check, any-link check, simulate a tap, trace a link, custom domains, docs search |
| Webhooks | list webhooks, deliveries, send a test, redeliver |
Things to ask: "How did this week do against last week, by channel?", "Did my test tap just now open the app?", "Is links.example.com set up yet?", "My webhook stopped firing: show its last deliveries and send it a test."
Common errors
- 401 "invalid API key" or "needs a secret key". The key is missing, mistyped, revoked or a publishable key. Make a secret key in step 1 and paste it again, keeping
Bearerbefore it for the hosted server. - 429 "rate_limited". The hosted server takes 60 requests in a burst, then 1 a second, per key; 20 wrong keys from one network pause it for a minute. Wait a moment and ask again.
- The local server doesn't start. Check
node --versionprints 20 or higher, or use the hosted server instead.