
Sense
io.github.luuuc由 GitHub 账号 luuuc 发布v0.84.3更新于 Oct 24, 2026
Codebase understanding for AI coding agents — symbol graph, blast radius, semantic search.
概览
一个本地 MCP 服务器,为 AI 编程助手索引代码仓库,提供符号图、影响范围分析、语义代码搜索和项目约定检测。
- 可以做什么
- 通过符号图工具查询符号关系:调用者、被调用者、继承、测试和死代码。对已索引的符号执行混合语义代码搜索,并支持关键词和文本回退。计算变更的影响范围,包括受影响的代码、受影响的测试和风险评分。从源码中检测项目约定,例如关键类型、框架惯用法、架构分层和命名模式。通过监视工作树并在后台重新索引变更文件来保持索引最新。
- 适用场景
- 当 AI 编程助手需要仓库的结构性理解而非纯文本搜索时适用:查找调用者、评估变更影响、定位死代码或匹配现有代码风格。对于本质上是文本 grep 的任务(例如查找日志消息或字符串字面量)帮助不大。
- 运行要求
- 以本地二进制形式在用户机器上运行;支持 Linux amd64/arm64 和 macOS arm64/amd64,Windows 需要 WSL2。需要先用扫描命令为仓库建立索引,并通过安装命令连接 AI 客户端。二进制约需 60 MB 磁盘空间,索引约需 100-200 MB。未声明需要账户、API 密钥或云依赖。
安装
在 SourceWeft 中
- 打开 控制台中的 Sense,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[CI] [CodeQL] [Lint] [Maintainability] [Code Coverage] [codecov] [OpenSSF Best Practices]
Sense ⠎⠑⠝⠎⠑
An MCP server for codebase context, built for AI coding agents.
Your AI agent reads 19 files to answer "who calls this function?" because it has the text of your codebase but never the map. It re-derives structure on every task, burns tokens chasing grep chains, and hallucinates dependencies that don't exist. Sense indexes your repo once and serves a symbol graph plus semantic code search over MCP. Claude Code, Cursor, Codex CLI, and any MCP client finish the same task in 10 tool calls instead of 19, on 156K tokens instead of 228K, with the same correctness (bench/).
One binary, one local index, four tools for your AI. No SaaS account, no API key, no cloud dependency.
Sense sits on your machine, has no learning curve, and isn't for you. It's for your AI.
New here? Start with the Guide for a map to every doc, by who you are.
What Sense believes
A codebase is structure, not just text. The graph of what calls what, what breaks what, and how the team writes is real, knowable, and worth holding onto. Sense keeps it on your machine and hands it to your AI.
The rest follows from that. Local, because your code is yours. Read-only, because understanding shouldn't require permission to change things. Four tools, because your AI needs a few that work, not a hundred to pick from.
These aren't features. They're the reason Sense looks the way it does.
What Your AI Gets
Four tools for your AI. A full CLI for you. No sprawl.
Your AI stops reading 30 files to answer "who calls this?" It stops hallucinating dependencies. It stops writing code that's correct but doesn't match how your team writes code.
Convention detection
Of the four tools, convention detection is the one nobody else does well. AI tools don't just struggle with structure. They struggle with style. They write correct code that doesn't follow how YOUR codebase writes code.
Sense detects patterns from your actual source code: key types and their declarations, framework idioms (Rails associations, Go interfaces, Django models), architectural layers, and naming conventions. Your AI follows these patterns because it sees them, not because it was told about them. Convention detection isn't a feature. It's the thing that makes AI-written code feel like it belongs.
What changes
Measured across 7 real-world codebases (Discourse, Flask, Next.js, Axum, Gin, Javalin, and a private e-commerce repo).
Full methodology and raw data: bench/. Head-to-head leaderboard against Serena, Probe, GitNexus, code-search MCPs: docs/bench-leaderboard.svg.
Same correctness, dramatically less work. Sense doesn't make the model smarter. It gives the model structural understanding so it stops wasting effort.
Structural tasks
Tasks that require understanding code relationships, not just reading text, are where Sense pulls ahead.
Where Sense doesn't help
Sense is structural understanding, not a general search engine. For tasks that are fundamentally text-grep (find a log message, locate a string literal), plain grep is the right tool and Sense adds nothing. Search text fallback (ripgrep) bridges some of this gap, but it's a fallback, not a replacement.
Install
Or download the binary for your OS from the latest release, unzip, and move sense somewhere on your PATH.
Verify a release (optional)
Every release's checksums file is signed with Sigstore (keyless, bound to this repository's release workflow). With cosign installed:
Artifacts also carry build provenance attestations: gh attestation verify sense_<version>_<os>_<arch>.tar.gz --owner luuuc.
With Go (1.26+)
Index Your Codebase
Parses your code with tree-sitter, extracts symbols and relationships, embeds everything with a bundled ONNX model, and writes a local .sense/ index. Incremental on every run.
Connect Your AI
Auto-detects installed AI tools (Claude Code, Cursor, Codex CLI, OpenCode, Windsurf, and Cline) and writes each one's integration configs:
.mcp.json/.cursor/mcp.json/.codex/config.toml/opencode.json, the MCP server entry for the detected tool (or any MCP client)CLAUDE.md/.cursorrules/AGENTS.md, routing guidance with a tool substitution table, written from a single shared source.claude/settings.json, lifecycle hooks that nudge Claude toward Sense tools.claude/skills/and.opencode/skills/, workflow skills for exploration, impact analysis, and conventions
Windsurf and Cline read MCP servers only from their global settings, so for those two sense setup writes AGENTS.md and prints the one entry to add by hand.
No manual setup. Run sense setup and your AI has structural understanding.
Sense also generates .sense/summary.md, a cold-start map of your codebase (top namespaces, hub symbols, entry points, conventions). Your AI reads it at session start and immediately knows the shape of the project. Zero tool calls to orient.
To re-configure after upgrading Sense:
Setup & forget
After sense setup, there's nothing left to do. The MCP server your editor already launches watches your working tree in the background and re-indexes changes as they land, so the index stays current whether the edit came from your AI, your own editor, a git pull, or a branch switch. No second process to start, no --watch to remember. The summary regenerates on every scan. Your AI gets faster answers and burns fewer tokens, and you just stop noticing the friction that used to be there.
How It Works
Sense parses your codebase with tree-sitter, extracts symbols (functions, classes, modules, methods) and their relationships (calls, imports, inheritance), embeds each symbol with a bundled quantized ONNX model, and stores everything in a local SQLite index at .sense/.
From that moment on, your AI can ask structural questions via MCP. These are what your AI calls. You can run them manually for verification. See CLI.md for the full reference.
The MCP server does more than answer queries: for the life of the editor session it watches the working tree with a debounced filesystem watcher and re-indexes changed files in the background, off the request path. A branch switch re-indexes once from a git diff rather than reacting to every file. If you query a file that changed microseconds ago, the server repairs just that file inline before answering, so an edit is never missed. One project indexes at a time — a single-writer lock means a second editor window or a sense scan --watch in a terminal serves reads without double-indexing. Set watch: false in .sense/config.yml to turn the background watcher off.
Performance
Sense disappears into your workflow. Queries resolve in milliseconds, so your AI reasons about structure without ever stalling.
Measured on Sense's own codebase (382 files, 4,032 symbols). Run sense benchmark on your project for local numbers.
What Sense Is Not
Not a code editor. Not a token optimizer. Not a search engine. Not a feature-count competitor. Not dependent on anything. The non-goals are not omissions, they are the shape of the product. Full account: NON-GOALS.md.
Supported Platforms
Windows native builds are not yet available. Use WSL2 with the Linux binary.
macOS Intel still ships a binary and works, but it requires macOS 10.15 (Catalina) or later and is pinned to an older bundled runtime (ONNX Runtime 1.23.1) because Microsoft dropped macOS x86_64 runtime builds after that version. That dependency is frozen and cannot advance, so Apple Silicon is the recommended Mac target.
Requirements
- ~60 MB disk for the binary
- 100-200 MB for the
.sense/index (varies with project size)
Language Support
Sense uses tree-sitter for parsing. It ships with extractors for 13 languages across two tiers:
Full tier. Symbols, calls, inheritance, imports, blast radius, semantic search, and framework-specific inference:
Standard tier. Symbols, calls, inheritance, imports, blast radius, and semantic search:
Java, Kotlin, C#, C++, C, PHP, and Scala use a table-driven generic extractor, each ~25 lines of config rather than a handwritten walker. Python and Rust have dedicated extractors, and Python adds Django and FastAPI inference. See CONTRIBUTING-A-LANGUAGE.md to add a new language, and CONTRIBUTING-A-FRAMEWORK.md to add framework support (plus the dead-code fine-graining that goes with it).
Articles
Deep-dives on codebase intelligence, the benchmark methodology, and the thinking behind Sense: ARTICLES.md.
Feedback
File issues at github.com/luuuc/sense/issues.
Development
Contributing
Sense is feature-complete for v1. Outside contributions are accepted in three areas: new languages and frameworks, dead-code fine-graining for a language or framework, and AI-tool integrations. Bug fixes are always welcome; net-new features are not. The full scope and step-by-step guides are in CONTRIBUTING.md:
- CONTRIBUTING-A-LANGUAGE.md, a new language.
- CONTRIBUTING-A-FRAMEWORK.md, framework support and dead-code fine-graining.
- CONTRIBUTING-AN-AI-TOOL.md, a new AI coding tool integration.
License
MIT. See LICENSE.
来源:README.md,提交 89b062c
工具
0版本历史
1- v0.84.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分