Gortex
High-performance code graph and code intelligence engine. Index code base into knowledge graph, supports 257 languages and native multi repositories environment
README
<div align="center"> <p align="center"> <img src="assets/wall.svg" alt="Gortex" width="500"> </p>
Code graph and intelligence engine that indexes repositories
and exposes it via CLI, MCP Server, and web UI.
Up to 50× fewer tokens per response. See BENCHMARK.md or reproduce it yourself.
</div>
Built for 16 AI coding agents (Claude Code, Kiro, Cursor, Windsurf, VS Code / Copilot, Continue.dev, Cline, OpenCode, Antigravity, Codex CLI, Gemini CLI, Zed, Aider, Kilo Code, OpenClaw, Hermes). One install configures every one detected on your machine — see docs/agents.md.
<details> <summary>Gortex Web UI — force-directed knowledge graph visualization</summary>

</details>
Why it matters
- 50× fewer tokens per response — graph-native lookups beat naive file reads. Agents read the symbol they need, not the 500-line file around it.
- Sub-millisecond impact analysis — a precomputed depth-3 reach index turns blast-radius queries into O(seeds × reach) map lookups. Safe to ask "what breaks if I change this?" on every edit.
- Cross-repo by default — N repos in one graph; contracts, references, and call chains span repo boundaries with evidence-gated resolution.
- Zero external dependencies — everything in-process, in-memory. No DB, no network, no model download to get started.
Install
# macOS / Linux
curl -fsSL https://get.gortex.dev | sh
# Windows (PowerShell)
irm https://get.gortex.dev/install.ps1 | iex
Detects OS/arch, verifies SHA256 + cosign, installs to PATH. Re-run to upgrade. Homebrew, .deb / .rpm / .apk, scoop, signed binaries, and from-source builds: docs/installation.md.
Quick Start
gortex install # one-time machine setup (MCP, skills, slash commands)
gortex daemon start --detach # background daemon
gortex track ~/projects/myapp # add a repo
cd ~/projects/myapp && gortex init # per-repo: .mcp.json, hooks, community routing
Your AI assistant now uses graph queries. Full 15-minute walkthrough: docs/onboarding.md.
Highlights
- 257 languages — three tiers (bespoke tree-sitter, regex, forest-backed signatures) plus Jupyter and Databricks notebooks → docs/languages.md
- 100+ MCP tools, 16 resources, 3 prompts — symbol lookup, call chains, blast radius, dataflow, clone detection, refactoring, code actions → docs/mcp.md
- Semantic search default-on — baked GloVe-50d (3.8 MB embedded), hybrid BM25 + vector + RRF, zero deps; opt-in MiniLM / Ollama / OpenAI → docs/semantic-search.md
- Multi-repo workspaces — cross-repo symbol resolution, contract matching, impact analysis, per-session isolation → docs/multi-repo.md
- Speculative execution —
preview_edit/simulate_chainanswer "what would change if I applied this WorkspaceEdit?" without touching disk - Live editor overlays — push unsaved buffers as a shadow graph; tools read through it. Branching for parallel speculative sessions
- GCX1 wire format — published, round-trippable. −27 % tokens vs JSON at same fidelity → docs/wire-format.md
- Long-living daemon — one process serves every IDE window; live fsnotify, on-disk snapshots, sub-second restart, OS-supervised lifecycle
- 9 LLM providers (optional) — local llama.cpp, Anthropic, OpenAI, Ollama, Claude / Codex CLI subprocess, Gemini, Bedrock, DeepSeek → docs/llm.md
- HTTP server + Web UI — versioned
/v1/*API + MCP 2026 Streamable HTTP; standalone Next.js 15 UI with five 3D graph modes → docs/server.md - Composable safety —
verify_change,check_guards,audit_agent_configflag broken callers, guard violations, stale docs before they ship - Agent integrations (16) —
gortex initconfigures every detected coding assistant on the machine → docs/agents.md
Full catalog of features: docs/features.md. Complete CLI reference: docs/cli.md.
Cross-Repo API Contracts
Gortex auto-detects API contracts across repos and matches providers to consumers, surfaced via the contracts MCP tool and the web UI Contracts page.
| Contract type | Detection | Provider | Consumer |
|---|---|---|---|
| HTTP routes | Framework annotations (gin, Express, FastAPI, Spring, …) | Route handler | HTTP client calls (fetch, http.Get) |
| gRPC | Proto service definitions | Service RPC | Client stub calls |
| GraphQL | Schema type/field definitions | Schema | Query/mutation strings |
| Message topics | Kafka / RabbitMQ / NATS / Redis pub/sub | Publish calls | Subscribe calls |
| WebSocket | Event emit/listen patterns | emit() |
on() |
| Env vars | os.Getenv, process.env, .env files |
Setenv / .env |
Getenv / process.env |
| OpenAPI | Swagger / OpenAPI spec files | Spec paths | (linked to HTTP routes) |
| Temporal workflows | Go / Java SDK annotations | Activity / workflow function | ExecuteActivity / ExecuteChildWorkflow |
Contracts are normalised to canonical IDs (e.g. http::GET::/api/users/{id}) and matched across repos to detect orphan providers / consumers and mismatches. See docs/contracts.md.
Scale — battle-tested on large repos
Measured on an Apple Silicon laptop with the default CGO build.
| Repository | Files | Nodes | Edges | Index time | Throughput | Peak heap |
|---|---|---|---|---|---|---|
| torvalds/linux | 70,333 | 1,690,174 | 6,239,570 | ~3 min | 300 files/s | 5.07 GB |
| microsoft/vscode | 10,762 | 204,501 | 808,902 | ~1 min | 143 files/s | 580 MB |
| zzet/gortex (self) | 430 | 5,583 | 53,830 | 3.4s | 127 files/s | 52 MB |
Parsing dominates wall time (65–80 %); reference resolution and search-index build scale sub-linearly.
Token savings dashboard
gortex savings reports tokens saved vs naive file reads — per-call, per-session, and cumulative across restarts, priced in USD against the headline model.
Gortex Token Savings
====================
Cost avoided: $168.69 (claude-opus-4) across 1,878 calls · 11,246,094 tokens saved
Today ████████░░░░░░░░ 50.0% saved 9,200 / 18,400 tokens $0.14
Last 7 days ██████████░░░░░░ 62.5% saved 60,100 / 96,200 tokens $0.90
All time ███████████████░ 93.3% saved 11,246,094 / 12,050,716 tokens $168.69
--verbose adds the per-tool breakdown; --json is machine-readable. Full reference: docs/savings.md.
Architecture
gortex binary
CLI (cobra) ──> MultiIndexer ──> In-Memory Graph (shared, per-repo indexed)
MCP (stdio) ──────────────────> Query Engine (repo/project/ref scoping)
HTTP /v1/* ──────────────────> same tools + /v1/graph + /v1/events (SSE)
Daemon (unix) ──────────────────> shared graph for every MCP client, session isolation
MultiWatcher <── filesystem events (fsnotify, per-repo)
CrossRepoResolver ──> cross-repo edge creation (type-aware)
Persistence ──> gob+gzip snapshot (pluggable backend)
Data flow, graph schema (node and edge kinds, multi-repo fields, test taxonomy), persistence model: docs/architecture.md.
Documentation
| Topic | Reference |
|---|---|
| First-time walkthrough | onboarding.md |
| Installation & supply-chain verification | installation.md |
| Full feature catalog | features.md |
| CLI reference | cli.md |
| MCP tools, resources, prompts | mcp.md |
| Multi-repo workspaces | multi-repo.md |
| HTTP server + Web UI + MCP 2026 transport | server.md |
| Cross-repo API contracts | contracts.md |
| Semantic search | semantic-search.md |
| Optional LLM features | llm.md |
| LSP integration | lsp.md |
| Per-community skills & agent usage | skills.md |
| AI agent adapters (15) | agents.md |
| Supported languages (257) | languages.md |
| Token savings | savings.md |
| GCX1 wire format | wire-format.md |
| Architecture & graph schema | architecture.md |
| Evaluation methodology | 04-evaluation/ |
| Versioning policy | versioning.md |
Building from source
make build # binary with version stamping
make test # go test -race ./...
make lint # golangci-lint
Requires Go 1.26+ and CGO (for tree-sitter C bindings).
License
Apache License 2.0. See LICENSE.md. Copyright 2024-2026 Andrey Kumanyaev me@zzet.org.
Contributing
See CONTRIBUTING.md for guidelines on adding features, language extractors, and submitting PRs.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。