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:
{
"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:
{
"jsonrpc": "2.0",
"result": {
"content": [{ "type": "text", "text": "{...}" }]
},
"id": 2
}whoami
Returns the authenticated user's identity.
Input: none
Request:
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:
{
"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:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The shortlink ID |
Request:
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):
{
"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):
{
"jsonrpc": "2.0",
"result": {
"content": [{ "type": "text", "text": "{\"error\":\"Shortlink not found\"}" }]
},
"id": 3
}create_lnkify
Create a new shortlink.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
target | string (URL) | yes | Destination URL — absolute http(s)://, ≤ 2048 chars |
slug | string | no | Custom slug (auto-generated if omitted) |
domainId | string | no | Custom domain ID to attach the shortlink to |
rules | object[] | no | Array 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:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
inputs | object[] | yes | Array of update items (1–100) |
Each item in inputs:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Shortlink ID to update |
target | string (URL) | no | New target URL — absolute http(s)://, ≤ 2048 chars |
title | string | no | New title |
enableTracking | boolean | no | Toggle 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:
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):
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | yes | Shortlink IDs to delete (1–100) |
Supports idempotency via _meta.idempotencyKey.
Request:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The shortlink ID |
Request:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
hostname | string | yes | Custom domain hostname (e.g., short.example.com) |
Request:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The domain ID to verify |
Request:
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:
{
"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:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The domain ID to delete |
Request:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | yes | The shortlink slug |
domainId | string | no | Custom domain ID, for a link on a custom domain |
format | string | no | Output format: svg (default), png, or data |
size | number | no | QR code size in pixels (64–1024) |
ecc | string | no | Error correction level: L, M (default), Q, H |
Request:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
url | string (URL) | yes | Webhook destination URL |
events | string[] | yes | Event types to subscribe to (link.created, link.clicked, bio.viewed) |
Request:
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:
{
"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:
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:
{
"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:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The webhook ID to delete |
Request:
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:
{
"jsonrpc": "2.0",
"result": {
"content": [{ "type": "text", "text": "{\"deleted\":true}" }]
},
"id": 15
}create_bio_page
Create a link-in-bio page.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | yes | URL slug for the bio page |
theme | string | no | Visual theme name |
title | string | no | Page title |
Request:
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:
{
"jsonrpc": "2.0",
"result": {
"content": [{ "type": "text", "text": "{\"id\":\"bio_001\",\"slug\":\"my-links\",\"title\":\"My Links\"}" }]
},
"id": 16
}add_bio_link
Add a link to a bio page.
Input:
| Field | Type | Required | Description |
|---|---|---|---|
bioPageId | string | yes | The bio page ID |
url | string (URL) | yes | The link URL — validated against bioLinkUrlSchema (allows http(s)://, mailto:, tel:, and other safe schemes) |
label | string | no | Display label for the link |
order | number | no | Sort order (default 0) |
Request:
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:
{
"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:
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:
{
"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:
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:
{
"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:
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:
{
"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