MCP Server Reference
Revolink supports the Model Context Protocol (MCP) — an open standard that lets AI assistants (Claude, Cursor, Windsurf, and others) interact with external services as tools.
Once configured, your AI assistant can create links, update routing rules, and pull analytics without you ever leaving the chat.
Endpoint
POST https://api.revolink.link/apiv1/mcp
Transport: Streamable HTTP (stateless, one request per tool call).
Authentication
Revolink MCP supports two ways to connect. Pick what fits your situation:
| API Key | OAuth 2.0 | |
|---|---|---|
| Best for | Scripts, dev tools, automation | claude.ai web, apps, teams |
| Setup | Generate a key, paste in config | Just paste the URL, approve access |
| Key management | You manage the key | None — handled automatically |
Method 1 — API Key
Generate a key in Profile → Integrations, enable the MCP scopes you need, and pass it in your client config. See Setup below for per-client instructions.
Errors:
| HTTP | Cause |
|---|---|
401 | Missing or invalid API key, or key has expired |
403 | Key exists but has no MCP scopes enabled |
Method 2 — OAuth 2.0
For clients like claude.ai (web) that support OAuth — no key needed. You approve access once, and the client handles everything automatically.
How to connect (claude.ai web):
- Go to Settings → Integrations in claude.ai.
- Click Add MCP server.
- Paste:
https://api.revolink.link/apiv1/mcp - Click Connect — you'll be redirected to Revolink to approve access.
- Done. Revolink tools are now available in your chat.
To revoke access at any time: Profile → Connected Apps → Revoke.
MCP Permissions
MCP permissions are separate from regular API permissions. A key can have full API access but zero MCP access — or vice versa. Available scopes:
| Scope | What it unlocks |
|---|---|
links:read | list_links, get_link |
links:write | create_link, update_link |
links:delete | delete_link |
links:bulk | bulk_create_links |
analytics:read | get_link_analytics, get_workspace_analytics |
For API key auth, scopes are configured per key under Profile → Integrations → MCP in the app.
For OAuth, scopes are requested by the client and approved by the user during the consent flow.
Setup
API Key — Step-by-step
- Go to Profile → Integrations in the Revolink app.
- Click Create API Key.
- Give the key a name (e.g.
Claude MCP). - Under MCP — enable the scopes you want to grant. Each scope can be enabled independently.
- Click Create and copy the key — it is shown only once.
A key with MCP enabled but no MCP scopes selected will be rejected at the MCP endpoint with a
403error.
Configure your AI client (API Key)
Claude Desktop (claude_desktop_config.json)
Claude Desktop uses stdio transport. Use the mcp-remote bridge to connect to Revolink's HTTP endpoint.
{
"mcpServers": {
"revolink": {
"command": "npx",
"args": [
"mcp-remote",
"https://api.revolink.link/apiv1/mcp",
"--header",
"X-Api-Key:YOUR_API_KEY"
]
}
}
}
Open via: Claude menu → Settings → Developer → Edit Config. Restart Claude Desktop after saving.
Claude Code (CLI)
claude mcp add --transport http revolink https://api.revolink.link/apiv1/mcp \
--header "X-Api-Key: YOUR_API_KEY"
Or add to .claude/settings.json:
{
"mcpServers": {
"revolink": {
"type": "http",
"url": "https://api.revolink.link/apiv1/mcp",
"headers": {
"X-Api-Key": "YOUR_API_KEY"
}
}
}
}
Cursor / Windsurf (.cursor/mcp.json or .codeium/windsurf/mcp_config.json)
{
"mcpServers": {
"revolink": {
"url": "https://api.revolink.link/apiv1/mcp",
"headers": {
"X-Api-Key": "YOUR_API_KEY"
}
}
}
}
VS Code (.vscode/mcp.json)
{
"servers": {
"revolink": {
"type": "http",
"url": "https://api.revolink.link/apiv1/mcp",
"headers": {
"X-Api-Key": "${input:revolinkApiKey}"
}
}
},
"inputs": [
{
"id": "revolinkApiKey",
"type": "promptString",
"description": "Revolink API Key",
"password": true
}
]
}
Requires VS Code 1.99+ with GitHub Copilot. The ${input:revolinkApiKey} prompt asks for your key on first use.
Zed (~/.config/zed/settings.json)
{
"context_servers": {
"revolink": {
"settings": {
"url": "https://api.revolink.link/apiv1/mcp",
"api_key": "YOUR_API_KEY"
}
}
}
}
Configure your AI client (OAuth)
claude.ai (web)
No config needed. When you add a new MCP server in claude.ai → Settings → Integrations, enter:
https://api.revolink.link/apiv1/mcp
Claude will redirect you to the Revolink consent page automatically.
Workspaces — automatic selection
You never need to specify a workspace ID manually. When you send a request without selecting a workspace, the server returns a list of your available workspaces. The AI picks the right one based on context, then continues the operation automatically. From your perspective this is invisible — just describe what you need in plain language.
Available Tools
list_links
Returns a paginated list of links in a workspace.
Required scope: links:read
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | — | Page number (default: 1) |
limit | integer | — | Links per page, 1–100 (default: 20) |
search | string | — | Filter by name or slug |
tagIds | string[] | — | Filter by tag IDs |
get_link
Returns full details of a single link including its routing rules.
Required scope: links:read
| Parameter | Type | Required | Description |
|---|---|---|---|
linkId | string | ✅ | Link ID |
create_link
Creates a new smart link with routing rules.
Required scope: links:write
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Link name (max 255 chars) |
rules | Rule[] | ✅ | Routing rules — see Rule object below. Exactly one must have isDefault: true |
slug | string | — | Custom slug (lowercase, hyphens allowed). Auto-generated if omitted |
domain | string | — | Custom domain. Defaults to workspace default |
description | string | — | Internal note (max 1000 chars) |
active | boolean | — | Whether the link is active (default: true) |
tagIds | string[] | — | Tag IDs to attach |
clicksLimit | integer | — | Deactivate link after N clicks. 0 = no limit |
expirationDate | string | — | ISO 8601 datetime. Link deactivates after this date |
conversionTracking | boolean | — | Enable conversion pixel |
gpsTracking | boolean | — | Enable GPS location capture on click |
abTest | AbTest | — | A/B test config — see A/B Test object below |
Example prompt:
"Create a link called 'Product Hunt Launch' that sends desktop visitors to the desktop landing page and mobile visitors to the mobile landing page."
update_link
Updates an existing link. Only include the fields you want to change.
Required scope: links:write
Same parameters as create_link, plus:
| Parameter | Type | Required | Description |
|---|---|---|---|
linkId | string | ✅ | ID of the link to update |
ogTitle | string | — | OG title shown when the link is shared on social (max 255 chars) |
ogDescription | string | — | OG description for social previews (max 500 chars) |
appearanceColor | string | — | Brand hex color (e.g. #FF5733) |
When
rulesis provided, the entire rules array is replaced. Include all rules you want to keep, not just the changed ones. The AI fetches existing rule IDs internally before updating.
delete_link
Permanently deletes a link.
Required scope: links:delete
| Parameter | Type | Required | Description |
|---|---|---|---|
linkId | string | ✅ | ID of the link to delete |
bulk_create_links
Creates multiple links in a single request. Subject to the plan's link quota.
Required scope: links:bulk
| Parameter | Type | Required | Description |
|---|---|---|---|
links | LinkInput[] | ✅ | Array of link objects (1–100). Each has the same fields as create_link |
The response includes created (succeeded) and failed (failed with reason) arrays, so partial success is possible.
get_link_analytics
Returns click analytics for a single link, broken down by country, device, browser, OS, routing rule, and A/B variant.
Required scope: analytics:read
| Parameter | Type | Required | Description |
|---|---|---|---|
linkId | string | ✅ | Link ID |
from | string | — | Start date YYYY-MM-DD (default: all time) |
to | string | — | End date YYYY-MM-DD (default: today) |
get_workspace_analytics
Returns aggregated click analytics across all links in a workspace.
Required scope: analytics:read
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | — | Start date YYYY-MM-DD (default: all time) |
to | string | — | End date YYYY-MM-DD (default: today) |
Rule Object
Every link must have at least one rule. Exactly one rule must have isDefault: true — this is the fallback when no other rule's conditions match. The default rule cannot have any conditions.
| Field | Type | Description |
|---|---|---|
targetUrl | string | Destination URL (required) |
isDefault | boolean | true for the fallback rule (required) |
country | string[] | ISO 3166-1 alpha-2 codes, e.g. ["UA", "DE"] |
city | string[] | City names. Requires country to be set |
device | string[] | "desktop" "mobile" "tablet" "console" "smarttv" "wearable" "embedded" |
os | string[] | "Windows" "macOS" "Linux" "iOS" "Android" |
browser | string[] | "Chrome" "Firefox" "Safari" "Edge" "Opera" "Brave" |
timeStart | string | Active window start "HH:MM" UTC. Must pair with timeEnd |
timeEnd | string | Active window end "HH:MM" UTC. Must pair with timeStart |
daysOfWeek | integer[] | Days: 0 = Sunday … 6 = Saturday |
locale | string[] | Browser language codes, e.g. ["uk", "en"] |
name | string | Optional label for this rule |
A/B Test Object
When abTest.enabled is true, clicks are split between variants according to their weights. Routing rules still apply first — the A/B split happens only for visitors matched by a given rule.
| Field | Type | Description |
|---|---|---|
enabled | boolean | true to activate A/B testing |
variants | Variant[] | At least 2 variants required when enabled |
Variant:
| Field | Type | Description |
|---|---|---|
url | string | Destination URL for this variant |
weight | number | Relative traffic share. E.g. 70 and 30 means a 70 %/30 % split |
Error Handling
The MCP server returns standard JSON-RPC errors. Tool-level errors use the following codes:
| Code | Meaning |
|---|---|
-32602 | Invalid params — bad input (validation error, slug taken, etc.) |
-32603 | Internal error — server-side failure |
HTTP-level errors (before the tool is called):
| HTTP | Cause |
|---|---|
401 | Missing or invalid API key / Bearer token |
403 | Key has no MCP permissions enabled, or key owner has no access to the workspace |
404 | Workspace not found |
Example Tool Calls
List your links:
"Show me all links in my workspace tagged
summer-sale."
Create a geo-targeted link:
"Create a link called 'App Download'. Send iOS users to the App Store, Android users to Google Play, and everyone else to the website."
Update routing rules:
"Update link
664a1b2c…— add a rule that redirects German visitors tohttps://de.example.com."
Get last week's analytics:
"What were the top countries for link
664a1b2c…last week?"