kula MCP
Enables interaction with Git repositories, including running git commands, exploring history, branches, diffs, and repository structure through Kula's knowledge graph.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kula MCPwhat does this branch change in the code graph compared to main?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Why "kula"?
In the Trobriand Islands, the kula ring is a circuit of gifts. Shell necklaces travel one way around the islands and armbands travel the other. Nobody keeps them. Their value is the history of hands they have passed through. A commit works the same way: a sign whose meaning is its lineage. In Peirce's terms the code is the sign, the graph is its object, and your notes are the interpretant. Kula puts all three in one place, with the map drawn before you touch the code.
The mark is a K drawn inside the kula ring. Every stroke lies on the hexagon's own geometry: the stem is a chord, the arms are two of its radii, and the junction is the centre node. The letter is literally a subgraph of the circuit.
Related MCP server: 50 First Tapes MCP Server
Where Kula fits
Developer tooling around git splits into camps, and each leaves a gap:
Camp | Examples | What it's good at | The gap |
Git clients | GitKraken, Fork, Tower, lazygit | Branches, staging, history | Show text changes; no idea what the code means or what a change breaks |
Code-graph engines | GitNexus, Sourcegraph | Call graphs and code intelligence | Not a git client; GitNexus is PolyForm Noncommercial, Sourcegraph is server-first |
Forges | GitHub, GitLab, Gitea | Issues, PRs, review | Need a server and an account; no offline issues; review is line-by-line, not architectural |
Behavioural analysis | CodeScene | Hotspots and risk | Commercial and separate from your daily git workflow |
Git-native tracking | git-bug | Offline issues in git | No graph, no git UI |
Kula collapses these into one MIT-licensed binary. The same graph powers your git client, your reviews and your AI agent. Three things are unusual:
Architectural review.
graph-diffand the Contrast view show what a branch does to the structure (symbols gained, lost and rewritten, call edges added and cut), not just which lines moved.Review that works offline. Proposals, issues and notes are git objects on
refs/kula/meta, so they work on a plane and sync through any remote.Triage built in. The Overview ranks open proposals by risk and surfaces hotspots (files with high churn and high centrality) without a separate SaaS product.
Install
Kula is a single static binary (about 11 MB) with the web UI embedded. Its only runtime dependency is git.
Package manager | Command |
curl (macOS, Linux) |
|
Homebrew |
|
apt (Debian, Ubuntu) | one-time: add the signed repo (below), then |
npm / pnpm / bun |
|
pip / uv / pipx |
|
cargo |
|
.deb | download |
nix |
|
curl -fsSL https://a12n4v.github.io/kula/kula.gpg | sudo tee /usr/share/keyrings/kula.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/kula.gpg] https://a12n4v.github.io/kula/apt stable main" \
| sudo tee /etc/apt/sources.list.d/kula.list
sudo apt update && sudo apt install kulaWhy not plain brew install kula or apt install kula? Those names resolve only in the distributions' own repositories. Homebrew core admits self-submitted projects once they are at least 30 days old with 225 stars (or 90 forks or watchers); a source-built formula is ready in packaging/homebrew/kula-core.rb for that day. Debian and Ubuntu need a sponsored package with every Rust dependency packaged first. Until then, the tap and the signed apt repository are one line each.
v0.2.0 is live via the curl installer, the Homebrew tap, .deb packages and prebuilt binaries for macOS (Apple Silicon and Intel), Linux (x64 and arm64) and Windows on Releases. The npm, PyPI, crates.io and nix channels are rolling out. You can always build from source: pnpm -C web install && pnpm -C web build && cargo install --path .
Sixty seconds
cd your-repo
kula index # build the knowledge graph → .kula/graph.db
kula view # open the graph + git UI → http://localhost:7420
kula impact parseConfig # what breaks if I change this?
kula compare main feat/x # graph-aware branch diff
kula graph-diff main WORKTREE # what my uncommitted work does to the architecture
kula commit -am "ship it" # …and it's still just gitThe UI
kula view serves a local app at localhost:7420. It binds to 127.0.0.1 only and is protected by a per-session token.
Also included:
Notes on the repo, a file, a symbol or a commit, with
[[symbol]]links.Flows: execution paths traced from entry points.
Symbol history: the owners and commits behind any function (
git log -L), in the inspector.Git console: any non-interactive git command, in the browser, under a slowly turning dithered portrait of the repo.
One palette (⌘K) for everything. Prefix
#for issues and proposals,@for branches,>for commands.Navigation: number keys 1–9, 0 switch views; [ ] go back and forward through inspected symbols; ? shows every shortcut.
Shareable deep links such as
#graph/<id>/impact,#graph/contrast/main/feat%2Fxand#issues/3.Always-fresh graph:
kula viewreindexes in the background wheneverHEADmoves.Settings (,): colour the graph by directory, cluster, kind or 90-day churn; pick any directory's colour; set directory depth, hub share, label density, import edges and curved edges; light, dark or system theme; compact or comfortable density.
Resizable panels: drag any panel edge (lists, inspector, legend, contrast panel, the before/after divider, settings) to size it; double-click an edge to reset. Sizes are remembered per browser, and arrow keys work on a focused edge.
Design principles
Triage first, then the map. You land on what needs you; every item opens straight into the graph, the diff or the thread.
One variable per channel. Hue is the variable you choose (directory by default). Size is degree. Shape marks hubs. The ground behind the nodes is the directory. Nothing glows for decoration.
Keyboard first. Everything is reachable through ⌘K, and every view has a number key.
Honest status. The top bar always says whether the graph matches
HEAD.Motion explains cause. Selecting a symbol dims everything that isn't connected to it, and small dots run along its calls in the direction they go.
prefers-reduced-motionis respected everywhere.Three voices of type. Antonio, compressed, for titles and figures; JetBrains Mono (ligatures off, so code reads as written) for labels, paths and code; Geist for reading.
Density over decoration. Every number sits next to what it means: KPIs carry a sub-fact, hotspots show commits and edges, the hover card shows in, out, lines and churn.
Commands
Kula is a superset of git. Any command it doesn't recognise goes straight to git, so kula rebase -i, kula bisect and kula lfs pull all work.
| Build or rebuild the knowledge graph |
| Open the web UI |
| Branch, changes, and whether the graph is current |
| Pretty all-branch commit graph |
| Fuzzy search over symbols and files (camelCase- and snake_case-aware) |
| Callers, callees, container, cluster, notes |
| Blast radius: dependents, or dependencies with |
| Shortest call path between two symbols |
| Execution flows from entry points |
| Functional communities |
| Graph-aware branch diff: changed symbols and what they ripple into |
| Contrast two revisions' knowledge graphs ( |
| Local issues |
| Proposals (local pull requests) |
| Notes on |
| Share issues, proposals and notes through a normal git remote |
| MCP server over stdio |
| Environment check |
Every graph command accepts --json, and -C <path> works like git's.
For AI agents (MCP)
kula mcp gives agents the graph as tools: query, context, impact, trace, compare, graph_diff, flows, notes, issues. Agents can check the blast radius before editing and read the notes your team left.
// Claude Code: claude mcp add kula -- kula mcp
// Cursor / others (.mcp.json):
{ "mcpServers": { "kula": { "command": "kula", "args": ["mcp"] } } }How it works
Indexing. Files are walked in parallel (respecting
.gitignore) and parsed with tree-sitter. Kula extracts definitions (functions, methods, classes, interfaces), call sites and imports. Imports are resolved per language (relative JS/TS paths, Python packages, Rustmod/use, Go packages). Calls are resolved by preferring the same file, then imported files, then an unambiguous global match. A stoplist keeps generic names like.get()and.map()from creating false edges.Contrast. Any revision's graph is built straight from git objects (
git ls-treeplus a singlegit cat-file --batch), with no checkout, and cached per commit. Symbols are matched across revisions by kind, path, container and name, and compared by a hash of their source.Clusters. Weighted label propagation over calls, containment and imports. Each cluster is named after its dominant directory and its central class or file.
Storage.
.kula/graph.dbis SQLite with FTS5. It is git-ignored automatically and rebuilt bykula index. A small codebase indexes in well under a second.Issues, proposals and notes live in one JSON document committed onto
refs/kula/meta. Every change is a commit, so there is full history and nothing touches your branches.kula syncfetches, merges and pushes that ref through any git remote.Git itself is never reimplemented. Kula shells out to your
git, so hooks, signing, credential helpers, LFS and your config all keep working.Security. The UI server listens on
127.0.0.1, rejects foreignHostheaders (which blocks DNS rebinding), requires a random per-session token on every API call, and validates revisions so they can't be read as git options.
Language support today: TypeScript/TSX, JavaScript/JSX, Python, Rust, Go. Adding a language takes a grammar crate plus a few tree-sitter patterns in src/index/langs.rs.
Development
pnpm -C web install && pnpm -C web build # UI → web/dist (embedded at compile time)
cargo run -- view # run against this repo
pnpm -C web dev # hot-reload UI, proxies /api to :7420 (start `KULA_TOKEN=dev kula view --no-open` first)
./scripts/test.sh # everything; --quick skips packagingscripts/test.sh is the single entry point used by CI:
Stage | Checks |
| pnpm install · TypeScript typecheck · Vite production build |
| rustfmt · clippy |
| a real |
| release build · npm launcher installed from packed tarballs · pip wheel via maturin, installed and run · crate includes the UI · Homebrew formula · installer · nix flake (when nix is present) |
src/
main.rs CLI (clap) + git passthrough
git.rs thin wrapper over the git binary
index/ tree-sitter indexer + language registry
store.rs SQLite graph store + FTS search
graph.rs clusters · context · impact · trace · flows · compare
meta.rs issues / proposals / notes on refs/kula/meta
server.rs axum HTTP API + embedded UI
mcp.rs MCP stdio server
web/src/ React UI (sigma.js graph, Geist type)
packaging/ npm launcher · Homebrew formula
scripts/ test.sh · install.shReleasing: push a vX.Y.Z tag. release.yml builds 5 targets and publishes the GitHub release, .deb packages, PyPI wheels, npm packages, the crates.io crate and the Homebrew formula.
Roadmap
Incremental re-indexing on file change (
kula view --watch)More languages: Java, C#, Kotlin, Swift, C/C++, Ruby, PHP
Semantic search with optional local embeddings
Two-way sync with GitHub and GitLab issues and PRs
Time-travel graph: scrub through history and watch the architecture change
Interactive rebase planner in the UI
License
MIT © 2026 Arnav Sharma. Kula is an independent, clean-room project and contains no code from other code-graph tools.
This server cannot be deployed
Maintenance
Related MCP Connectors
Git-backed platform for skills, tools, and context for AI agents
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI models like Claude or GPT to interact with a decentralized git network, supporting repository initialization, DID generation, agent spawning, and pull requests.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read and write a local-first knowledge base of plain markdown files in git, with governance gates for safe, hash-anchored edits.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceConnects AI tools to GitHub and local git repositories, enabling natural language management of issues, PRs, code analysis, and workflows.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to query a local, versioned knowledge graph of a software project, retrieving overviews, context packs, evidence, and explanations to make informed changes.MIT