The Surli Model Context Protocol (MCP) Server connects AI assistants directly to Surli's URL shortener infrastructure, enabling AI models to programmatically create, manage, inspect, and update short links in real-time.
By integrating Surli's MCP Server into your AI agent or workspace (Claude Desktop, Cursor, Antigravity, Windsurf, VS Code, Zed, etc.), your AI can autonomously shorten destination URLs, customize custom slugs/aliases, check plan quotas, and update destination targets.
https://mcp.surl.li/mcp
X-API-KEY) authentication.| Production Host: | mcp.surl.li |
| SSE Stream: | https://mcp.surl.li/mcp/sse |
| JSON-RPC Messages: | https://mcp.surl.li/mcp/messages |
| Metadata Discovery: | https://mcp.surl.li/mcp/metadata |
| Auth Types: | OAuth 2.0 X-API-KEY |
| Tools Count: | 5 Tools |
Connecting Surli MCP Server to your favorite AI environment takes less than a minute. Choose your AI client below or refer to the complete AI Clients Reference section.
Log in to your Surli account at surl.li, go to Account Settings → API Credentials, and copy your X-API-KEY.
Paste the production MCP endpoint URL into your AI editor or client settings:
https://mcp.surl.li/mcp/sse
Test your connection by asking your AI agent:
"Shorten https://github.com/surli with custom alias 'surli-mcp' using Surli tool."
The Model Context Protocol (MCP) is an open specification created by Anthropic that standardizes how Artificial Intelligence applications (LLMs, AI agents, IDEs) communicate with external data sources, APIs, and tools.
Instead of custom API integrations for every single AI app, MCP provides a unified JSON-RPC protocol over standard transports like SSE (Server-Sent Events) and HTTP.
tools/list JSON-RPC request to https://mcp.surl.li/mcp/messages.create_short_link, get_short_link, etc.) along with JSON schemas.tools/call JSON-RPC request.Surli MCP Server supports two flexible authentication mechanisms: API Key Authentication for direct client integration, and OAuth 2.0 (Google/Surli OAuth) for seamless browser-based authentication.
Pass your Surli API key using the standard X-API-KEY header or Authorization Bearer header.
X-API-KEY: YOUR_SURLI_API_KEY
Where to get: Copy your key from Surli Dashboard → API Keys.
For OAuth-enabled MCP clients (like Claude Desktop and custom OAuth portals), Surli MCP Server operates as a standard OAuth 2.0 authorization server.
| Metadata: | /.well-known/oauth-authorization-server |
| Authorize: | https://mcp.surl.li/oauth/authorize |
| Token: | https://mcp.surl.li/oauth/token |
| Register: | https://mcp.surl.li/oauth/register |
Surli MCP Server supports both Server-Sent Events (SSE) for real-time streaming sessions and Stateless HTTP JSON-RPC endpoints.
| Endpoint | Method | Transport Type | Description |
|---|---|---|---|
https://mcp.surl.li/mcp/sse |
GET | SSE (Server-Sent Events) | Establishes streaming SSE session and emits message endpoint URI. |
https://mcp.surl.li/mcp/messages |
POST | HTTP JSON-RPC 2.0 | Handles initialize, tools/list, and tools/call RPC messages. |
https://mcp.surl.li/mcp/metadata |
GET | JSON Metadata | Returns server capabilities, MCP protocol version, and active endpoint URLs. |
https://mcp.surl.li/mcp |
GET / POST | HTTP Endpoint | Unified MCP endpoint for HTTP JSON-RPC clients. |
Below are tested, production-ready configuration blocks for 11 popular AI clients and agent frameworks using the production endpoint https://mcp.surl.li/mcp and SSE stream https://mcp.surl.li/mcp/sse.
File location: %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"surli": {
"command": "npx",
"args": [
"-y",
"@openmcp/cli",
"run",
"https://mcp.surl.li/mcp/sse"
]
}
}
}
Open Cursor Settings → Features → MCP Servers, click + Add New MCP Server, select SSE type and enter URL, or add to .cursor/mcp.json:
{
"mcpServers": {
"surli": {
"url": "https://mcp.surl.li/mcp/sse"
}
}
}
Run in terminal: agy mcp add surli https://mcp.surl.li/mcp/sse or edit ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp/sse"
}
}
}
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp/sse"
}
}
}
In VS Code Roo Code tab, open MCP Settings and add SSE transport:
{
"mcpServers": {
"surli": {
"type": "sse",
"url": "https://mcp.surl.li/mcp/sse"
}
}
}
Edit cline_mcp_settings.json:
{
"mcpServers": {
"surli": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.surl.li/mcp/sse"]
}
}
}
Edit ~/.continue/config.json under experimental.mcpServers:
{
"experimental": {
"mcpServers": [
{
"name": "surli",
"url": "https://mcp.surl.li/mcp/sse"
}
]
}
}
Edit ~/.config/zed/settings.json under context_servers:
{
"context_servers": {
"surli": {
"settings": {
"url": "https://mcp.surl.li/mcp/sse"
}
}
}
}
Run command: goose mcp add surli -- sse https://mcp.surl.li/mcp/sse or edit ~/.config/goose/config.yaml:
mcp_servers:
surli:
type: sse
url: https://mcp.surl.li/mcp/sse
Add to your librechat.yaml under mcpServers:
mcpServers:
surli:
type: sse
url: https://mcp.surl.li/mcp/sse
mcp package):from mcp import ClientSession
from mcp.client.sse import sse_client
async def run_surli():
async with sse_client("https://mcp.surl.li/mcp/sse") as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print("Connected to Surli MCP! Tools available:", [t.name for t in tools.tools])
@modelcontextprotocol/sdk):import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
const transport = new SSEClientTransport(new URL("https://mcp.surl.li/mcp/sse"));
const client = new Client({ name: "SurliAgent", version: "1.0.0" }, { capabilities: {} });
await client.connect(transport);
const tools = await client.listTools();
console.log("Surli Tools:", tools);
Once Surli MCP Server is enabled in your AI agent, you can talk to your AI in plain conversational language. The AI agent will automatically call the appropriate Surli MCP tool.
"Hey, please shorten this destination link https://github.com/hypermans/dev-surli with custom alias 'dev-surli' and title 'Dev Surli Repo'."
create_short_link(destination_url='...', alias='dev-surli', title='Dev Surli Repo') and displays result.
"How many short links do I have left in my Surli account for this month?"
get_account_limits() and reports plan tier, used count, and remaining quota.
"Change the destination of link 'dev-surli' to point to https://surl.li/docs instead."
update_destination(surl='dev-surli', new_destination_url='https://surl.li/docs').
"Update the alias of link 'dev-surli' to 'surli-api'."
update_alias(surl='dev-surli', new_alias='surli-api').
| Error Code | Meaning | Solution |
|---|---|---|
UNAUTHORIZED |
Missing or invalid Surli API Key. | Log in to Surli and copy a valid API key into your client config or authenticate via OAuth. |
LIMIT_EXHAUSTED |
Monthly short link quota reached. | Upgrade plan tier at surl.li/en/tarif. |
INVALID_URL |
Malformed destination URL. | Provide valid absolute URL starting with http:// or https://. |
FEATURE_NOT_AVAILABLE |
Custom alias update not supported on plan. | Upgrade plan tier to Start/Basic/Pro to enable custom alias updates. |