MCP server
noBSredir has a built-in MCP server. Connect Claude Code, Cursor, Windsurf, or any MCP-compatible client and your AI agent can create links, pull analytics, run campaigns.
Setup
Add this to your .mcp.json (Claude Code) or your client’s MCP config:
{ "mcpServers": { "nobsredir": { "type": "streamable-http", "url": "https://nobsredir.com/mcp", "headers": { "X-API-Key": "nobs_your_api_key_here" } } }}That’s it. Your agent gets 12 tools, 3 resources, and 4 prompt workflows. For setup instructions for specific clients (Claude Code, Cursor, Windsurf, VS Code, JetBrains), see Using agents.
Authentication
Same as the REST API. Pass your API key in the X-API-Key header. The MCP server is workspace-scoped via your key.
Create a key from the dashboard, or via the API Keys endpoints.
Tools
create_link
Create a shortened link.
| Parameter | Type | Required | Description |
|---|---|---|---|
target | string | yes | Destination URL |
title | string | no | Human-readable title |
slug | string | no | Custom slug. Only works on custom domains, not fnl.sh. |
domain | string | no | Domain for the short link. Defaults to fnl.sh. |
tags | string[] | no | Tags for organizing. Max 10 per link, auto-lowercased. |
utm_params | object | no | UTM tracking params (source, medium, campaign, term, content) |
expires_at | string | no | ISO 8601 datetime. Link stops redirecting after this. |
fallback_url | string | no | Where to redirect after expiry |
password | string | no | Password-protect the link. Min 8 chars. |
og_title | string | no | Custom Open Graph title |
og_description | string | no | Custom Open Graph description |
og_image | string | no | Custom Open Graph image URL |
note | string | no | Internal note. Not visible to visitors. |
list_links
List links with filters. Paginated, default 20 per page, max 100.
| Parameter | Type | Required | Description |
|---|---|---|---|
tag | string | no | Filter by tag name |
domain | string | no | Filter by domain |
prefix | string | no | Filter slugs starting with this string |
page | number | no | Page number (default 1) |
limit | number | no | Results per page (default 20, max 100) |
get_link
Get full details for a link: tags, UTM params, OG metadata, expiry, routing rules, A/B variants. The has_password field tells you if password protection is on (the actual hash is never returned).
| Parameter | Type | Required | Description |
|---|---|---|---|
link_id | string | yes | Link ID (UUID) |
update_link
Update any field on a link. Pass only what you want to change. Set a field to null to clear it. Slug changes only work on custom domains.
| Parameter | Type | Required | Description |
|---|---|---|---|
link_id | string | yes | Link ID (UUID) |
target | string | no | New destination URL |
title | string | null | no | New title. Null clears it. |
slug | string | no | New slug. Custom domains only. |
tags | string[] | null | no | Replace all tags. Null clears them. |
utm_params | object | null | no | UTM params. Null clears them. |
expires_at | string | null | no | Expiry datetime. Null clears it. |
fallback_url | string | null | no | Fallback URL. Null clears it. |
password | string | null | no | Set or change password. Null removes it. Min 8 chars. |
og_title | string | null | no | OG title. Null clears it. |
og_description | string | null | no | OG description. Null clears it. |
og_image | string | null | no | OG image URL. Null clears it. |
note | string | null | no | Internal note. Null clears it. |
delete_link
Permanently delete a link. Removes the redirect and all click data. Can’t be undone.
| Parameter | Type | Required | Description |
|---|---|---|---|
link_id | string | yes | Link ID (UUID) |
bulk_create_links
Create up to 100 links in one shot. Each entry follows the same schema as create_link (minus the advanced fields). Invalid entries get skipped.
| Parameter | Type | Required | Description |
|---|---|---|---|
links | array | yes | Array of link objects (max 100) |
Each link object:
| Field | Type | Required | Description |
|---|---|---|---|
target | string | yes | Destination URL |
title | string | no | Title |
slug | string | no | Custom slug. Custom domains only. |
domain | string | no | Domain. Defaults to fnl.sh. |
tags | string[] | no | Tags (max 10 per link) |
get_stats_summary
Aggregate click stats for the workspace: total clicks, unique visitors, breakdowns by country, referrer, browser, OS, device.
Requires Pro plan.
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string | no | Start date, YYYY-MM-DD. Max 365-day range. |
to | string | no | End date, YYYY-MM-DD |
link | string | no | Filter by link ID |
country | string | no | ISO country code (US, GB, etc.) |
browser | string | no | Browser name |
os | string | no | Operating system |
device | string | no | Device type: mobile, desktop, tablet |
referer | string | no | Referrer |
include_bots | string | no | "true" to include bot traffic |
These same filters (from, to, country, browser, os, device, referer, include_bots) apply to get_daily_clicks and get_link_stats too.
get_daily_clicks
Click counts by day. Returns {date, clicks} objects sorted chronologically. Supports all the stat filters from get_stats_summary.
| Parameter | Type | Required | Description |
|---|---|---|---|
days | number | no | Lookback window, 1-365. Default 30. |
get_top_links
Top links ranked by clicks.
| Parameter | Type | Required | Description |
|---|---|---|---|
days | number | no | Lookback window, 1-365. Default 7. |
limit | number | no | How many to return, 1-100. Default 5. |
get_link_stats
Full analytics for one link: click counts, country breakdown, referrers, hourly distribution, browser/OS/device splits. Supports all the stat filters from get_stats_summary.
| Parameter | Type | Required | Description |
|---|---|---|---|
link_id | string | yes | Link ID (UUID) |
list_domains
List all domains in the workspace with verification status. No parameters.
Custom domains need DNS verification (TXT + CNAME) before they can be used. Call this before create_link to see what’s available.
list_tags
List all tags with metadata: name, color, description, and optional date range for campaign-scoped tags. No parameters. Max 100 tags per workspace.
Resources
Resources give your agent context before it acts. Good agents read these first.
workspace://overview
Dynamic. Fetches current workspace name, plan, available domains, and all tags. Your agent reads this to know what domains it can use and what tags exist before creating links.
docs://features
Static. Reference covering every link feature: custom slugs, UTM params, tags, expiry, password protection, OG overrides, A/B testing, geo/device routing, deep links. The agent reads this when it needs to understand what’s possible.
docs://utm-guide
Static. UTM naming conventions and patterns for email, social, paid ads, QR codes. The agent reads this before setting up campaign tracking so naming stays consistent.
Prompts
Pre-built multi-step workflows. Call these from your MCP client and the agent handles the rest.
create_campaign
Give it a campaign name and URLs. The agent creates a tag, builds links with consistent UTM params, and hands back a summary table.
| Argument | Required | Description |
|---|---|---|
campaign_name | yes | Used as the tag name and utm_campaign value |
urls | yes | Comma or newline-separated target URLs |
domain | no | Domain for the short links |
utm_source | no | e.g. newsletter, twitter |
utm_medium | no | e.g. email, social, cpc |
analyze_performance
The agent pulls your stats, spots trends, finds your top performers, and tells you what’s working and what isn’t.
| Argument | Required | Description |
|---|---|---|
days | no | Lookback period in days. Default 30. |
tag | no | Focus on links with this tag |
bulk_import
Hand it a list of URLs. The agent validates them, creates links in bulk, and reports what got created and what got skipped.
| Argument | Required | Description |
|---|---|---|
urls | yes | One URL per line |
domain | no | Domain for all links |
tag | no | Tag to apply to all links |
setup_ab_test
Provide 2-4 variant URLs. The agent sets up the split test with proper weights and explains how to track results.
| Argument | Required | Description |
|---|---|---|
variants | yes | Comma-separated URLs (2-4) |
slug | no | Custom slug. Requires custom domain. |
domain | no | Domain for the link |
Example sessions
Creating a campaign:
> Use the create_campaign prompt with campaign_name "spring-sale" and these URLs:> https://example.com/landing, https://example.com/pricing
The agent:1. Reads workspace://overview to check available domains2. Reads docs://utm-guide for naming conventions3. Creates a "spring-sale" tag4. Creates two links with utm_campaign=spring-sale5. Returns a summary table with short URLsChecking performance:
> How are my links doing this month?
The agent:1. Calls get_stats_summary for the last 30 days2. Calls get_daily_clicks to see the trend3. Calls get_top_links to find winners4. Tells you what's up, what's down, what to double down onQuick link:
> Shorten https://example.com/my-very-long-page and tag it "docs"
The agent calls create_link with target and tags, returns the short URL.One tool call, done.Transport
Streamable HTTP, pretty standard. No local process, no websocket connection to manage. Each request is authenticated via your API key.
Constraints
Same limits as the REST API:
- Custom slugs work on custom domains only (not fnl.sh)
- 10 tags per link, 100 per workspace
- Passwords must be 8+ characters
- Bulk operations cap at 100 links per request
- Stats API rate limited to 60 requests/minute
- Analytics API needs a Pro plan