← All Tools

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 login

Install

npm install -g enke-mcp-server

Or run directly without installing:

npx -y enke-mcp-server

Authentication

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-server

Cursor

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 mcp

Remote 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
EnvDefaultDescription
ENKE_MCP_TRANSPORTstdioTransport: stdio or sse
ENKE_MCP_PORT3100HTTP port (SSE mode)
ENKE_API_KEY—API key for remote auth

Endpoints (SSE mode):

  • GET /sse — SSE stream (requires Authorization: Bearer <token>)
  • POST /message?sessionId=xxx — MCP message dispatch
  • GET /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" }
ParamTypeDescription
urlstring (URL)Required. The long URL to shorten.
slugstringCustom short back-half. Min 1 char.
passwordstringPassword-protect the link. Min 1 char.
expiresInenum24h
webhookUrlstring (URL)Webhook called on each click.

list_links

List short links. Returns up to 100 results.

ParamTypeDefaultDescription
limitnumber20Max results (1–100).
searchstring—Filter by slug or URL.

get_link_stats

Click analytics: daily counts, top referrers, geo distribution, device types.

ParamTypeDescription
idstringRequired. 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.

ParamTypeDescription
idstringRequired. Slug to update.
slugstringNew custom slug. Min 1 char.
passwordstringNew password. Min 1 char.
expiresInenum24h
webhookUrlstring (URL)New webhook URL.

create_landing

Create a landing page with multiple links.

ParamTypeDescription
titlestringRequired. Page title. Min 1 char.
links[{url, label}]Required. Array of URL+label pairs.
slugstringCustom slug. Min 1 char.
themeenumdark

Document Tools

upload_document

Upload and share a file. Returns https://en.ke/{slug} with preview page.

ParamTypeDefaultDescription
file_pathstring—Required. Absolute path to file.
exp_daysnumber30Expiration (1–365).
passwordstring—Password (min 4 chars).
burn_after_readingbooleanfalseDelete after first download.
disable_downloadbooleanfalsePreview only.
max_downloadsnumber0Max downloads (0=unlimited).
commentstring—Owner-facing note.

list_documents

ParamDefaultDescription
cursor—Pagination cursor.
limit20Items per page (1–100).

get_document

slugstringRequired. Document slug.

delete_document

slugstringRequired. Irreversible.

update_document

ParamTypeDescription
slugstringRequired.
exp_daysnumberNew expiration (1–365).
passwordstringNew password.
burn_after_readingbooleanToggle burn.
disable_downloadbooleanToggle download.
max_downloadsnumberNew max downloads.

renew_document

slugstringRequired. Reset expiration to plan default.

Tool Summary

#ToolDescription
1shorten_urlCreate a short link
2list_linksList short links
3get_link_statsClick analytics
4delete_linkRevoke a link
5update_linkModify link properties
6create_landingCreate landing page
7upload_documentUpload & share a file
8list_documentsList documents
9get_documentGet document details
10delete_documentDelete a document
11update_documentUpdate document settings
12renew_documentReset document expiration

Cookie Usage Notice

We use necessary cookies to enhance your browsing experience, analyze website traffic, and provide personalized content based on your interests. By clicking "Accept All Cookies," you consent to the storage and use of cookies.

Learn more

Cookie Usage Notice

We use necessary cookies to enhance your browsing experience, analyze website traffic, and provide personalized content based on your interests. By clicking "Accept All Cookies," you consent to the storage and use of cookies.

Learn more