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 desktop workspace (Claude Desktop, Cursor, Google Antigravity, VS Code, Windsurf, etc.), your AI can autonomously shorten URLs, customize aliases, check quotas, and update destinations. Claude Desktop connects with zero API keys via native 1-click OAuth, while clients without OAuth (such as Google Antigravity, Windsurf, Zed, or CLI tools) authenticate by passing a Surli API key via HTTP headers (Authorization: Bearer and X-API-KEY).
https://mcp.surl.li/mcp
Authorization & X-API-KEY) for Google Antigravity & non-OAuth tools.| Production Host: | mcp.surl.li |
| MCP Endpoint: | https://mcp.surl.li/mcp |
| OAuth Authorize: | https://mcp.surl.li/oauth/authorize |
| Metadata Discovery: | /.well-known/oauth-authorization-server |
| Auth Protocol: | OAuth 2.0 API Key |
| Tools Count: | 5 Tools |
Connecting Surli MCP Server to your AI environment takes less than a minute. For Claude Desktop, no API key is needed (native 1-click OAuth). For Google Antigravity and other clients without OAuth, pass your Surli API key in headers.
Use the production MCP server endpoint:
https://mcp.surl.li/mcp
Claude Desktop (Zero API Key):
{"mcpServers":{"surli":{"url":"https://mcp.surl.li/mcp"}}}
Antigravity / Non-OAuth (API Key):
{"mcpServers":{"surli":{"serverUrl":"https://mcp.surl.li/mcp","headers":{"Authorization":"Bearer YOUR_API_KEY","X-API-KEY":"YOUR_API_KEY"}}}}
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 protocol supporting OAuth 2.0 and API Key (Bearer Token) authorization over standard transports like HTTP and SSE (Server-Sent Events).
Authorization: Bearer YOUR_API_KEY and X-API-KEY: YOUR_API_KEY).tools/list JSON-RPC request to https://mcp.surl.li/mcp.create_short_link, get_short_link, etc.) along with JSON schemas.tools/call JSON-RPC request.Surli MCP Server supports two authentication paths: Native 1-Click OAuth 2.0 (zero API keys needed) and API Key Headers (required for clients without OAuth).
Authorization and X-API-KEY).Designed for desktop AI clients like Claude Desktop that support native RFC 8414 OAuth authorization. No API key is required — just supply the endpoint URL, and your client automatically opens a browser tab for 1-click login.
| Endpoint URI | Description |
|---|---|
/.well-known/oauth-authorization-server |
RFC 8414 discovery endpoint. |
https://mcp.surl.li/oauth/authorize |
Browser authorization URL. |
https://mcp.surl.li/oauth/token |
Token exchange endpoint. |
Required only for clients without browser OAuth support (such as Google Antigravity, Windsurf, Zed, CLI daemons, and programmatic SDKs).
Authorization: Bearer YOUR_API_KEYX-API-KEY: YOUR_API_KEY{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
Passing both Authorization and X-API-KEY headers ensures immediate authentication across headless clients and proxies.
Surli MCP Server supports both API Key (Authorization & X-API-KEY) authentication and OAuth 2.0 Authorization alongside standard HTTP JSON-RPC and Server-Sent Events (SSE) streaming transports.
| Endpoint | Method | Type / Protocol | Description |
|---|---|---|---|
https://mcp.surl.li/mcp |
GET / POST | Unified MCP Endpoint | Primary production MCP endpoint with support for API Key (Authorization & X-API-KEY) and OAuth 2.0 auth. |
https://mcp.surl.li/oauth/authorize |
GET | OAuth 2.0 Authorize | Browser login flow for AI client OAuth 2.0 token authorization. |
https://mcp.surl.li/oauth/token |
POST | OAuth 2.0 Token | Exchange OAuth code/refresh token for MCP access credentials. |
https://mcp.surl.li/mcp/sse |
GET | SSE (Server-Sent Events) | Streaming SSE transport session endpoint. |
https://mcp.surl.li/mcp/messages |
POST | HTTP JSON-RPC 2.0 | Handles raw initialize, tools/list, and tools/call RPC messages. |
Surli MCP Server supports two authentication paths: Native 1-Click OAuth 2.0 and API Key Headers.
Claude Desktop supports native 1-click browser OAuth. You do NOT need to pass or configure any API key! Simply provide the URL https://mcp.surl.li/mcp and authenticate in 1 click in your browser.
Clients and IDEs that do not have browser OAuth (such as Google Antigravity, Windsurf, Zed, CLI scripts, and SDKs) MUST pass the Surli API key in headers (Authorization and X-API-KEY) using serverUrl.
File location: %APPDATA%\Claude\claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"surli": {
"url": "https://mcp.surl.li/mcp"
}
}
}
Headless/testing note: An API key is only needed if you are running in a headless environment without browser access, in which case you can pass "headers": { "Authorization": "Bearer YOUR_API_KEY", "X-API-KEY": "YOUR_API_KEY" }.
Cursor supports both native OAuth and direct API key configuration:
In Cursor Settings → Features → MCP Servers, add new server with type SSE / OAuth and URL https://mcp.surl.li/mcp, or add to .cursor/mcp.json:
{"mcpServers":{"surli":{"url":"https://mcp.surl.li/mcp"}}}
If not using OAuth, configure your Surli API key in headers:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
In VS Code Roo Code settings (mcp_settings.json), add the Surli MCP server configuration:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
Edit cline_mcp_settings.json:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
Edit ~/.continue/config.json under experimental.mcpServers:
{
"experimental": {
"mcpServers": [
{
"name": "surli",
"url": "https://mcp.surl.li/mcp",
"requestOptions": {
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
]
}
}
Edit ~/.config/zed/settings.json under context_servers:
{
"context_servers": {
"surli": {
"settings": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
}
Edit ~/.config/goose/config.yaml:
mcp_servers:
surli:
serverUrl: https://mcp.surl.li/mcp
headers:
Authorization: "Bearer YOUR_API_KEY"
X-API-KEY: "YOUR_API_KEY"
Add to your librechat.yaml under mcpServers:
mcpServers:
surli:
serverUrl: https://mcp.surl.li/mcp
headers:
Authorization: "Bearer YOUR_API_KEY"
X-API-KEY: "YOUR_API_KEY"
headers (both Authorization and X-API-KEY) with serverUrl.
Configure in ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"surli": {
"serverUrl": "https://mcp.surl.li/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
}
}
Passing both Authorization: Bearer YOUR_API_KEY and X-API-KEY: YOUR_API_KEY headers guarantees that Antigravity connects and authenticates on startup.
mcp package):from mcp import ClientSession
from mcp.client.http import http_client
async def run_surli():
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
async with http_client("https://mcp.surl.li/mcp", headers=headers) 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 { HTTPClientTransport } from "@modelcontextprotocol/sdk/client/http.js";
const transport = new HTTPClientTransport(new URL("https://mcp.surl.li/mcp"), {
requestInit: {
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"X-API-KEY": "YOUR_API_KEY"
}
}
});
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, invalid, or expired API Key / authorization token. | Verify that your API Key is correctly configured under headers (Authorization: Bearer YOUR_API_KEY and X-API-KEY: YOUR_API_KEY). |
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. |