MCP Tour
serve.py
The local web viewer is only for humans. MCP clients start python -m link_mcp --wiki ... over stdio and read the same Markdown wiki directly.
For agent builders, the stable read/write behavior is summarized in the Link memory contract.
Agent Installers
Use the installer for the agent you use most. Installers create or update ~/link, install link-mcp, write short agent instructions, and preserve existing wiki data.
bash integrations/codex/install.sh
bash integrations/kiro/install.sh
bash integrations/claude-code/install.sh
bash integrations/cursor/install.sh
bash integrations/copilot/install.sh
bash integrations/vscode/install.sh
bash integrations/antigravity/install.sh
Use --project from a repo when memory should be project-scoped.
On Windows PowerShell, use .\integrations\AGENT\install.ps1 instead:
.\integrations\codex\install.ps1
.\integrations\kiro\install.ps1
.\integrations\claude-code\install.ps1
.\integrations\cursor\install.ps1
.\integrations\copilot\install.ps1
.\integrations\vscode\install.ps1
.\integrations\antigravity\install.ps1
If you already have agent instructions and only need the MCP config, use lnk connect. It previews the target file and config snippet first; add --write for an explicit update.
lnk connect codex ~/link
lnk connect codex ~/link --write
lnk connect kiro ~/link --write
lnk connect claude-code ~/link --write
lnk connect cursor ~/link --write
lnk connect antigravity ~/link --write
lnk verify-mcp ~/link
MCP Only
python3 -m pip install --upgrade link-mcp
python3 -m link_mcp --version
{
"mcpServers": {
"link": {
"command": "python3",
"args": ["-m", "link_mcp", "--wiki", "~/link/wiki"]
}
}
}
On macOS/Homebrew Python, if pip reports externally-managed-environment, use a dedicated venv:
python3 -m venv ~/.link-mcp-venv
~/.link-mcp-venv/bin/python -m pip install --upgrade pip link-mcp
On Windows, use a project or user venv and point your MCP client at that venv's Python:
py -m venv .link-mcp-venv
.\.link-mcp-venv\Scripts\python -m pip install --upgrade pip link-mcp
{
"mcpServers": {
"link": {
"command": "C:\\Users\\YOU\\.link-mcp-venv\\Scripts\\python.exe",
"args": ["-m", "link_mcp", "--wiki", "C:\\Users\\YOU\\link\\wiki"]
}
}
}
Predictable Agent Workflow
Agents should use Link in this order:
- Call
link_statuswhen connecting or troubleshooting. - Call
starter_promptswhen the user asks what to try next. - Call
ingest_statusbefore ingesting raw files. - Call
query_linkfirst for most answers. - Call
memory_briefbefore longer work. - Call
get_graph_summarywhen graph context is needed. - Call
backup_wikibefore broad repair work. - Call
validate_wikiafter ingest or substantial page edits.
MCP Tools
Full tool set:
link_status
link_operations
starter_prompts
migrate_wiki
ingest_status
query_link
validate_wiki
backup_wiki
memory_brief
memory_audit
memory_profile
memory_inbox
memory_log
memory_wins
review_memory
explain_memory
search_wiki
recall_memory
remember_memory
propose_memories
capture_session
capture_inbox
accept_capture
redact_capture
delete_capture
update_memory
set_memory_visibility
archive_memory
restore_memory
forget_memory
get_context
get_pages
get_backlinks
get_graph_summary
get_graph
rebuild_index
rebuild_backlinks
Memory write tools return duplicate_candidates or conflict_candidates when review, update, or archive is safer than creating another memory page. remember_memory also accepts optional visibility, review_after, and expires_at fields for sharing intent, scheduled re-checks, and temporary memories.
Project-aware tools accept an optional project argument. When set, Link returns broad user/global memory plus memories for that project, while excluding memories from other explicit projects.
Verify Setup
lnk verify-mcp
lnk health
lnk next
lnk verify-mcp --json is useful when an agent or script should read structured issues and next actions.
is Link ready?
brief me from Link before we continue
query Link for my current project context
remember that I prefer short release notes