About this project

jarvis, published on PyPI as jarvis-mcp, is a local-first code intelligence layer for coding agents. It ships as a Model Context Protocol (MCP) server that speaks stdio, so Claude Code, Cursor, Claude Desktop or any other MCP client can query an already-indexed repository. There is no hosted service, no authentication and no network dependency: nothing leaves the machine. How the two halves fit together The project is deliberately split into a writer and a reader that share exactly one contract, a local data directory (by default ~/.jarvis). - Indexing CLI: jarvis index takes a repository path, builds a Tree-sitter syntax baseline for every supported file, optionally runs the language's SCIP indexer and converts the output to SQLite, builds Zoekt shards plus optional embeddings, then publishes everything as one immutable snapshot selected by a small current pointer. - Runtime: jarvis-server exposes the tools over stdio, backed by lazy singletons. A zoekt-webserver is spawned on first search and shared between processes through a pidfile. Queries open the published database read-only, so the serving path never writes. Publishing is atomic; a query reading the older file continues to work while a reindex flips the pointer, and a failure in any optional stage leaves the previous snapshot live. Each reindex also rebuilds that repository's outgoing package edges instead of accumulating them. The nine MCP tools goToDefinition resolves a symbol to its defining file and range, served by SCIP where the file has SCIP definition coverage and otherwise by the syntax baseline declaration, with each location tagged by provider. findReferences lists occurrences of a symbol and is SCIP-only. callHierarchy returns incoming and outgoing calls, also SCIP-only. typeHierarchy returns supertypes and subtypes, SCIP-only. documentSymbols outlines the symbols defined in one file, routed per file between the SCIP outline and Tree-sitter declarations. searchCode performs Zoekt lexical or regular-expression search with an optional repository filter. semanticSearch is natural-language search that fuses vector hits with Zoekt hits and SCIP symbol-definition matches using reciprocal rank fusion. blastRadius shows which other indexed repositories depend on a package, up to two hops. getIndexStatus reports the published commit, freshness, staleness against a working tree, and per-tool provider capabilities. The SCIP-only tools do not silently return empty results when data is missing; they report the required capability, a reason and a recovery hint. Tool failures are returned as payload objects rather than transport errors, so a bad query does not kill the stdio server. Indexing and watching Commands include jarvis index, list, status, reindex and forget, plus jarvis watch for auto-reindexing with a debounce (five seconds by default) using the optional watchdog extra. Language is detected from git-tracked files by extension plurality and can be overridden with --language. Status values are indexing, indexed, partial, degraded and failed; a degraded run still publishes the syntax baseline and exits zero with the cause recorded. Requirements and limits The project is explicit about being narrow. - macOS and Linux only; Windows is not supported. - One language per repository; polyglot monorepos are indexed as whichever language has the most tracked files. - The build-free Tree-sitter baseline covers 17 languages (Python, JavaScript, TypeScript/TSX, Java, Kotlin, Swift, Go, Ruby, Rust, C, C++, C#, PHP, Scala, Bash, SQL) and is installed as a pip dependency of the package itself. - Precise SCIP navigation covers four language families: TypeScript/TSX, Python, Java/Kotlin and Swift. - Optional SCIP and Zoekt enrichment needs external binaries installed by a setup script: scip (minimum v0.9.0), zoekt-git-index and zoekt-webserver, universal-ctags, scip-typescript, scip-python, scip-swift (macOS arm64 only) and scip-java (detect-only, asks before pulling a Docker image). - Indexing is an explicit step; nothing is analyzed live. - jarvis is read-only and never edits code. The README positions it as complementary to Serena, which handles semantic renames and refactors. Search and configuration semanticSearch requires the optional semantic extra (lancedb and sentence-transformers) and fuses vector search over Tree-sitter-chunked code with lexical results. Semantic indexing respects .gitignore, skips files over 1 MB and generated-file heuristics, all of which an include flag can override. Environment variables cover the data directory and the embedding query/document instruction prefixes, with auto-detection for bge-m3, e5 and nomic-embed models. The README also documents known upstream SCIP limitations (declared but unwritten relationship data for type hierarchies, backfilled display names and kinds, scip-java's inability to index Android/Gradle repos, Kotlin requiring an exact compiler version match, and a bash version requirement for Maven-based Java builds) and treats them as behaviors of the underlying tooling rather than jarvis bugs. Three Claude Code agent skills ship with the plugin: jarvis-setup, jarvis-use and jarvis-issues. The project is MIT licensed, and its test suite is run with pytest, with integration tests that shell out to real indexer binaries marked separately.