@lenkli/mcp-server
v0.1.0
Published
Official MCP (Model Context Protocol) server for Lenkli — give your AI agents the ability to create branded short links, generate QR codes, and read click analytics.
Maintainers
Readme
@lenkli/mcp-server
Official Model Context Protocol server for Lenkli — give your AI agents the ability to shorten URLs, generate dynamic QR codes, and read click analytics, all on your own branded domain.
Works with Claude Desktop, Cursor, Continue.dev, ChatGPT Connectors, Claude.ai web, and any MCP-compatible client.
Install (30 seconds)
Add this to your client's MCP config and you are done — sign-in happens automatically through your browser. No env vars, no copy-pasted API key.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"lenkli": {
"command": "npx",
"args": ["-y", "@lenkli/mcp-server"]
}
}
}Restart Claude Desktop. The first tool call opens your browser to authorize the workspace; subsequent calls reuse the saved token at ~/.lenkli/credentials.json.
If your client launched the server before you signed in, run this once in a terminal:
npx -y @lenkli/mcp-server loginCursor
~/.cursor/mcp.json:
{
"mcpServers": {
"lenkli": {
"command": "npx",
"args": ["-y", "@lenkli/mcp-server"]
}
}
}Continue.dev
~/.continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@lenkli/mcp-server"]
}
}
]
}
}Claude.ai web / ChatGPT Connectors / any HTTP client
These clients speak Streamable HTTP and OAuth 2.1 natively — point them at the hosted endpoint and the browser flow handles the rest:
https://lenkli.com/mcpNo npx, no local install, no env vars.
Tools
| Tool | Scope | Description |
| --- | --- | --- |
| create_link | write | Shorten a URL on your branded domain. Optional custom slug, title, description, in-app browser bypass. |
| list_links | read | Paginate workspace links. Filters: search, archived. |
| update_link | write | Change destination, title, or description. |
| delete_link | admin | Permanently delete. Requires Business plan. |
| get_analytics | read | Click totals, top countries, device breakdown for a link. Default range 30d. |
| create_qr_code | read | Render a QR code as base64 PNG or SVG for any link. |
Resources
| Resource | Description |
| --- | --- |
| lenkli://workspace | Plan, usage, API key scopes — useful for the agent to introspect what it can and cannot do. |
| lenkli://link/{id} | Full snapshot of a link including its current destination, click count, and creation metadata. |
CLI
npx -y @lenkli/mcp-server [command]
Commands:
(no command) Start the MCP server in stdio mode (default)
login Sign in via your browser, store the token locally
logout Forget the stored token
whoami Show which workspace the current token belongs to
help Show this message
--http Boot the HTTP transport instead of stdio
--port <n> Port for the HTTP transport (default 3333)Configuration
The server picks credentials in this order:
LENKLI_API_KEYenvironment variable — useful for headless or CI contexts where the browser flow is not appropriate. Get a key at lenkli.com/dashboard/api-keys.~/.lenkli/credentials.json— written bylogin, the default for desktop clients.
Additional optional env vars:
LENKLI_API_URL— override the API host (defaulthttps://lenkli.com). Used for staging or self-hosted instances.LENKLI_TELEMETRY— set to0,false, oroffto opt out of the anonymous adoption beacon. The beacon contains zero PII (tool name + duration + status + client name + version) and is fire-and-forget.
Plans
- Free — unlimited tool calls for the first 25 links per month.
- Pro ($9/mo) — unlimited links, custom domains, no watermark.
- Business ($25/mo) — team workspace,
adminscope for thedelete_linktool, deeper analytics retention.
See lenkli.com/pricing.
Privacy and security
- Tokens are stored at
~/.lenkli/credentials.jsonwith0600permissions on POSIX (owner read+write only). - The login flow is the OAuth 2.1 Device Authorization Grant — the same pattern as
gh auth login,vercel login,linear login. - The hosted endpoint at
https://lenkli.com/mcpadvertises OAuth 2.1 discovery viaWWW-Authenticateso HTTP clients can register themselves dynamically without any operator setup. - All data is EU-hosted (Hetzner Germany), GDPR-compliant by default.
Source + bug reports
Code lives in the Lenkli monorepo under apps/mcp-server/. Issues and pull requests welcome.
License
MIT
