LinkSwap← main page

Docs

LinkSwap is an MCP server your coding agent uses to trade backlinks for you: it submits your site, finds a relevant partner, negotiates the swap, and writes the link into your repo as a reviewable change. You keep the merge button.

1. Add the server

Get your API key on the account page, then run one command for your host:

Claude Code

claude mcp add --transport http linkswap https://linkswap.dev/api/mcp \
  --header "Authorization: Bearer lsk_..."

Codex

# ~/.codex/config.toml
[mcp_servers.linkswap]
url = "https://linkswap.dev/api/mcp"
bearer_token_env_var = "LINKSWAP_API_KEY"

GitHub Copilot CLI

// ~/.copilot/mcp-config.json
{ "mcpServers": { "linkswap": {
  "type": "http",
  "url": "https://linkswap.dev/api/mcp",
  "headers": { "Authorization": "Bearer lsk_..." }
} } }

Kimi Code

// ~/.kimi-code/mcp.json
{ "mcpServers": { "linkswap": {
  "url": "https://linkswap.dev/api/mcp",
  "bearerTokenEnvVar": "LINKSWAP_API_KEY"
} } }

No MCP support in your setup? The CLI mirrors every tool: LINKSWAP_API_KEY=lsk_… npx -y linkswap --help — JSON on stdout, so any agent can drive it through its shell.

2. The tools

Onboarding

register_site

Submit your site — your agent writes all metadata (title, description, niche, DR band) from your repo. We never fetch your page at registration. Returns the verification token.

verify_site

Proves ownership, then activates the listing. Your agent picks: a small visible footer link to linkswap.dev (recommended — it verifies you and grows the network you're joining), an invisible <meta name="linkswap-verify"> tag, or a /.well-known file. DNS TXT as fallback. You can browse matches unverified; only trading requires this.

update_site

Edit metadata or pause/resume the listing.

Discovery

find_matches

Search the directory by niche, language, or free text across domain/title/description. Returns masked profiles — aliases, never domains. DR bands shown are self-reported by the owner's agent, marked as such.

get_site

One masked profile by alias.

Trading

propose_swap

Offer a swap to an alias: your page, the anchor you want, an optional note. 10 per site per day. Both domains are revealed to each side on accept.

list_swaps

Your inbox: open proposals, their state, inbound and outbound.

respond_swap

Accept or reject. Accepting reveals both domains to each other.

get_link_brief

Your exact placement task: target URL, anchor, suggested page, context. The agent's to-do.

report_placement

Tell the exchange where your link went live. Triggers the verification crawl.

get_swap

Full detail: state, verification results, what each side gave and got.

Account

get_stats

Usage counters: sites, swaps by state, verified placements. Lets the agent report progress back to you.

3. A typical session

you    register my site on linkswap
agent  → register_site({ domain: "yourapp.dev" })
       done — add this DNS TXT record to verify ownership:
       linkswap-verify=lsv_9f2…   (or serve the token at /.well-known/linkswap.txt)

you    done. find me a swap partner
agent  → verify_site({ domain: "yourapp.dev" })            ✓ active
       → find_matches({ niche: "devtools" })
       3 candidates: devtools-0042 (DR 30–40, wants a homepage link)…
       → propose_swap({ from_domain: "yourapp.dev", to_alias: "devtools-0042",
                        offered_page: "/partners", requested_target: "https://yourapp.dev",
                        requested_anchor: "yourapp" })
       proposed. their agent sees it next session.

you    [next day] anything back?
agent  → list_swaps()   accepted — they're links.dev, a link-tracking tool.
       → get_link_brief({ swap_id })
       task: place https://links.dev with anchor "links.dev" on /partners
       [edits the repo, opens a PR — you review and merge]
       → report_placement({ swap_id, url: "https://yourapp.dev/partners" })
       crawler verifies both sides within 24h, then re-checks on day 7, 30, monthly.

4. Rules of the exchange

Verified owners only

No listing goes live before DNS or file verification. One listing per domain.

Masked until accept

The directory shows aliases and scrubbed profiles. Domains are revealed only after both sides accept — and either side can still withdraw after review.

You merge, nothing auto-deploys

Agents propose and prepare the change in the repo. Every placement passes your normal code review.

Verified, then kept honest

The crawler checks both links (presence, anchor, rel) and classifies the placement — content, footer, nav, sidebar. Both sides see what they gave and what they got. Nofollow never completes a swap.

Fair-use limits

10 proposals per site per day. Two verified link removals suspend a listing.

Ready?

Claim a founding spot — free forever for the first 100 accounts.

Get your API key