MCP Server Overview
The Model Context Protocol (MCP) is an open standard that lets AI agents interact with external tools and data sources through a uniform interface.
lnkify ships a full MCP server so AI agents can create, list, update, and delete shortlinks and read click analytics — all authenticated with an lnkify API key.
Protocol
lnkify speaks Streamable HTTP — a JSON-RPC 2.0 transport over standard HTTP POST, GET, and DELETE.
- Base URL:
https://mcp.lnkify.io/(root path is the MCP endpoint) - Transport: Streamable HTTP (SSE-capable)
- Wire format: JSON-RPC 2.0
Sessions
Sessions are stateful. When you send an initialize request the server creates a session and returns an Mcp-Session-Id response header. Every subsequent request must include that header so the server knows which session you belong to.
Authentication
Every request must carry an API key via x-api-key or Authorization: Bearer. Auth is checked per-request — there is no "login" step beyond including the header.
x-api-key: lf_live_YOUR_KEYSee Authentication for details.
What You Can Do
| Capability | Tools |
|---|---|
| Manage links | create_lnkify, update_lnkifies, delete_lnkifies |
| Read links | whoami, list_lnkifies, get_lnkify |
| Analytics | get_hit_stats |
| Data access | lnkify://list, lnkify://{id} (resources) |
Quick Example
Initialize a session:
curl -v -X POST https://mcp.lnkify.io/ \
-H "Content-Type: application/json" \
-H "x-api-key: lf_live_YOUR_KEY" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0.0"}},"id":1}'Look for the Mcp-Session-Id response header — that is your session token for subsequent calls.
Next: Connecting