# enke MCP Server

Model Context Protocol server — expose en.ke link & document tools to AI agents (Claude Desktop, Cursor, any MCP client).

**Install:** `npm install -g enke-mcp-server` or `npx -y enke-mcp-server`
**Auth:** Run `enke login` first (shares auth with CLI). For remote (SSE) deployments, set `ENKE_API_KEY`.
**GitHub:** https://github.com/zenkeellc/enke-mcp-server
**Docs:** https://www.en.ke/agent/mcp

## Configuration

### Claude Desktop (`~/.config/claude/claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "enke": {
      "command": "npx",
      "args": ["-y", "enke-mcp-server"]
    }
  }
}
```

### Cursor (`~/.cursor/mcp.json`)
```json
{
  "mcpServers": {
    "enke": {
      "command": "npx",
      "args": ["-y", "enke-mcp-server"]
    }
  }
}
```

### Remote Transport (SSE)
```bash
ENKE_API_KEY=xxx ENKE_MCP_TRANSPORT=sse ENKE_MCP_PORT=3100 npx enke-mcp-server
```

Endpoints: `GET /sse`, `POST /message?sessionId=xxx`, `GET /health`

## 12 MCP Tools

| # | Tool | Description |
|---|------|-------------|
| 1 | `shorten_url` | Create a short link from a URL |
| 2 | `list_links` | List short links (up to 100) |
| 3 | `get_link_stats` | Click analytics: daily counts, referrers, geo, devices |
| 4 | `delete_link` | Permanently revoke a link (irreversible) |
| 5 | `update_link` | Modify link properties |
| 6 | `create_landing` | Create a landing page with multiple links |
| 7 | `upload_document` | Upload & share a file securely |
| 8 | `list_documents` | List documents with pagination |
| 9 | `get_document` | Get document details |
| 10 | `delete_document` | Delete a document (irreversible) |
| 11 | `update_document` | Update document settings |
| 12 | `renew_document` | Reset document expiration |