Introduction to MCP
MCP (Model Context Protocol) is an open protocol that enables AI assistants to call external tools to obtain contextual information. Linkly AI Desktop has a built-in MCP service that starts automatically upon installation — no additional configuration required. You only need to add Linkly AI’s MCP endpoint to your AI assistant, and the AI can directly search, browse, and read your local documents.Three Access Modes
Linkly AI provides three MCP access modes for different scenarios:Local Access
Use directly in local AI tools on your machine — no extra configuration needed. Suitable for Claude Code, Cursor, and other local applications.Endpoint:
http://127.0.0.1:60606/mcpLAN Access
Other devices on the same network can also connect. Requires enabling LAN access and using an access token.Endpoint:
http://{LAN IP}:60606/mcpRemote Access (Public)
Remotely access over the public internet via a tunnel. Suitable for online AI applications like ChatGPT and Claude.ai. Pro only.Endpoint:
https://mcp.linkly.ai/mcpHTTP MCP (Recommended)
Most AI assistants support the HTTP transport protocol. Connect directly to Linkly AI’s MCP endpoint without installing the CLI
Stdio MCP
Some AI assistants only support the stdio transport protocol and require Linkly AI CLI as a bridge
Prerequisites
1
Install and launch Linkly AI Desktop
Go to linkly.ai to download and install the desktop application. After the first launch, complete the initialization wizard, and the app will automatically begin indexing your documents.
2
Confirm MCP service is running
Linkly AI Desktop automatically runs the MCP service upon startup. Click the Agent icon at the bottom of the main window’s left sidebar to open the Agent usage page:
- The Allow local access row under Management shows whether the service is running;
- View MCP connection settings in the Integration section has the actual address and port number.
http://127.0.0.1:60606/mcpIf you choose the Stdio MCP method, you also need to install Linkly AI CLI.
Usage
HTTP MCP (Recommended)
For AI assistants that support HTTP/StreamableHTTP transport protocol. No CLI installation needed — connect directly.- Claude Code
- Cursor
- Codex
- Cherry Studio
Run in your terminal:
?client= in the URL is optional. If you include it, the access log on the Agent usage page can tell which client is calling.
Stdio MCP
For AI assistants that support the stdio transport protocol. You need to install Linkly AI CLI first, then configurelinkly mcp as the stdio bridge command in your AI assistant.
linkly mcp automatically picks up the name the client reports when it connects and writes it into the desktop app’s access log; the --client option in the examples below sets a fixed name that overrides the detected one.
To publish with pages through linkly mcp (CLI 1.2.0 or later), also sign in to the CLI with linkly auth login: being signed in to the desktop app is not enough. pages then works with the desktop app closed. Restart the AI assistant after signing in.
- Claude Code
- Codex
- Cherry Studio
- Other AI Assistants
Run in your terminal:
LAN Access
If you need to access Linkly AI from another device on the same network (such as another computer or n8n running on a NAS), you can enable LAN access mode.1
Enable LAN access
Click the Agent icon at the bottom of the Linkly AI Desktop main window’s left sidebar to open the Agent usage page, and turn on Allow LAN access under Management. Allow local access must stay on too, or this switch can’t be turned on.The first time you turn it on, the app generates an access token automatically.
2
Get the LAN address and access token
Click View MCP connection settings in the Integration section; the LAN part of the dialog lists:
- Address: similar to
http://192.168.x.x:60606/mcp, ready to copy - Token: hidden by default — click the eye icon to show it, or just click the copy button
<token> and your-app-name in it with the actual values and you can use it on the device you want to connect from.After regenerating the token, every LAN client already set up has to switch to the new token.3
Configure on other devices
When adding an MCP server in the AI tool on the other device, use the LAN address as the endpoint and include the access token in the request header:LAN access requires an AI tool that supports HTTP transport. The stdio bridge (
linkly mcp) only connects to the desktop app on this machine and does not support LAN.Fill in this configuration yourself. Don’t paste the access token into any AI conversation, and don’t let an AI assistant configure it for you: conversations are sent to the model provider and kept in the chat history. If the token has already appeared in a conversation, regenerate it under View MCP connection settings.If you are using Linkly AI CLI, save the LAN address and access token once in your own terminal, then just add --lan:Reload after configuring
Once the MCP config is written, the new tools will not show up in the conversation you already have open — the vast majority of AI clients read the tool list once, at the moment the session starts. This is the client’s loading mechanism, not a configuration error. Two options; try the first one first:- Start a new conversation (for command-line tools, quit and open a new session). A conversation that is already running keeps the tool list it started with; a new one picks up the latest.
- Quit the client completely, then reopen it. Use this when the first option doesn’t help — and note that closing the window is not quitting: on macOS press
Cmd + Qor choose Quit from the menu bar, on Windows check that it also exited from the tray.
Verify Integration
After configuration, you can send the following prompt in your AI assistant to verify:Search my documents for content about XX
search tool and return relevant results from your local documents.
When a newly shipped tool doesn’t show up
We ship new MCP tools from time to time. Most AI clients fetch the tool list once, at the moment the session starts, and never refresh it on their own, so a newly shipped tool simply will not appear until the client fetches the list again. If a tool documented here is missing from your client:- Refresh the connection in your client — in ChatGPT: Settings → Connectors → your connector → Refresh.
- If it still doesn’t appear, remove the connection and add it again.
- Start a new conversation. A conversation that is already running keeps the tool list it started with.
Use with Skills
We strongly recommend installing Linkly AI Skills alongside MCP configuration. Skills teach the AI assistant how to efficiently use Linkly AI’s tools, including when to search, when to browse outlines, when to read full text, and how to handle paginated reading of long documents.Please install the Agent Skill linkly-ai-skills and complete the LinklyAI tool integration...
Hiding sensitive information
When what an agent reads contains keys, passwords, recovery codes or other sensitive information, Linkly AI can replace it with[REDACTED:<type>] markers, according to your settings. There are two layers, each set up separately:
- Desktop app: when an agent reads files on your computer, the desktop app hides sensitive information before handing the results over; titles and paths stay as they are. Click the shield icon at the bottom of the main window’s left sidebar to open the Privacy data protection page, then set it up in the Auto-hide sensitive data section on the Settings tab.
- Web: results of remote access and of cloud libraries pass through the cloud gateway, which hides them once more according to Hide sensitive information for remote access on the Security page of the dashboard.
The desktop layer
Under What is protected, there is one switch for each place an agent connects from:- Next to each switch is its current state: Protected, Not hiding or Hiding paused. Turning off any of them asks you to confirm first.
- Seeing the original for a while: on the Overview tab, click Pause 10 min, and all four switches stop hiding for that long. A pause only affects the desktop layer; for remote access the web layer keeps hiding. While paused, the time left shows on the Overview tab, in this section and in the tray menu. Click Resume to end it early; it also ends when the time is up or when you restart the app.
- What to hide: in the same section, Hidden when agents read files has one switch per kind of information, applied to every switch above that is set to hide. Keys and tokens, passwords, recovery codes and seed phrases, bank card numbers and ID numbers are hidden by default; phone numbers and email addresses aren’t, since agents often need them to look up contacts or sort through résumés.
- Folders left as they are: in the same place, Folders shown as they are suits material that is easily mistaken for secrets, such as sample code and technical docs.
- Notes: markers in notes carry line numbers, such as
[REDACTED:github-pat L7]. As long as an agent editing a note leaves the marker where it is, saving restores the original text instead of overwriting it. - How much was hidden: on the Log tab of the Agent usage page, each call shows how many sensitive values were hidden; hover over it to see them by kind.
How the two layers work together
- The switches for each kind of information and the folders left as they are belong to the desktop layer only. When a remote agent reads files on your computer, the gateway still hides what it recognizes as long as the web switch is on; only phone numbers and email addresses are not hidden by the gateway.
- For a remote agent to see the original text of files on your computer, turn the web switch off and also pause or turn off Remote in the desktop app. The desktop app doesn’t show the state of the web switch; check it on the Security page of the dashboard.
- The web switch doesn’t tell files on your computer apart from cloud libraries: while it’s on, the gateway hides every remote result. So you can’t let remote agents see the original of files on your computer while still hiding cloud libraries.
Hiding lowers the risk of leaks but isn’t foolproof: it only recognizes common formats. Keep your most important material out of the index with exclusion rules; files whose names look like passwords or keys are left out of the index by default, see Password-like files.
Parameter Reference
The MCP service exposes nine tools (eleven on the cloud gateway, which addslibrary_search and library_link), forming a progressive document access workflow; both also offer pages, which publishes a file as a web page:
search— hybrid retrieval (BM25 + vector), the main entry point; also matches your own clip annotations (scope: "annotations"searches only those)outline— document outlinesgrep— regex matching within a single documentread— line-based document reading; a clip’s highlights, notes and comments follow the first page (annotations_offsetpages through them)list_libraries— list available knowledge librariesexplore— bird’s-eye overview of a document collectionfind_paths— locate folder paths by keyword to feedsearch’spath_globlist— list the entries inside a container: a disk directory (folder), a library (library), or your notes (notes)note_save— create or edit a note, writes (only into the notes folder)library_search— search the cloud library catalog, including libraries not linked yet (cloud gateway only)library_link— link a cloud library so it becomes searchable, or unlink one you named withaction: "unlink"(cloud gateway only, writes)pages— publish a file or text as a web page with Linkly AI Pages when you ask to share it, and list, update or delete your Pages (writes; see Publish Pages)
note_save, pages and (on the cloud gateway) library_link is read-only. None of them modifies your documents: pages publishes a copy of a file you want to share. Keys, passwords and other sensitive information in what agents read are hidden by default — see Hiding sensitive information.
Every successful response carries a UTC timestamp: a trailing [meta] now=... line in Markdown output, or a top-level _meta.now field in JSON output, useful for computing relative dates such as “last month”. Error responses do not include this metadata.
For full parameter tables, response fields, response metadata format, and usage examples, see Linkly AI MCP Tools Introduction.
