Skip to main content

MCP server

The LinkLane MCP server lets Claude work with your links. Ask Claude to make a short link, find last month's busiest link, or tag a batch of links, and it calls the LinkLane API for you.

The server runs on your computer and talks to Claude over stdio. It works in Claude Code and the Claude desktop app. It signs in with your API key, so it needs the Pro plan or above.

Tools​

ToolWhat it doesKey scope
linklane_create_linkCreate a short link: alias, tags, UTM, expiry, click limit, start time, campaign, domain.links:write
linklane_list_linksList or search links by code or destination, with filters and paging.links:read
linklane_get_linkGet all settings of one link.links:read
linklane_update_linkChange a link. Uses clear_* flags to remove a setting.links:write
linklane_get_link_analyticsClicks, unique clicks, conversions, daily trend, top countries, referrers, devices and browsers.analytics:read
linklane_get_account_overviewLink count, lifetime clicks and the last 14 days.analytics:read
linklane_get_account_analyticsAnalytics across all links. Pro and above.analytics:read
linklane_list_campaignsList campaigns with link count and clicks.links:read
linklane_list_domainsList custom domains.links:read

Tools that take a link accept its id, its short code (spring-sale) or the full short URL.

The server doesn't delete links. To hide one from your list, Claude archives it. The short URL keeps working. It also only reads campaigns and domains: create and verify those in the app.

1. Create an API key​

On the API Keys page in the app, create a key with links:read, links:write and analytics:read. For read-only use, leave out links:write. Copy the key; LinkLane shows it once. See Authentication.

The key can read and change every link in your workspace. Keep it out of git.

2. Install the server​

You need Node.js 20 or later and the mcp-server folder from the LinkLane source.

cd mcp-server
yarn install --frozen-lockfile

3. Connect Claude​

Add the server for yourself. This stores it in your local Claude Code config:

claude mcp add linklane -e LINKLANE_API_KEY=ll_live_your_key -- node /absolute/path/to/mcp-server/src/index.js

Or share the setup with your team in a project .mcp.json. Each person keeps the key in their own environment, so it isn't committed:

.mcp.json
{
"mcpServers": {
"linklane": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/src/index.js"],
"env": { "LINKLANE_API_KEY": "${LINKLANE_API_KEY}" }
}
}
}

Run /mcp in Claude Code to check that linklane is connected.

Settings​

VariableRequiredDefault
LINKLANE_API_KEYYes
LINKLANE_API_URLNohttps://api.linklane.io

LINKLANE_API_URL must use https://. Plain http:// works only for localhost.

Errors Claude may report​

StatusMeaning
401The key is wrong, revoked or missing.
402Your plan doesn't include the feature, or you hit a usage limit. The message says which.
403The key lacks the scope the tool needs.
429The key made more than 100 requests in a minute.