Labsco
djeknet logo

Firelinks.cc MCP

โ˜… 3

from djeknet

Create and manage short links for tracking and distributing traffic.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

Firelinks MCP Server

MCP (Model Context Protocol) server for the Firelinks platform, allowing external LLMs (Large Language Models) to interact with the Firelinks API - https://firelinks.cc/p/api

Description

This server implements the MCP protocol developed by Anthropic and provides a set of tools for working with the Firelinks platform:

  • Link Management: create, retrieve, edit short links
  • Statistics: get detailed click statistics, compare periods
  • Domains: manage custom domains
  • Servers: get list of available servers

Architecture

LLM client โ†’ HTTPS (mcp.firelinks.cc) โ†’ Node.js MCP Server โ†’ Firelinks API Backend

Integration with LLM Clients

Claude Desktop

Add to Claude Desktop configuration (claude_desktop_config.json):

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

Cursor

Add to Cursor configuration (mcp.json):

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

Other MCP Clients

For connecting to other MCP-compatible clients use:

  • URL: https://mcp.firelinks.cc/mcp
  • Transport: HTTP
  • Authentication: Bearer token in Authorization header

Available Tools

  1. firelinks_create_link - create short link
  2. firelinks_get_link - get link information
  3. firelinks_list_links - list all links
  4. firelinks_update_link_url - update link URL
  5. firelinks_add_reserve_url - add reserve URL

Statistics

  1. firelinks_stat_days - statistics by days
  2. firelinks_stat_total - total statistics for period
  3. firelinks_stat_links - statistics for all links
  4. firelinks_stat_clicks - detailed click statistics
  5. firelinks_stat_compare - compare two periods

Domains

  1. firelinks_list_domains - list domains
  2. firelinks_create_domain - add domain

Servers

  1. firelinks_list_servers - list available servers

Request Examples

Initialize

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
  }'

List 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
  }'
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",
        "type": "url",
        "redirect_type": 0,
        "code": "my-link"
      }
    },
    "id": 1
  }'

Required parameters:

  • url - Valid link with http or https
  • type - The type of link (use "url" for web links)
  • redirect_type - Redirect type: 0 (301), 1 (302), 2 (303), 4 (META Refresh)

Optional parameters:

  • link_name - Link name
  • code - Custom link code (must be unique)
  • domain_id - Domain ID
  • sub_domain - Subdomain
  • keywords - Keywords for search
  • keywords_mode - Keyword search logic (1, 2, or 3)
  • group_id - Link group ID
  • options - Additional settings string

Get Statistics

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_stat_days",
      "arguments": {
        "date_from": "2024-01-01",
        "date_to": "2024-01-31"
      }
    },
    "id": 1
  }'

Project Structure

mcp-server/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.js              # Main Express server file
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ laravel-api.js    # HTTP client for Laravel API
โ”‚   โ”‚   โ””โ”€โ”€ mcp-handler.js    # MCP protocol handler
โ”‚   โ””โ”€โ”€ tools/
โ”‚       โ”œโ”€โ”€ links.js          # Tools for links
โ”‚       โ”œโ”€โ”€ statistics.js     # Tools for statistics
โ”‚       โ”œโ”€โ”€ domains.js        # Tools for domains
โ”‚       โ””โ”€โ”€ servers.js        # Tools for servers
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ .env.example
โ””โ”€โ”€ README.md

Support

For questions and support contact support@firelinks.cc