Skip to content

MCP Tools

lnkify exposes twenty tools via the MCP server. Use tools/list to enumerate them at runtime and tools/call to invoke them.

Calling a Tool

Every tool invocation is a tools/call JSON-RPC request:

json
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "create_lnkify",
    "arguments": {
      "target": "https://example.com",
      "slug": "my-link"
    }
  },
  "id": 2
}

Responses follow the MCP content format:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{...}" }]
  },
  "id": 2
}

whoami

Returns the authenticated user's identity.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"whoami","arguments":{}},"id":1}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"userId\":\"usr_abc123\"}" }]
  },
  "id": 1
}

list_lnkifies

List all shortlinks owned by the authenticated user.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"list_lnkifies","arguments":{}},"id":2}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "[{\"id\":\"lnk_001\",\"target\":\"https://example.com\",\"slug\":\"my-link\",\"title\":\"Example\",\"hitCount\":42}]" }]
  },
  "id": 2
}

get_lnkify

Get a single shortlink by id. Ownership-scoped — you can only read your own links.

Input:

FieldTypeRequiredDescription
idstringyesThe shortlink ID

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_lnkify","arguments":{"id":"lnk_001"}},"id":3}'

Response (success):

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"id\":\"lnk_001\",\"target\":\"https://example.com\",\"slug\":\"my-link\",\"title\":\"Example\",\"hitCount\":42}" }]
  },
  "id": 3
}

Response (not found):

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"error\":\"Shortlink not found\"}" }]
  },
  "id": 3
}

create_lnkify

Create a new shortlink.

Input:

FieldTypeRequiredDescription
targetstring (URL)yesDestination URL — absolute http(s)://, ≤ 2048 chars
slugstringnoCustom slug (auto-generated if omitted)
domainIdstringnoCustom domain ID to attach the shortlink to
rulesobject[]noArray of { type, value, target } routing rules

Validation. target is rejected unless it is an absolute http(s):// URL of at most 2048 characters (no javascript:, data:, relative paths, etc.). A custom slug may contain only A-Z a-z 0-9 _ - (≤ 100 chars) and may not be a reserved path. Concurrent creates of the same slug return {"error":"Slug already exists"} rather than failing.

Supports idempotency via _meta.idempotencyKey.

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"create_lnkify","arguments":{"target":"https://example.com","slug":"my-link"},"_meta":{"idempotencyKey":"req-abc-123"}},"id":4}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"id\":\"lnk_002\",\"target\":\"https://example.com\",\"slug\":\"my-link\",\"shortUrl\":\"https://lnkify.io/my-link\"}" }]
  },
  "id": 4
}

update_lnkifies

Bulk update shortlinks. Ownership-scoped — you can only update your own links.

Input:

FieldTypeRequiredDescription
inputsobject[]yesArray of update items (1–100)

Each item in inputs:

FieldTypeRequiredDescription
idstringyesShortlink ID to update
targetstring (URL)noNew target URL — absolute http(s)://, ≤ 2048 chars
titlestringnoNew title
enableTrackingbooleannoToggle click tracking

A provided target is validated with the same http(s)://-only, ≤ 2048-char rule as create. Supports idempotency via _meta.idempotencyKey.

Routing rules

update_lnkifies does not change routing rules over MCP. To edit a link's rules, use the GraphQL updateLnkifies mutation (its UpdateLnkifyInput accepts rules) or the dashboard's edit dialog.

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"update_lnkifies","arguments":{"inputs":[{"id":"lnk_001","title":"Updated Title"},{"id":"lnk_002","target":"https://new-url.com"}]},"_meta":{"idempotencyKey":"req-def-456"}},"id":5}'

Response (partial success):

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "[{\"id\":\"lnk_001\",\"ok\":true},{\"id\":\"lnk_002\",\"ok\":false,\"error\":\"Permission denied\"}]" }]
  },
  "id": 5
}

delete_lnkifies

Bulk delete shortlinks. Ownership-scoped — you can only delete your own links.

Input:

FieldTypeRequiredDescription
idsstring[]yesShortlink IDs to delete (1–100)

Supports idempotency via _meta.idempotencyKey.

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"delete_lnkifies","arguments":{"ids":["lnk_001","lnk_002"]},"_meta":{"idempotencyKey":"req-ghi-789"}},"id":6}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "[{\"index\":0,\"id\":\"lnk_001\",\"ok\":true},{\"index\":1,\"id\":\"lnk_002\",\"ok\":true}]" }]
  },
  "id": 6
}

get_hit_stats

Get click analytics for a shortlink. Ownership-scoped.

Input:

FieldTypeRequiredDescription
idstringyesThe shortlink ID

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_hit_stats","arguments":{"id":"lnk_001"}},"id":7}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"hitCount\":142,\"hits\":[{\"timestamp\":\"2026-06-12T10:00:00Z\",\"userAgent\":\"Mozilla/5.0...\",\"ip\":\"...\",\"country\":\"US\"}],\"byCountry\":[{\"country\":\"US\",\"count\":100},{\"country\":\"DE\",\"count\":42}]}" }]
  },
  "id": 7
}

add_domain

Add a custom domain for shortlinks. Requires a paid plan (Starter or Pro).

Input:

FieldTypeRequiredDescription
hostnamestringyesCustom domain hostname (e.g., short.example.com)

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"add_domain","arguments":{"hostname":"short.example.com"}},"id":8}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"id\":\"dom_001\",\"hostname\":\"short.example.com\",\"verified\":false,\"txtToken\":\"lnkify-verify=abc123\"}" }]
  },
  "id": 8
}

verify_domain

Verify a custom domain by checking for the DNS TXT record created by add_domain.

Input:

