MCP Server - Model Context Protocol

MCP (Model Context Protocol) - is a protocol from Anthropic for integrating external LLMs (Large Language Models) with your Firelinks service.

Description

Firelinks MCP server allows AI assistants to directly interact with your account: create short links, get statistics, manage domains and much more.

Server Access

MCP Server URL:


Protocol: JSON-RPC 2.0 over HTTP/HTTPS

Authentication: Bearer token in Authorization header


Connection to Different Clients

1. Claude Desktop (Anthropic)

To connect to Claude Desktop, add configuration to the settings file:

File Location:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Configuration:

{
  "mcpServers": {
    "firelinks": {
      "url": "https://mcp.firelinks.cc/mcp",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Important: Replace YOUR_API_TOKEN with your actual API token from Firelinks dashboard.

2. Cline (VS Code Extension)

To integrate with Cline, add to extension settings:

{
  "mcpServers": {
    "firelinks": {
      "url": "https://mcp.firelinks.cc/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

3. Other MCP-Compatible Clients

For any other MCP-compatible clients use the following connection parameters:

Parameter Value
URL https://mcp.firelinks.cc/mcp
Transport http
Authentication Bearer token in Authorization header
Protocol JSON-RPC 2.0

4. Direct HTTP Requests

You can send HTTP requests directly to the MCP server:

Initialize (connection initialization):

curl -X POST https://mcp.firelinks.cc/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "method": "initialize",
    "params": {},
    "id": 1
  }'

Get list of available tools:

curl -X POST https://mcp.firelinks.cc/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "params": {},
    "id": 1
  }'

Call a tool (for example, create a link):

curl -X POST https://mcp.firelinks.cc/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "firelinks_create_link",
      "arguments": {
        "url": "https://example.com",
        "alias": "my-link"
      }
    },
    "id": 1
  }'

Available Tools

Links - 5 tools

Tool Description
firelinks_create_link Create a new short link
firelinks_get_link Get link information by ID
firelinks_list_links Get list of all links
firelinks_update_link_url Change link target URL
firelinks_add_reserve_url Add reserve URL

Statistics - 5 tools

Tool Description
firelinks_stat_days Statistics by days for period
firelinks_stat_total Total statistics for period
firelinks_stat_links Statistics for all links
firelinks_stat_clicks Detailed click statistics
firelinks_stat_compare Compare statistics of two periods

Domains - 2 tools

Tool Description
firelinks_list_domains Get list of domains
firelinks_create_domain Add new domain

Servers - 1 tool

Tool Description
firelinks_list_servers Get list of available servers

Usage Examples

Example 1: Creating a short link

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "firelinks_create_link",
    "arguments": {
      "url": "https://example.com/very-long-url",
      "alias": "my-short-link"
    }
  },
  "id": 1
}

Example 2: Getting statistics for a month

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "firelinks_stat_days",
    "arguments": {
      "date_from": "2024-01-01",
      "date_to": "2024-01-31"
    }
  },
  "id": 1
}

Example 3: Getting list of links

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "firelinks_list_links",
    "arguments": {
      "page": 1,
      "per_page": 20
    }
  },
  "id": 1
}

Health Check

To check MCP server availability use endpoint:

curl https://mcp.firelinks.cc/health

Response:

{
  "status": "ok",
  "timestamp": "2024-01-22T12:00:00.000Z",
  "service": "firelinks-mcp-server",
  "version": "1.0.0"
}

Security

Important!
  • Never share your API token with others
  • API token provides full access to your account
  • Regularly update security tokens
  • Use HTTPS for all requests

Support

If you have questions about using MCP server, contact Firelinks support.