Lien

Lien

Lien connects AI coding assistants like Cursor and Claude Code to your codebase through the Model Context Protocol (MCP). Ask questions in natural language, get precise answers from semantic search—all running locally on your machine.

Category
访问服务器

README

Lien

/ljɛ̃/ — French for "link"

Give AI deep understanding of your codebase through semantic search. 100% local, 100% private.

Lien connects AI coding assistants like Cursor and Claude Code to your codebase through the Model Context Protocol (MCP). Ask questions in natural language, get precise answers from semantic search—all running locally on your machine.

📚 Full Documentation | 🚀 Getting Started | 🔍 How It Works


Features

  • 🔒 100% Local & Private - All code analysis happens on your machine
  • 🚀 Semantic Search - Natural language queries: "How does authentication work?"
  • 🌐 Cross-Repo Search - Search across all repositories in your organization (Qdrant backend)
  • 🎯 MCP Integration - Works seamlessly with Cursor, Claude Code, and other MCP-compatible tools
  • Fast - Sub-500ms queries, minutes to index large codebases
  • 🆓 Free Forever - No API costs, no subscriptions, no usage limits
  • 📦 Framework-Aware - Auto-detects Node.js, Laravel, and more; supports 15+ languages
  • 🏗️ Monorepo Support - Index multiple frameworks in one repository
  • 📊 Complexity Analysis - Human-friendly metrics: test paths, mental load, time to understand
  • 🔍 Impact Analysis - Find all dependents before refactoring with risk assessment

Quick Start

Claude Code (recommended) — one-time plugin install

/plugin marketplace add getlien/lien
/plugin install lien

That's it. Lien's MCP tools and the Explore agent are now available in every Claude Code session, in every repo. First use in a new git repo triggers a one-time index automatically — no lien init per project.

Other editors (Cursor, Windsurf, OpenCode, Kilo Code, Antigravity)

# 1. Install
npm install -g @liendev/lien

# 2. Wire it up for your editor
lien init

# 3. Restart your editor and start asking questions

lien init writes the right MCP config for your editor and (for Claude Code's legacy per-project flow, via lien init --legacy) copies an Explore agent into .claude/agents/. Lien auto-detects your project and indexes on first use.

👉 Full installation guide

Qdrant Backend (Cross-Repo Search)

For cross-repository search across your organization, configure Qdrant:

# Option 1: Global config file
mkdir -p ~/.lien
cat > ~/.lien/config.json <<EOF
{
  "backend": "qdrant",
  "qdrant": {
    "url": "http://localhost:6333",
    "apiKey": "your-api-key"
  }
}
EOF

# Option 2: Environment variables
export LIEN_BACKEND=qdrant
export LIEN_QDRANT_URL=http://localhost:6333
export LIEN_QDRANT_API_KEY=your-api-key

# Index your repos (orgId auto-detected from git remote)
lien index

Note: orgId is automatically extracted from your git remote URL. Cross-repo search requires all repos to share the same orgId.

MCP Tools

Lien exposes 6 powerful tools via Model Context Protocol:

Tool Description
semantic_search Natural language code search (supports crossRepo with Qdrant)
find_similar Find similar code patterns
get_files_context Get file context with test associations
list_functions List symbols by pattern
get_dependents Impact analysis (what depends on this?)
get_complexity Tech debt analysis with human-friendly metrics

Complexity Metrics

Lien tracks code complexity with intuitive outputs:

  • 🔀 Test paths - Cyclomatic complexity as "needs ~X tests for full coverage"
  • 🧠 Mental load - Cognitive complexity with nesting penalty
  • ⏱️ Time to understand - Halstead effort as readable duration (~2h 30m)
  • 🐛 Estimated bugs - Halstead prediction (Volume / 3000)

Documentation

Supported Languages

TypeScript • JavaScript • Vue • Python • PHP • Liquid • Go • Rust • Java • C/C++ • Ruby • Swift • Kotlin • C# • Scala • Markdown

Ecosystem Presets: 12 ecosystem presets including Node.js, Python, PHP, Laravel, Ruby, Rails, Rust, JVM, Swift, .NET, Django, and Astro (auto-detected)

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

Support

  • 🐛 Issues - Report bugs or request features
  • 💬 Discussions - Ask questions and share ideas

License

AGPL-3.0 © Alf Henderson

Lien is free forever for local use. The AGPL license ensures that:

  • ✅ You can use Lien locally without restrictions
  • ✅ You can modify and distribute Lien freely
  • ✅ Improvements get contributed back to the community
  • ✅ We can sustain long-term development

For questions about licensing, contact us at alf@lien.dev


Made with ❤️ for developers who value privacy and local-first tools.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选