LinkBunny Exchange
v0.1.13Coding agents run nofollow backlink exchanges for sites you control.
A local stdio MCP server that lets your coding agent run LinkBunny nofollow link exchanges for sites you control. Requires Node.js 22 or later and either a saved browser sign-in from linkbunny-mcp login or an account API token supplied as LINKBUNNY_API_TOKEN. The first exchange is free for one site, and a subscription covers more. Its official MCP Registry name is com.getlinkbunny/exchange. These examples pin the 0.1.11 release.
Summary extracted from the README.
LinkBunny MCP
A local stdio MCP server that lets your coding agent run LinkBunny nofollow link exchanges for sites you control. Requires Node.js 22 or later and either a saved browser sign-in from linkbunny-mcp login or an account API token supplied as LINKBUNNY_API_TOKEN. The first exchange is free for one site, and a subscription covers more.
Its official MCP Registry name is com.getlinkbunny/exchange.
These examples pin the 0.1.11 release.
npx -y @linkbunny/mcp@0.1.11
Your MCP client starts this process and communicates over stdin/stdout. Running the command alone waits for protocol input. npm hosts package files; the server itself runs only as this local process. Its API requests go only to https://api.getlinkbunny.com/v1 over HTTPS. The only endpoint override is the development pair described under Sign in with your browser, which applies to a saved sign-in, never to an API token. There is no daemon, polling, automatic retry, publication, or tool chaining.
LinkBunny separately hosts an exchange connector at https://mcp.getlinkbunny.com/exchange, which Claude Code and Codex can use with browser sign-in instead of this package (tested with Claude Code and with the Codex CLI 0.164.0); see the hosted connector setup.
Configure a client
See the copyable MCP setup prompt and client examples. The MCP prompt is separate from the skill installation prompt. Follow preparation → owner approval of the exact persistent config bundle → registration → native trust/restart → fresh-session discovery.
An agent can inspect the project and prepare registration. Before writing persistent client configuration, it must show the owner the exact client, scope, config paths/diff, executable/version, secret-loading path, and trust/restart steps, then request one explicit authorization for that bundle. Preserve unrelated configuration and keep native trust controls enabled.
Locate the canonical production .env.linkbunny from project documentation and deployment metadata without displaying secrets; ask the owner if its identity is unclear. .env.linkbunny alone is not registration and does not update an already-running client's environment. Keep the file private and untracked. Never put its token in chat, command arguments, logs, screenshots, or tracked configuration.
For Codex, after authorization merge this into the trusted project's .codex/config.toml. Check the active Codex home and same-name entries in other scopes. Replace the example path with the reviewed absolute path on the MCP host:
[mcp_servers.linkbunny]
command = "npx"
args = ["-y", "@linkbunny/mcp@0.1.11", "--token-file", "/absolute/project/.env.linkbunny"]
Run codex mcp list from the intended project to check registration. Have the owner complete native trust, restart the client, and begin a fresh backing session in Codex or Agent Control before discovery. Same-process hot reload is not proven. Use /mcp to check the active server.
For Claude Code, after authorization merge this into the project's .mcp.json. Replace the example path with the reviewed absolute secret-file path. Have the owner complete native trust, restart Claude Code, and begin a fresh session before discovery:
{
"mcpServers": {
"linkbunny": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@linkbunny/mcp@0.1.11",
"--token-file",
"/absolute/project/.env.linkbunny"
]
}
}
}
This registers project scope. Local and user scope entries are in ~/.claude.json; local entries belong to a project path. From the intended project, run claude mcp get linkbunny, then use /mcp in Claude Code to check status and approve the project server. claude mcp get may start a stdio server as a health check and does not require workspace trust. Check same-name entries in other scopes if the loaded command differs. Keep diagnostic output private.
For VS Code, after authorization merge this into .vscode/mcp.json for workspace scope:
{
"servers": {
"linkbunny": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@linkbunny/mcp@0.1.11"],
"envFile": "${workspaceFolder}/.env.linkbunny"
}
}
}
VS Code supports direct envFile loading. Unlike the package loader, it can load additional variables from that file; review the variable names privately before choosing this configuration. The private, untracked file and Node/npm must be available on the host running MCP, including SSH, containers, remote workspaces, or Agent Host. A local file is not automatically available remotely; do not transfer secrets implicitly.
Have the owner complete workspace/server trust. Use MCP: List Servers to start/restart LinkBunny, then begin a fresh chat and inspect tools without invoking them. Use MCP: Browse Resources to read the guidance resource.
Load only the token without a shell
The Codex and Claude examples use the reviewed loader in this release, avoiding a project shell wrapper. --token-file accepts one absolute path to a regular file up to 64 KiB. The loader reads only LINKBUNNY_API_TOKEN; it does not source the file, evaluate shell content, expand variables, or load other entries into the environment. Use single-line assignments throughout the file; multiline values and shell statements are rejected.
Use one single-line assignment, optionally prefixed with export, with an unquoted, single-quoted, or double-quoted literal token and an optional trailing comment. The token must contain 32–512 letters, digits, or ._~- characters. Duplicate, missing, empty, malformed, interpolated, or command-substituted token entries fail closed. Errors never print values.
An explicit file takes precedence over an inherited token; invalid files never fall back to that token. Without the flag, the server still accepts a token supplied through an approved process environment. Restart the MCP process after token rotation.
Sign in with your browser
Available from 0.1.7. Instead of copying an API token, sign in once:
npx -y @linkbunny/mcp@0.1.11 login
The command opens your browser at https://getlinkbunny.com/oauth/authorize, where you sign in and allow access. LinkBunny then returns to a one-time listener on http://127.0.0.1:<random port>/callback that accepts only the response for this sign-in (PKCE and a random state). Use --no-browser to print the URL instead. Sign-in times out after 5 minutes; Ctrl+C cancels it.
The MCP server then needs no token in its configuration, for example "args": ["-y", "@linkbunny/mcp@0.1.11"]. It sends a 24-hour access key and renews it with a 90-day renewal key that LinkBunny replaces on every use. MCP processes that share a sign-in take turns renewing so a replaced renewal key is never sent again. Apart from one retry within a minute, LinkBunny treats a replaced renewal key that comes back as stolen and ends the sign-in.
| Command | Effect |
|---|---|
linkbunny-mcp login |
Signs in. Refuses if already signed in; run logout first to switch accounts. |
linkbunny-mcp status [--json] |
Shows where the sign-in is stored and whether the server will use it. Exits 1 when not signed in. |
linkbunny-mcp logout |
Revokes the sign-in at LinkBunny, then deletes it locally. You can also disconnect it on /account. |
Where the sign-in is stored:
- macOS: the login Keychain (item
LinkBunny CLI), written through/usr/bin/securitywith the value on stdin. - Linux: the Secret Service through
secret-tool(libsecret), with the value on stdin. Without a running Secret Service, sign-in fails rather than falling back. - Other systems, or when you choose it:
login --insecure-storagekeeps the keys unencrypted incredentials.json(mode 0600, directory 0700) in$XDG_CONFIG_HOME/linkbunny(default~/.config/linkbunny;%APPDATA%\linkbunnyon Windows). Anyone who can read your files as you can use it. The server refuses that file if other users can read it.
logins.json beside it holds only non-secret details (storage, API URL, sign-in time). LINKBUNNY_CONFIG_DIR changes this directory.
Which credential the server uses: --token-file or a non-empty LINKBUNNY_API_TOKEN always wins, exactly as before, and the server says on stderr that a saved sign-in exists but is unused. Otherwise it uses the saved sign-in. Signing in never edits your client configuration or token files.
For local development only, set both LINKBUNNY_ISSUER (HTTPS origin) and LINKBUNNY_API_URL (HTTPS URL) for login, status, logout, and the server. A sign-in is saved per issuer, and the server uses it only with the API URL it was saved with.
Verify safely
A package cached or downloaded by npm is not proof that a server is registered. Check initialization separately after saving the registration. Tokens saved in a secret store or repository environment file are not automatically loaded by the client.
In the fresh session, ask the configured client to perform initialize, tools/list, resources/list, and resources/read for linkbunny://guidance/skill, then call get_status once. Expect server version 0.1.11, exactly the seven tools below, the guidance text, and a status result. get_status is read-only and proves token admission without reserving anything. Do not call any other tool to test configuration: even check_in can reserve an assignment. If a client cannot list or read resources, report that part as unverified; reading the web skill does not verify MCP resource access.
Discovery and resource reads make no LinkBunny API requests. Startup validates token format locally, so only get_status proves API token admission and shows subscription state. For isolated discovery-only testing, use the synthetic example LINKBUNNY_API_TOKEN=synthetic-discovery-only-not-a-real-token-00000000. It passes the local format check but cannot authorize real API activity. Never substitute a production token merely to test package startup. Discovery-only tests must not invoke create_profile, update_profile, check_in, report_assignment, or reject_assignment.
The completed MyOG.social check of released @linkbunny/mcp@0.1.0 passed stdio initialization, discovery of exactly the five tools, and the resource read with a synthetic token. Stdout contained valid JSON-RPC, stderr was empty, shutdown was clean, and no mutation tool was called. The checked active Codex, Claude, repository, and common client scopes had no LinkBunny registration. Its existing production token was not loaded, and admission with its configured token was not verified.
Tools and guidance
Read the resource linkbunny://guidance/skill before using tools. It is the byte-identical snapshot of the canonical LinkBunny skill captured at package build time. frontend/public/skill.md is the single authored workflow contract; this README explains setup, not a separate set of workflow rules.
The released MCP resource stays pinned with the package and does not fetch the live skill URL. The live canonical skill can change independently. A separately installed local LinkBunny agent skill is another copy managed by its installer: updating MCP does not refresh that skill, and installing a skill does not register MCP.
In the MyOG.social comparison, the released 0.1.0 resource matched the live canonical skill at the time. The separately installed local skill had an outdated Domain Rating rule and lacked released additions. Consult the canonical skill for current workflow rules; a released snapshot may become stale.
| Tool | API operation |
|---|---|
get_status |
GET /me then GET /profiles |
get_backlinks |
GET /profiles/:profileID/backlinks |
create_profile |
POST /profiles |
update_profile |
PATCH /profiles/:profileID |
check_in |
POST /profiles/:profileID/check-in |
report_assignment |
PUT /assignments/:assignmentID/report |
reject_assignment |
PUT /assignments/:assignmentID/reject |
get_status and get_backlinks are read-only (readOnlyHint: true) and need no action-time authorization. get_backlinks lists the source pages other sites self-reported linking to one of your sites when each assignment settled; LinkBunny does not check that those links are still live. Every other call needs the site owner's approval for that action. The server cannot establish human consent; the calling agent and client must enforce the canonical guidance and approval controls. Assignments do not authorize publication. The REST API remains authoritative for ownership, entitlement, review, boundaries, settlement, and idempotency.
Results include validated API data or an error with a bounded code and secret-safe message, an HTTP status when received, and nextAction guidance. Remote messages are mapped to fixed text. Requests have a 10-second total timeout, a 1 MiB response limit, and redirects disabled. An interrupted or invalid response can leave the operation's outcome unknown. Consult the canonical retry rules rather than submitting another action blindly.
Upgrade or remove
For startup failures, check Node.js 22+, npm access, the effective registration and approval state, and token presence in the launching client's environment without printing its value. Allow time for the first npm download. Running npx alone waits for protocol input; it does not register a server.
For stale guidance, restart the server and read its resource again. Compare it with a fresh fetch of the live canonical skill and the exact local skill loaded by the agent. Check duplicate registrations and the package pin before changing caches. Clearing npm's cache does not upgrade a pinned release. Review and refresh a stale local skill through its installer, then reload the agent session; do not merge conflicting copies into a new workflow contract.
Choose a reviewed release and replace the exact version in your client's arguments, then restart the server. Do not replace the pin with latest or an unversioned command. For Codex use codex mcp remove linkbunny; for Claude Code use claude mcp remove linkbunny; for VS Code remove the linkbunny server entry from MCP configuration. Revoking an API token is a separate action the account owner takes in the private Account page.
Development
From mcp/, run pnpm i, bun run type-check, bun run test, and bun run verify:package. Build bundles the repository's public REST contracts without shipping the backend or database. dist/skill.md is copied mechanically from frontend/public/skill.md; build and package checks fail closed on differences. Package verification packs twice, compares bytes, checks an exact file allowlist, installs the tarball in a fresh directory, and runs the stdio acceptance suite against that installation with a fake API boundary. No production workflow calls are used for acceptance.