FieldTypeRequiredDescription
idstringyesThe domain ID to verify

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"verify_domain","arguments":{"id":"dom_001"}},"id":9}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"verified\":true}" }]
  },
  "id": 9
}

list_domains

List all custom domains owned by the authenticated user. Supports limit/cursor pagination.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"list_domains","arguments":{}},"id":10}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "[{\"id\":\"dom_001\",\"hostname\":\"short.example.com\",\"verified\":true,\"sslStatus\":\"active\"}]" }]
  },
  "id": 10
}

delete_domain

Delete a custom domain. Ownership-scoped.

Input:

FieldTypeRequiredDescription
idstringyesThe domain ID to delete

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"delete_domain","arguments":{"id":"dom_001"}},"id":11}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"deleted\":true}" }]
  },
  "id": 11
}

get_qr_code

Generate a QR code for a shortlink. Ownership-scoped — only the link's owner can generate its QR code.

Input:

FieldTypeRequiredDescription
slugstringyesThe shortlink slug
domainIdstringnoCustom domain ID, for a link on a custom domain
formatstringnoOutput format: svg (default), png, or data
sizenumbernoQR code size in pixels (64–1024)
eccstringnoError correction level: L, M (default), Q, H

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_qr_code","arguments":{"slug":"my-link","format":"svg","size":256}},"id":12}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"url\":\"https://lnkify.io/my-link?qr=1\",\"qrCode\":\"<svg xmlns=\\\"...\\\">...</svg>\",\"format\":\"svg\",\"size\":256}" }]
  },
  "id": 12
}

create_webhook

Create a webhook endpoint for link click events.

Input:

FieldTypeRequiredDescription
urlstring (URL)yesWebhook destination URL
eventsstring[]yesEvent types to subscribe to (link.created, link.clicked, bio.viewed)

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"create_webhook","arguments":{"url":"https://myapp.example.com/webhook","events":["link.created","link.clicked"]}},"id":13}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"id\":\"wh_001\",\"url\":\"https://myapp.example.com/webhook\",\"events\":[\"link.created\",\"link.clicked\"],\"secret\":\"whsec_...\"}" }]
  },
  "id": 13
}

list_webhooks

List all webhook endpoints owned by the authenticated user. Supports limit/cursor pagination.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"list_webhooks","arguments":{}},"id":14}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "[{\"id\":\"wh_001\",\"url\":\"https://myapp.example.com/webhook\",\"events\":[\"link.created\",\"link.clicked\"]}]" }]
  },
  "id": 14
}

delete_webhook

Delete a webhook endpoint. Ownership-scoped.

Input:

FieldTypeRequiredDescription
idstringyesThe webhook ID to delete

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"delete_webhook","arguments":{"id":"wh_001"}},"id":15}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"deleted\":true}" }]
  },
  "id": 15
}

create_bio_page

Create a link-in-bio page.

Input:

FieldTypeRequiredDescription
slugstringyesURL slug for the bio page
themestringnoVisual theme name
titlestringnoPage title

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"create_bio_page","arguments":{"slug":"my-links","title":"My Links"}},"id":16}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"id\":\"bio_001\",\"slug\":\"my-links\",\"title\":\"My Links\"}" }]
  },
  "id": 16
}

Add a link to a bio page.

Input:

FieldTypeRequiredDescription
bioPageIdstringyesThe bio page ID
urlstring (URL)yesThe link URL — validated against bioLinkUrlSchema (allows http(s)://, mailto:, tel:, and other safe schemes)
labelstringnoDisplay label for the link
ordernumbernoSort order (default 0)

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"add_bio_link","arguments":{"bioPageId":"bio_001","url":"https://example.com","label":"My Website","order":0}},"id":17}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"id\":\"biol_001\",\"bioPageId\":\"bio_001\",\"url\":\"https://example.com\",\"label\":\"My Website\",\"order\":0}" }]
  },
  "id": 17
}

list_bio_pages

List all bio pages owned by the authenticated user. Supports limit/cursor pagination. Includes nested links sorted by order.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"list_bio_pages","arguments":{}},"id":18}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "[{\"id\":\"bio_001\",\"slug\":\"my-links\",\"title\":\"My Links\",\"links\":[{\"id\":\"biol_001\",\"url\":\"https://example.com\",\"label\":\"My Website\",\"order\":0}]}]" }]
  },
  "id": 18
}

get_subscription

Get the authenticated user's subscription status, plan info, and entitlements.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_subscription","arguments":{}},"id":19}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"plan\":\"STARTER\",\"status\":\"ACTIVE\",\"effectivePlan\":\"STARTER\",\"currentPeriodEnd\":\"2026-07-01T00:00:00Z\",\"autoRefillEnabled\":false,\"entitlements\":{\"monthlyLinkQuota\":1000,\"customDomains\":3,\"maxWebhooks\":5,\"maxBioPages\":1,\"mcpAccess\":true,\"canBulk\":true}}" }]
  },
  "id": 19
}

Free-tier users receive a response with plan: "FREE" and zero/limited entitlements.


get_usage

Get the authenticated user's current usage meter — links created vs monthly allowance.

Input: none

Request:

bash
curl -X POST https://mcp.lnkify.io/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: lf_live_YOUR_KEY" \
  -H "Mcp-Session-Id: SESSION_ID" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_usage","arguments":{}},"id":20}'

Response:

json
{
  "jsonrpc": "2.0",
  "result": {
    "content": [{ "type": "text", "text": "{\"linksCreated\":42,\"allowance\":1000,\"refillLinks\":0,\"refillCount\":0,\"periodStart\":\"2026-06-01T00:00:00Z\",\"periodEnd\":\"2026-07-01T00:00:00Z\"}" }]
  },
  "id": 20
}

Free-tier users receive linksCreated: 0, allowance: 0 with null period boundaries.

Next: Resources

Released under the MIT License.