Logo Sense

Sense

Cộng đồng
luuuc

MCP server for AI coding agents - gives Claude Code, OpenCode, Cursor, and Codex CLI structural understanding of your codebase: symbol graph, blast radius, semantic search, conventions.

Nhà phát hànhluuuc
Kho mãsense
Ngôn ngữGo
Bản fork
5
Sao
40
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Sense cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    40 sao và 5 bản fork từ kho mã được liên kết.

CI CodeQL Lint Maintainability Code Coverage codecov OpenSSF Best Practices

Sense ⠎⠑⠝⠎⠑

An MCP server for codebase context, built for AI coding agents.

Side-by-side comparison: Without Sense (19 tool calls, 356K tokens, 121s) vs With Sense (5 tool calls, 109K tokens, 48s)

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.

ToolCapability
sense_graphSymbol relationships, callers, callees, inheritance, tests, dead code
sense_searchHybrid bi-encoder + cross-encoder semantic code search with keyword and text fallback
sense_blastBlast radius, affected code, affected tests, risk score
sense_conventionsDetected project conventions from source

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.

MetricClaude Code (Opus 4.6)Claude Code (Opus 4.6) + SenseChange
Tool calls per task1910-47%
Tokens per task228K156K-32%
Cost per task$0.42$0.31-26%
Session time91s73s-19%
Score per 100K tokens0.190.30+64%
Score per minute0.280.38+37%

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.

Task typeBaseline+ SenseWhy
Blast radius0.170.25Pre-computed dependency graph vs. manual grep chains
Find callers0.270.33Graph lookup vs. reading dozens of files
Dead code0.000.05Baseline can't do this at all
Semantic search0.360.38Two-stage retrieval (bi-encoder + cross-encoder) with text fallback

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

bash
curl -fsSL https://luuuc.github.io/sense/install.sh | sh

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:

bash
cosign verify-blob \
  --certificate-identity-regexp '^https://github.com/luuuc/sense/\.github/workflows/release\.yml@refs/tags/v.+$' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate sense_<version>_checksums.txt.pem \
  --signature sense_<version>_checksums.txt.sig \
  sense_<version>_checksums.txt

Artifacts also carry build provenance attestations: gh attestation verify sense_<version>_<os>_<arch>.tar.gz --owner luuuc.

With Go (1.26+)

bash
go install github.com/luuuc/sense/cmd/sense@latest

Index Your Codebase

bash
cd /path/to/project && sense scan

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

bash
cd /path/to/project && sense setup

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:

bash
sense setup

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/.

bash
cd /path/to/project && sense scan

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.

OperationMeasured (p50 / p95)
Graph query0.2ms / 3ms
Blast radius0.1ms / 10ms
Conventions16ms / 16ms
Cold start48ms
Full scan4.9s
Incremental scan2.3s

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

PlatformStatus
Linux amd64Supported
Linux arm64Supported
macOS Apple Silicon (arm64)Supported
macOS Intel (amd64)Supported (legacy)
WindowsSupported using WSL2

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:

LanguageFramework support
RubyRails (associations, callbacks, routes), Stimulus, Turbo
TypeScript / JavaScriptReact (JSX component calls)
Go-
ERBStimulus, Turbo (cross-language edges to JS controllers)

Standard tier. Symbols, calls, inheritance, imports, blast radius, and semantic search:

LanguageNotes
PythonDjango (models, URL patterns), FastAPI (routes, Depends)
RustStructs, traits, enums, impl blocks
JavaClasses, interfaces, enums, records
KotlinClasses, interfaces, objects
C#Classes, interfaces, structs, namespaces
C++Classes, structs, namespaces (:: scoping)
CFunctions, structs, enums
PHPClasses, interfaces, traits (\ scoping)
ScalaClasses, traits, objects

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

bash
make build    # build the binary
make test     # run tests
make lint     # run linters
make ci       # all of the above

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:

License

MIT. See LICENSE.

Dùng MCP Sense với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Sense, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Sense làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Sense.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "sense": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Sense, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Sense.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Sense giúp tôi làm việc này không?
Sense
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Sense.

Câu hỏi thường gặp

Máy chủ MCP Sense dùng để làm gì?

Sense là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Sense với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Sense với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Sense với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Sense, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Sense với TypingMind?

Sense hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Sense cung cấp những công cụ nào trong TypingMind?

Sense cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Sense không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Sense yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