firelinks-mcp
MCP Server to work with Firelinks API
Documentation
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 BackendRequirements
- Node.js >= 20.0.0
- Docker and Docker Compose (for containerization)
- Firelinks API token
Installation
Local Development
1. Install dependencies:
cd mcp-server
npm install2. Create `.env` file based on `.env.example`:
cp .env.example .env3. Configure environment variables in `.env`:
PORT=3000
LARAVEL_API_URL=https://firelinks.cc/api
NODE_ENV=development4. Start the server:
npm startOr for development mode with auto-reload:
npm run devDocker
1. Build the image:
docker build -t firelinks-mcp-server .2. Run the container:
docker run -d \
-p 3000:3000 \
-e LARAVEL_API_URL=https://firelinks.cc/api \
--name firelinks-mcp-server \
firelinks-mcp-serverDocker Compose
docker-compose up -dUsage
Endpoints
- `GET /health` - server health check
- `POST /mcp` - main MCP endpoint (JSON-RPC 2.0)
- `GET /sse` - Server-Sent Events for streaming
Authentication
All requests to `/mcp` require an authentication token in the header:
Authorization: Bearer YOUR_API_TOKENYou can get an API token in your Firelinks account.
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
Links
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
}'Create 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",
"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.mdTroubleshooting
Authentication Error
Problem: `Missing or invalid Authorization header`
Solution: Make sure the request header contains a valid token:
Authorization: Bearer YOUR_API_TOKENRequest Timeout
Problem: Requests to Laravel API timeout
Solution:
1. Check Laravel API availability
2. Increase timeout in `src/lib/laravel-api.js`
3. Check network connectivity between containers
Server Won't Start
Problem: Error on startup
Solution:
1. Check logs: `docker logs firelinks-mcp-server`
2. Make sure port 3000 is not in use
3. Check environment variables are correct
License
MIT
Support
For questions and support contact support@firelinks.cc
Frequently asked questions
What is firelinks-mcp?
firelinks-mcp is MCP Server to work with Firelinks API
How do I install firelinks-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is firelinks-mcp open source?
Yes — it is hosted on GitHub at https://github.com/djeknet/firelinks-mcp and has 3 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP