Quick start
-
1
Run the installer
It detects Codex and Claude Code, then asks where and at what scope to install.
-
2
Review the endpoint
The installer connects only to https://app.lnkflow.io/mcp.
-
3
Sign in in your browser
WorkOS authenticates you, then LnkFlow shows the MCP consent screen.
-
4
Choose permissions
Read access is required. Link management remains off unless you enable it explicitly.
-
5
Return to your client
The client exchanges the short-lived code and stores access and refresh credentials.
-
6
Verify without a prompt
The installer checks client configuration without spending model tokens on a test question.
Installer commands and options
| Command / option | What it does |
|---|---|
| install | Detect, configure, authenticate, install the optional workflow skill, and verify. |
| doctor | Check installed clients and confirm their LnkFlow entry points to the hosted endpoint. |
| uninstall | Remove the MCP entry and installed workflow skill. Revoke the connection in LnkFlow Settings too. |
| legacy-stdio | Temporarily run the old local adapter with environment-based credentials. |
| --client codex|claude|both | Select clients. Required for a non-interactive install. |
| --scope user|project | User makes LnkFlow available in every project; project limits configuration to the current repository. |
| --no-browser | Configure only and print the exact authentication step for later. |
| --yes | Skip installer questions. Pair with explicit --client in automation. |
npx -y @lnkflow/mcp-server@latest install --client codex --scope user
npx -y @lnkflow/mcp-server@latest install --client claude --scope project
npx -y @lnkflow/mcp-server@latest install --client both --scope user --no-browser
npx -y @lnkflow/mcp-server@latest install --client both --scope user --yes
npx -y @lnkflow/mcp-server@latest doctor --client both --scope user
npx -y @lnkflow/mcp-server@latest uninstall --client both --scope user
Manual client setup
Use these official client commands if you prefer not to use the installer.
Codex
codex mcp add lnkflow \
--url https://app.lnkflow.io/mcp \
--oauth-resource https://app.lnkflow.io/mcp
codex mcp login lnkflow
codex mcp get lnkflow --json
Codex CLI, the Codex IDE extension, and the ChatGPT desktop app share the local Codex MCP configuration on the same host.
Claude Code
claude mcp add \
--transport http \
--scope user \
lnkflow \
https://app.lnkflow.io/mcp
# In Claude Code:
/mcp
Select LnkFlow in /mcp and authenticate. Newer Claude versions may also expose claude mcp login; the installer checks before using it.
Permissions, privacy, and revocation
Read LnkFlow data — required
View campaigns, links, websites, influencers, domains, accessible accounts, and aggregated click analytics.
Manage links and campaigns — optional
Create, update, pause, and resume. It is disabled by default, still respects team roles, and exposes no delete tools.
- Access tokens last about one hour; refresh access is capped at 30 days before interactive sign-in is required again.
- Account switching is stored per MCP session, so one Codex or Claude session cannot silently switch another session.
- Raw click rows, IP addresses, full user agents, fingerprints, credentials, integration secrets, and deletion tools are not exposed.
- Revoke a client from LnkFlow Settings → Connected AI. Also clear authentication in the client when retiring a device.
- The fallback copies an authorization or full callback URL, never an access token.
Copy-paste instructions for an LLM
Paste this into Codex, Claude, or another coding agent with terminal access.
Install and configure the hosted LnkFlow MCP server for me.
Rules:
1. Do not ask me to create, paste, copy, or reveal an API token or OAuth access token.
2. Run this installer in my normal host terminal:
npx -y @lnkflow/mcp-server@latest install
3. Choose the MCP client(s) I use and user scope unless I explicitly request project scope.
4. The only trusted remote endpoint is https://app.lnkflow.io/mcp.
5. Let the official MCP client own OAuth credentials. Do not store credentials in the installer, project files, environment files, chat, logs, or shell history.
6. If a browser cannot open, show me the authorization URL. If a loopback callback fails, help me paste the full callback URL into the client; never paste an access token.
7. For Codex, the equivalent official commands are:
codex mcp add lnkflow --url https://app.lnkflow.io/mcp --oauth-resource https://app.lnkflow.io/mcp
codex mcp login lnkflow
8. For Claude Code, the equivalent configuration command is:
claude mcp add --transport http --scope user lnkflow https://app.lnkflow.io/mcp
Then start Claude Code, run /mcp, select LnkFlow, and authenticate. Use `claude mcp login lnkflow` only if that installed Claude version explicitly supports it.
9. On the LnkFlow consent page, keep read-only access unless I explicitly ask to create or manage links. Never enable write access silently.
10. Verify configuration without running a paid AI prompt:
npx -y @lnkflow/mcp-server@latest doctor --client both --scope user
11. Report which clients were configured, whether browser authentication completed, the endpoint, selected scope, and any manual step still required.
Troubleshooting
The browser did not open
Open the authorization URL printed by the client. With --no-browser, run codex mcp login lnkflow later or use /mcp in Claude Code.
The local callback says it cannot connect
Copy the full callback URL from the browser address bar and paste it into the client prompt. It contains a short-lived authorization code, not a reusable access token.
Claude says login is an unknown MCP command
That version authenticates through the interactive /mcp menu. The installer detects this and prints the correct instruction.
The connection is read-only
Reconnect and explicitly enable “Manage links and campaigns” on the LnkFlow consent screen. The default is intentionally read-only.
A team account write is denied
OAuth proves identity, but LnkFlow still enforces the role in the selected account. Ask an account owner to grant an editable role.
The client is configured but tools are missing
Restart or reload the client after setup, then run doctor. Confirm the endpoint is exactly https://app.lnkflow.io/mcp.
Legacy local stdio adapter
The old local adapter remains temporarily for migration and uses environment-based credentials. OAuth is for the hosted HTTP server, not stdio. New installations should use the hosted endpoint above.
LNKFLOW_BASE_URL=https://app.lnkflow.io \
LNKFLOW_API_TOKEN=your-manual-token \
npx -y @lnkflow/mcp-server@latest legacy-stdio