Skip to main content
This page is written primarily for AI agents, not for people. On any cloud library page, click Use in AI and copy the line from the dialog over to your AI assistant. You can also kick it off yourself — take the line below and swap in the address of the library you want:
You are welcome to read on yourself — this is also a complete connection guide. It is just written more bluntly than most, with a heavy emphasis on how to tell whether each step actually worked. If your AI assistant cannot access the web, use Copy page in the top-right corner to grab this page as raw Markdown and paste it in directly.
This route does not require the Linkly AI desktop app. Cloud libraries are hosted on our servers and stay online around the clock, so any MCP-capable AI tool can search them directly. If what you want to index are the files on your own computer, that is a different job — see Setup Guide for Agents.

To the AI agent

Everything below is addressed to you. Read all of it before you start.

Your task

Get the user asking questions against a specific cloud library. You are done when:
  1. The client you are running in is connected to the Linkly AI cloud gateway (mcp.linkly.ai);
  2. You can genuinely retrieve content from that library using library="cloud://<owner>/<slug>";
  3. You have walked the user through their first real question and answered it from real documents.

First: turn the web address into a library identifier

What the user hands you is the library’s web address, in this form:
But the library parameter on the retrieval tools wants a library identifier. The two are the same thing spelled differently — replace the https://linkly.ai/ prefix with cloud:// and keep the <owner>/<slug> segments exactly as they are: Do not pass the web address straight into the library parameter — it will be rejected. Every cloud://… in the examples below is already the converted form. If the address carries extra path segments (such as /settings) or query parameters, keep only the <owner>/<slug> pair. When in doubt, connect MCP first and call list_libraries once — the response carries the exact identifiers.

Your boundaries and rules

Some things you can do yourself; others must be handed to the user. Do not overstep, and do not assume an outcome on the user’s behalf:
  • You can do yourself: probe the current connection state, write the MCP configuration, send handshake requests, call the retrieval tools, interpret errors, report back. For anything that writes configuration, show the command and get consent first.
  • The user must do: sign up for or sign in to linkly.ai, set a username, click Link on the library page, generate an API key in the dashboard, complete OAuth authorization in the browser. These are browser actions — you cannot do them.
And a few hard rules. Every one of them maps to a failure that really happens:
  • Do not overwrite the user’s existing local MCP configuration. Users who have installed the desktop app usually already have a server named linkly-ai pointing at http://127.0.0.1:60606/mcp. The cloud gateway is an additional entry, and it must be named linkly-ai-cloud. Writing under the same name silently replaces the local one — the user suddenly can’t find documents on their own computer, and no error is raised anywhere.
  • The local connection cannot reach cloud libraries. A cloud:// reference on the linkly-ai path (local / LAN) is rejected every time. Don’t retry a cloud library over the local connection; that is a boundary of the link, not an intermittent fault.
  • Every search must pass library explicitly. Omit the library parameter and the gateway routes to the user’s own machine by default (through the desktop tunnel), and the tunnel is a Pro feature — free users get an error straight away. Cloud libraries are never pulled in implicitly.
  • One library per call. Cloud libraries are not merged across a single search; to query two libraries, call twice.
  • Probe before you act. The user may be half set up already — do not blindly run through every step from the top.
  • When the user must act, say everything at once, then stop and wait for a single reply. Do not split one task into several rounds of back-and-forth confirmation.
  • Never overstate progress. If it is not verified, it is not done. Say exactly where you are stuck and what you tried.

First, work out which kind of client you are

Which route you take depends on whether you can write configuration and run commands:
Shortcut: if the user already has the Linkly AI desktop app, they can mention a linked cloud library with @ right inside the app’s Chat, with no MCP configuration at all. That route only needs Step 1.

Step 0: Probe the current state

Work out how far the chain already goes before deciding where to start. Three things: 1. Does your current session have Linkly retrieval tools, and which server do they come from? The cloud gateway identifies itself as linkly-ai-cloud; the local desktop app identifies itself as linkly-ai. Most clients put the server name into the tool name (for example mcp__linkly-ai-cloud__search). 2. If you have a shell, list the configured servers directly:
Look at each URL: one starting with 127.0.0.1 is local, mcp.linkly.ai is the cloud. 3. Does the user have a linkly.ai account, and have they linked this library? You cannot check this — just ask the user.

State table

Match top to bottom and follow the first row that hits:
This step happens entirely in the browser — you cannot do any of it. Give the user the full sequence below in one message, then stop and wait for a single reply. Do not walk through it item by item across multiple rounds. Here is what to relay to the user (rephrase in your own voice if you like, but cover all four parts):

1. Sign up and sign in

Go to https://linkly.ai to sign up or sign in — Google, GitHub, and Notion accounts are supported. A free account is enough for the whole setup.

2. Set a username (first sign-in only)

