
N3mo
io.github.RajX-dev由 GitHub 账号 RajX-dev 发布v2.0.3更新于 Oct 24, 2026
N3MO: Code intelligence engine mapping repositories into queryable symbol graphs.
概览
一个本地 MCP 服务器,将代码仓库索引为符号图,让助手搜索符号、追踪依赖并评估改动影响范围。
- 可以做什么
- 将工作区代码库索引为存储在 PostgreSQL 中的结构化符号图,并支持仅对变更文件进行增量重建索引。定位符号定义及其文件路径和行号,列出指定文件中定义的所有类和函数。追踪某个符号的前向依赖,并计算其传递性影响范围,以了解改动会波及哪些部分。
- 适用场景
- 适合需要结构化理解代码库而非文本搜索的场景:在重构公共函数前评估会破坏什么、熟悉陌生仓库,或在代码审查时进行影响分析。
- 运行要求
- 以 Python 包(pip install n3mo)通过 stdio 在本地运行。需要 Docker 和通过安装命令初始化的 PostgreSQL 数据库,并设置 TARGET_CODE_DIR 环境变量指向要分析的工作区。
安装
在 SourceWeft 中
- 打开 控制台中的 N3mo,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[N3MO Banner] [SaaS Pipeline] [PyPI version] [License: PolyForm Noncommercial 1.0.0] [Python] [Docker] [Status] [MCP Registry]
[PyPI Downloads] [Sponsor] [Discord]
A structural code intelligence layer that transforms source code into a queryable knowledge graph for search, impact analysis, and AI-powered development.
Parse once. Query forever. Know exactly what breaks before it does.
"Text diffs are the source of all code review anxiety. A developer modifies a core utility, and the reviewer has to spend an hour mentally tracing downstream services to guess if it's safe to merge. N3MO replaces human guesswork with hard math."
📜 Licensed under PolyForm Noncommercial 1.0.0 — Source available for noncommercial use. • Need commercial use? Get a commercial license →
What is N3MO • Capabilities • Installation • Usage • MCP • CI/CD SaaS • Benchmarks • Tutorial • Sponsor
🎯 What is N3MO?
N3MO is a symbol-centric code intelligence layer. Instead of scanning raw text, it parses your source code's ASTs, maps call graphs, and models dependencies in a queryable relational database — deterministically, with zero LLM calls at index time.
For engineering leaders and teams, N3MO acts as a structural insurance policy for your codebases.
💡 Why N3MO?
- 🛡️ Eliminate Regression Risks — Utility functions are rarely refactored because developers fear unknown side effects. N3MO maps the transitive blast radius of any symbol to arbitrary depth, showing you exactly what will break before you make the edit. Automate this in your CI/CD →
- 🏎️ Rapid Developer Onboarding — Instead of senior engineers spending hours explaining codebase flow to new hires, developers run one command to visualize complex call chains and parent-child dependencies interactively.
- 🤖 AI-Agent Ready Infrastructure — Modern LLM agents (Cursor, Claude Desktop) are limited by context windows and text search. N3MO's native MCP server lets agents query the actual code graph, enabling fast, hallucination-free refactoring.
- ⚡ No Embeddings, No Drift — N3MO is pure static analysis: Tree-sitter AST parsing into PostgreSQL. There's no vector index to keep in sync, no embedding cost per repo, and no semantic-similarity guesswork — every edge in the graph is an exact, verifiable relationship.
📊 How N3MO Compares
🛠️ The Core Problem N3MO Solves
N3MO doesn't find text — it understands structure. It traces the actual call graph, not string matches.
Questions N3MO answers instantly:
👥 Who it's for
✨ Core Capabilities
Ingestion & Parsing
- Multi-language support — 27 Tree-sitter grammars supported (dynamically loaded); actively benchmarked on 10 major languages including Python, JS/TS, Go, Java, and C/C++
- Parallel AST ingestion —
ProcessPoolExecutordistributes CPU-bound parsing across all available cores - Incremental re-indexing — SHA-256 file hashing skips unchanged files automatically
- Idempotent operations — re-indexing updates existing data without duplication
- Smart exclusions — case-insensitive directory filters and camelCase-aware filename checks prevent false positives (e.g. allows
contest.pywhile skippingtest_*.py)
Analysis & Querying
- Symbol extraction — functions, classes, methods with full file path + line context
- Hierarchical modeling — parent-child relationships (Module → Class → Method)
- Call graph construction — who calls whom, resolved at ingestion time
- Scope-aware resolution — class scope > local file > imports > qualified dot paths > global
- Blast radius analysis — recursive CTE traversal to arbitrary depth with cycle guards
Performance
- Connection pooling —
ThreadedConnectionPooleliminates per-symbol DB round trips - Batch inserts — symbols, imports, and calls batched per file in single transactions
- Optimized queries —
SPLIT_PARTfix delivered a 2× speedup on call resolution
Visualization & Integration
- Interactive graph — vis.js orbit map with click-to-inspect nodes, sidebar, and depth slider
- Dark mode — toggleable canvas dark mode with real-time node/edge updates, persisted in
localStorage - Premium styling — sleek interactive dashboard landing page UI and graph visualizer styled with
Bricolage Grotesque,Inter, andJetBrains Monotypography - SKILL.md profile — system instructions to configure Claude as an impact-aware coding agent
- Native MCP server — first-class integration with Cursor, Claude Desktop, and Windsurf
- Git hooks — automatic re-indexing on every commit
- CI pipeline — GitHub Actions with linting (
ruff), type checking (mypy), andpytest
🌐 Supported Languages
Tree-sitter parsing supported for 27 languages. Deep semantic call graph mapping currently optimized for Python, JS/TS, and Java.
🚀 Installation
Prerequisites
Quick start
Install N3MO directly from PyPI:
Alternatively, for contributors running in editable mode:
💻 Usage
Index a repository
What gets indexed:
- ✅ Source files in all 27 supported languages
- ❌ Virtual environments (
venv/,.venv/) - ❌ Dependencies (
node_modules/,site-packages/) - ❌ Build artifacts (
.git/,__pycache__/,dist/) - ❌ Test / fixture directories (
tests/,mocks/,specs/)
Visualizer
Dark Mode — Radial Layout
Horizontal Tree View
Example terminal output:
Dependency graph visualization
🎥 Tutorial
See N3MO in Action — Full Walkthrough
https://github.com/user-attachments/assets/tutorial.mp4
Your browser does not support the video tag.Index a repository, trace blast radius, and visualize the dependency graph — all in under 30 seconds.
What the tutorial covers:
💡 Prefer hands-on? Follow the Quick Start to run N3MO locally in under 60 seconds.
🤖 Model Context Protocol (MCP)
N3MO includes a native MCP server that exposes repository analysis and graph traversal tools to LLM agents (like Claude, Cursor, or Windsurf).
Automatic Claude Desktop Setup
This registers N3MO and sets up the paths automatically. Restart Claude Desktop and you're ready!
🧠 Claude Skill (System Instructions)
To configure Claude to run N3MO impact queries proactively before changing code in the editor, import or copy-paste the custom instructions from the SKILL.md profile.
Cursor Setup
- Go to Settings → Models → MCP.
- Click + Add New MCP Server.
- Set the configuration details:
- Name:
n3mo - Type:
command - Command:
n3mo mcp start(oruvx n3mo mcp startto run directly) - Environment Variables:
TARGET_CODE_DIR=/absolute/path/to/your/active/workspace
- Name:
- Click Save, and Cursor will instantly be able to index and query your workspace blast radius.
🏢 Scale to Team Callout
Bringing AI agents to your team workspace? Stop forcing every developer to run heavy indexing pipelines and PostgreSQL instances on their local laptops.
Connect Cursor directly to the global cloud graph at n3mo.shop to bypass local machine database overhead entirely. Your agents query the cloud graph instantly.
🧰 Available MCP Tools
☁️ Enterprise CI/CD Automation (The SaaS Pivot)
Running deterministic AST parsing in a local loop is great, but manually building multi-step YAML actions, maintaining CI database infrastructure, and orchestrating PR timeline events is a massive friction point for engineering teams.
n3mo.shop is our definitive, zero-maintenance infrastructure layer that abstracts all of this away.
-
Zero-Config Webhooks: 2-click GitHub App sync. No YAML boilerplate to maintain.
-
Automated Inline PR Comments: N3MO hooks into your repository and posts the exact blast radius directly into your GitHub review timeline:
-
Strict "Zero-Trust" Privacy: We only parse structural AST metadata (symbol relationships). Your raw source code is never stored on our servers. The ephemeral parsing container is instantly destroyed the millisecond the PR comment is posted.
Offload your pipeline infrastructure today at n3mo.shop →
📊 Benchmarks
All benchmarks measured on Intel i5-13450HX, 24 GB RAM, NVMe SSD.
Django — Optimization History
Django is the primary benchmark target: 3,021 files, ~43K symbols, ~181K calls.
✅ All results are real measurements on the Django repository. Multiprocessing gains scale with core count.
TensorFlow — Enterprise-Scale Monorepo
Tested on TensorFlow — a 36,000-file, multi-language (C++/Python) monorepo.
N3MO scales from a 3K-file pure-Python repo (Django) to a 36K-file multi-language enterprise monorepo (TensorFlow) — roughly a 5× larger indexing job at near-linear throughput, without significant resource overhead. Symbol/edge-per-file and incremental (warm) re-index numbers for TensorFlow are being finalized in the full benchmark report.
ScanCode Toolkit — Large Codebase
Tested on ScanCode Toolkit — ~600K lines of Python.
Incremental Re-Indexing
N3MO uses SHA-256 file hashing to skip unchanged files on subsequent runs.
These results are from the built-in benchmark script on a 20-file synthetic repository. Real-world incremental performance is proportional to the number of changed files, not the total repository size.
Query Performance
Impact analysis uses PostgreSQL recursive CTEs with cycle guards. Query times are independent of repository size — they depend only on the size of the result subgraph.
Running the Benchmark
📈 Project Status
N3MO's core architecture and distribution phases (Foundations, Performance, Correctness & Scaling, and Distribution) have been successfully completed. The project is currently stable, actively maintained, and ready for production use.
📝 Design Principles
1. Structure before semantics Map the code skeleton (AST) before adding AI analysis. A correct graph is worth more than a smart but wrong one.
2. Database as source of truth All state lives in PostgreSQL, eliminating in-memory complexity and enabling graph queries that application-level traversal cannot match.
3. Correctness over speed The parser must handle syntax errors gracefully without corrupting the graph. A fast indexer that silently drops symbols is worse than a slow one that gets everything right.
4. Idempotent operations Re-running ingestion produces identical results, enabling safe incremental updates and CI/CD integration.
🤝 Contributing
Contributions are welcome! Please read the CONTRIBUTING.md guide to get started with setting up the project, coding standards, and running checks locally.
Development Setup
📜 License & Pricing
Pricing & Licensing
N3MO is free under the PolyForm Noncommercial 1.0.0 License for local usage and single-developer MCP integrations.
- 100% Free & Local — CLI queries, local MCP integrations, and the visualizer with zero limits.
- Commercial SaaS & Webhooks — To use N3MO in team environments, CI/CD pipelines, and private GitHub webhooks, purchase a commercial license at n3mo.shop.
- Enterprise Licensing — for large-scale organization deployments, custom SLAs, or zero-trust air-gapped environments, reach out for Enterprise options.
Licensed under the PolyForm Noncommercial 1.0.0 License.
- ✅ Free for personal projects, academic research, and hobby tools
- ✅ Source available — view, modify, and distribute for noncommercial purposes
- ⚠️ Noncommercial — you may not use it for commercial purposes
- ⚠️ Restrictions apply on offering it as a service
For commercial deployments or proprietary modifications, contact for licensing options.
See LICENSE for full legal details.
❤️ Sponsor
If N3MO saves you time during code reviews or helps your AI agents understand your codebase, consider sponsoring the project to support continued development.
Your sponsorship helps fund:
- 🔧 Continued maintenance and new language support
- 🚀 Performance improvements and scaling
- 📖 Better documentation and tutorials
- 🌍 Keeping the CLI and MCP server free for individual developers
👨💻 Author
Raj Shekhar — Delhi Technological University
[GitHub] [Maintainer] [LinkedIn]
🙏 Acknowledgments
- Tree-sitter — for robust, incremental, error-tolerant parsing
- PostgreSQL — for making recursive graph queries possible without a graph database
- Docker — for reproducible, single-command environments
- vis.js — for the interactive graph visualization
- FastAPI — for the high-performance REST layer
⭐ Star this repo if you find it useful — thanks for visiting!
Building tools for understanding code at scale.
来源:README.md,提交 3f18bed
工具
0版本历史
1- v2.0.3最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。