enke MCP Server
Model Context Protocol server — expose en.ke link & document tools to AI agents (Claude Desktop, Cursor, any MCP client).
Prerequisites
The MCP server reuses the enke CLI login. Install it and sign in once:
npm install -g enke-cli && enke loginInstall
npm install -g enke-mcp-serverOr run directly without installing:
npx -y enke-mcp-serverAuthentication
The MCP server shares authentication with the enke CLI. Run enke login first.
For remote (SSE) deployments, set ENKE_API_KEY environment variable.
Create an API key under API Keys. Keys carry the same permissions as your account.
Local Transport (stdio)
For Claude Desktop, Claude Code, Cursor, and other local MCP clients.
Claude Desktop
Open Settings → Developer → Edit Config in Claude Desktop and paste the block below. The file lives at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows.
{
"mcpServers": {
"enke": {
"command": "npx",
"args": ["-y", "enke-mcp-server"]
}
}
}Claude Code
Register the server once — it is then available in every session:
claude mcp add enke -- npx -y enke-mcp-serverCursor
Cursor — add to ~/.cursor/mcp.json:
{
"mcpServers": {
"enke": {
"command": "npx",
"args": ["-y", "enke-mcp-server"]
}
}
}On Windows, wrap the command like this: "command": "cmd", "args": ["/c", "npx", "-y", "enke-mcp-server"]
Already included in the CLI
enke CLI 1.8+ ships the same server: run enke mcp. It also exposes memory, context-share, and device-pairing tools on top of the 12 tools below.
enke mcpRemote Transport (SSE)
For cloud deployments or remote agent platforms.
ENKE_API_KEY=xxx ENKE_MCP_TRANSPORT=sse ENKE_MCP_PORT=3100 npx enke-mcp-server| Env | Default | Description |
|---|---|---|
ENKE_MCP_TRANSPORT | stdio | Transport: stdio or sse |
ENKE_MCP_PORT | 3100 | HTTP port (SSE mode) |
ENKE_API_KEY | — | API key for remote auth |
Endpoints (SSE mode):
GET /sse— SSE stream (requiresAuthorization: Bearer <token>)POST /message?sessionId=xxx— MCP message dispatchGET /health— Health check
Tools Reference
shorten_url
Create a short link from a URL.
{
"url": "https://example.com/long-path",
"slug": "my-link",
"password": "optional",
"expiresIn": "7d",
"webhookUrl": "https://my.app/webhook"
}| Param | Type | Description |
|---|---|---|
url | string (URL) | Required. The long URL to shorten. |
slug | string | Custom short back-half. Min 1 char. |
password | string | Password-protect the link. Min 1 char. |
expiresIn | enum | 24h |
webhookUrl | string (URL) | Webhook called on each click. |
list_links
List short links. Returns up to 100 results.
| Param | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Max results (1–100). |
search | string | — | Filter by slug or URL. |
get_link_stats
Click analytics: daily counts, top referrers, geo distribution, device types.
| Param | Type | Description |
|---|---|---|
id | string | Required. Slug or ID of the link. |
delete_link
Permanently revoke a link. The short URL stops redirecting immediately. Irreversible.
update_link
Update link properties. The target URL cannot be changed.
| Param | Type | Description |
|---|---|---|
id | string | Required. Slug to update. |
slug | string | New custom slug. Min 1 char. |
password | string | New password. Min 1 char. |
expiresIn | enum | 24h |
webhookUrl | string (URL) | New webhook URL. |
create_landing
Create a landing page with multiple links.
| Param | Type | Description |
|---|---|---|
title | string | Required. Page title. Min 1 char. |
links | [{url, label}] | Required. Array of URL+label pairs. |
slug | string | Custom slug. Min 1 char. |
theme | enum | dark |
Document Tools
upload_document
Upload and share a file. Returns https://en.ke/{slug} with preview page.
| Param | Type | Default | Description |
|---|---|---|---|
file_path | string | — | Required. Absolute path to file. |
exp_days | number | 30 | Expiration (1–365). |
password | string | — | Password (min 4 chars). |
burn_after_reading | boolean | false | Delete after first download. |
disable_download | boolean | false | Preview only. |
max_downloads | number | 0 | Max downloads (0=unlimited). |
comment | string | — | Owner-facing note. |
list_documents
| Param | Default | Description |
|---|---|---|
cursor | — | Pagination cursor. |
limit | 20 | Items per page (1–100). |
get_document
slug | string | Required. Document slug. |
delete_document
slug | string | Required. Irreversible. |
update_document
| Param | Type | Description |
|---|---|---|
slug | string | Required. |
exp_days | number | New expiration (1–365). |
password | string | New password. |
burn_after_reading | boolean | Toggle burn. |
disable_download | boolean | Toggle download. |
max_downloads | number | New max downloads. |
renew_document
slug | string | Required. Reset expiration to plan default. |
Tool Summary
| # | Tool | Description |
|---|---|---|
| 1 | shorten_url | Create a short link |
| 2 | list_links | List short links |
| 3 | get_link_stats | Click analytics |
| 4 | delete_link | Revoke a link |
| 5 | update_link | Modify link properties |
| 6 | create_landing | Create landing page |
| 7 | upload_document | Upload & share a file |
| 8 | list_documents | List documents |
| 9 | get_document | Get document details |
| 10 | delete_document | Delete a document |
| 11 | update_document | Update document settings |
| 12 | renew_document | Reset document expiration |