A cloud library’s address looks like linkly.ai/<username>/<slug>, so the account needs a unique username. Set it once in the Dashboard when prompted; you never have to think about it again. Visit the library’s web address (for example https://linkly.ai/blueeon/linkly-init-example) and click the Link button in the top-right corner. It worked when the button turns into Linked and the status badge reads Connected.
Even a library the user created themselves has to be linked once. What MCP can search is decided by the link relationship, not by ownership — an unlinked library never shows up in list_libraries, not even your own.
A free account gets one link slot. If another library is already linked, the user has to unlink that one first, or upgrade to Pro (99 slots). The quota dialog on the library page has the upgrade link.

4. Get a credential (pick one)

  • Your AI assistant has a shell or can edit config files: go to https://linkly.ai/dashboard/integrations, click to create a new key in the API Keys section, and copy it (it starts with lkai_). This key is equivalent to account credentials — it is for the user’s own AI tools only and must not be shared.
  • You are running inside an online application such as ChatGPT or Claude.ai: no API key needed. Skip this item; authorization happens in the browser later.

Acceptance check: the user replies that the button on the library page now reads Linked. If they are taking the API key route, also confirm they have a key starting with lkai_.

Step 2: Connect to the cloud MCP

The endpoint is fixed:
Always name the server linkly-ai-cloud, never linkly-ai — that name belongs to the local desktop app. Reusing it overwrites the user’s existing local configuration, and an agent with the Linkly Skills installed will mistake the connection for a local one and refuse every cloud:// request. Show the user the command first and explain that it writes the key into a local configuration file. Get consent before running it. Claude Code:
Other clients that support HTTP MCP — add a block to their own configuration file (Cursor uses mcp.json, Gemini CLI uses ~/.gemini/settings.json; field names follow each vendor’s docs):
For how the field name varies per client (url / httpUrl / serverUrl), see the Integration Guide. Some clients support ${env:LINKLY_API_KEY} syntax to read from an environment variable, which keeps the key out of the config file in plain text. Acceptance check: send a handshake request directly to confirm the server is healthy:
A response containing "serverInfo":{"name":"linkly-ai-cloud" means the credential is valid and the chain is healthy. A 401 means the key is wrong or has been revoked — have the user generate a new one in the dashboard.

Option B: OAuth (ChatGPT, Claude.ai, and other online applications)

These applications can’t send custom request headers, so they authorize over OAuth — which is actually simpler: one URL is all you fill in.
1

Add an MCP connector

In the application’s connector / MCP settings, add a new server. Name it linkly-ai-cloud and set the URL to https://mcp.linkly.ai/mcp.
2

Complete authorization in the browser

After saving, the application redirects to the linkly.ai authorization page. Once the user signs in and approves, the application receives an access token and sends it automatically from then on — no repeat authorization needed.
For where these settings live in each application, see Using Linkly AI in ChatGPT and Using Linkly AI in Claude.

Option C: CLI (optional)

If the user has the Linkly AI CLI installed, the command line works too:
--remote is the only CLI mode that can reach cloud libraries; leave it out and the search stays local.
A newly configured MCP server usually does not become available in the current session — most clients need to reload the config or start a new session. Tell the user plainly: “the configuration is written, reload and try again.” Do not keep probing the current session to see whether the tools have appeared.

Step 3: End-to-end verification

Once the tools are available (the user may need to restart the session), do two things to confirm the whole chain really works. 1. Confirm the library is in the list: Call list_libraries. The target library should appear in the results, like this:
If it isn’t there, the link didn’t go through — go back to Step 1, item 3. 2. Run one real search:
Success means: real document entries came back.
The library parameter is required every single time, and it must be the full two-part cloud://<owner>/<slug> form — a single segment (such as cloud://linkly-init-example) is rejected. Omit library and the gateway goes looking on the user’s own machine, which errors out immediately for free accounts.
If the first search comes back empty, don’t jump to blaming the configuration. Check in order: is the query too narrow → does list_libraries show 0 documents for this library (the owner hasn’t pushed any content yet) → switch to explore to see what the library holds overall, then search again with that in mind.

Troubleshooting


Report back when you are done

Close with a short paragraph for the user covering:
  • which route the connection took (API key or OAuth) and what the server is named;
  • whether a session restart is needed for anything to take effect;
  • how many documents the library holds and roughly what is in it;
  • how to actually use it — remind them that naming the library is all they need to do, and you will attach the library parameter automatically.
If any step could not be completed, say so plainly: where you got stuck, what you tried, and what the user can do next.

Finish with four example questions

End your report with four questions the user can copy and try immediately. They must be tailored to what is actually in this library: Start with explore to see the shape of the collection, search a few themes if you need more detail, then write four questions that genuinely point at this library’s content. Don’t write one-size-fits-all filler like “summarize this knowledge base” — a good question makes the user think “that is clearly about what’s in this library.”

Further reading