Skip to main content

scipq-mcp

An MCP server for navigating Java code — find symbols, references, definitions, implementations, supertypes, outlines, callers and callees — that reads the per-file SCIP shards javac writes at compile time, without loading an index into memory.

Language servers and index-backed tools keep the whole project in the heap: on a 10,000-file multi-module project that is gigabytes per checkout, multiplied by every worktree you have open. scipq-mcp keeps nothing between calls. Each call:

  1. greps the shards for the exact bytes the answer must contain (in parallel, PCRE when available),
  2. decodes only the matching protobuf messages of those few shards, with a small stdlib-only decoder,
  3. answers in compact text: paths relative to the project root, 1-based lines, the line of code.

On that 10,000-file project: 0.1–0.3 s per query, ~65 MB resident (≈17 MB for scipq-mcp itself, the rest is the MCP SDK), one server for any number of checkouts.

Read-only by design

scipq-mcp reads shards, sources and (in later versions) git metadata. It never compiles, never runs tests and never writes to your repository. The index is produced by the build you already run; scipq-mcp consumes it. When the index is not enough (stale shards, files that never compiled, a checkout that was never built) it says so and tells you what to build, without running it.

How the index is produced

The scip-javac compiler plugin writes one shard per source file while javac runs:

<root>/build/scip-targetroot/<module>/<task>/META-INF/scip/<source path from the root>.scip

Gradle compiles incrementally, so after an edit only the shards of what was recompiled are rewritten — the index is as fresh as your last build, at no extra cost.

Gradle

The package ships an init script that adds the plugin to every JavaCompile task:

scipq-mcp gradle-init > ~/.gradle/init.d/scip-shards.init.gradle
# edit PROJECTS in that file to limit it to your projects (empty = every build)
./gradlew compileJava compileTestJava

Or for a single build: ./gradlew build --init-script scip-shards.init.gradle. Turn it off for one run with -Pscip=false. It only affects local builds that load the script (CI does not see ~/.gradle/init.d). It works with Lombok and other annotation processors, and with the Gradle build cache (the shards are declared as task outputs).

Maven

Add the plugin configuration that setup prints (also in src/scipq_mcp/templates/maven-compiler-plugin.xml) to maven-compiler-plugin, and keep any other annotation processors (e.g. Lombok) listed in annotationProcessorPaths. Shards land in build/scip-targetroot/<artifactId>/<compile|testCompile>/ under the directory that holds .mvn/ (create an empty .mvn/ at the repository root if there is none).

Other builds

Any build that runs javac can produce the same layout: put org.scip-code:scip-javac on the annotation processor path and pass -Xplugin:scip -sourceroot:<project root> -targetroot:<root>/build/scip-targetroot/<module>/<task>.

First use from an agent

An agent that has the server installed but a project without shards gets an answer that says so and points to the setup tool. setup inspects the build (Gradle or Maven, the root project name, the wrapper, init scripts already in ~/.gradle/init.d and whether they apply) and returns the exact steps with the init script or pom snippet to add. The server instructions tell the agent to ask the user before changing the build. In Claude Code, the setup prompt (/mcp__scipq__setup) does the same on demand.

Install

Requirements: Python ≥ 3.11, Linux or macOS. GNU grep and GNU find are used when present (much faster on large projects); otherwise scipq-mcp falls back to pure Python. On macOS, brew install grep findutils provides them (ggrep is picked up automatically).

uvx scipq-mcp --help            # run without installing
pipx install scipq-mcp          # or install it

Not on PyPI yet. Until then: uvx --from git+https://github.com/gdressino/scipq-mcp scipq-mcp.

Claude Code

claude mcp add scipq -- uvx scipq-mcp

Other MCP clients

{
  "mcpServers": {
    "scipq": { "command": "uvx", "args": ["scipq-mcp"] }
  }
}

The server serves the project it is started in (any directory inside it). Every tool also takes project_root, so one server can answer for several checkouts or git worktrees.

Installed for every project (user scope), it stays out of the way where it does not apply: when the directory it starts in is not a Java project (no Gradle or Maven build files, no shards, no .java sources), it exposes no tools and a one-line instruction, so it costs no context. A Java project that was never compiled does get the tools (setup explains what to do). Start it with --always to expose the tools anyway, e.g. to query other checkouts through project_root.

Server options: --root DIR (default project), --shards-dir (default build/scip-targetroot), --freshness full|results|off (see below), --always.

Tools

Tool What it answers Like
setup how this project produces shards, whether they are fresh, the steps to enable them —
find_symbols(name, match) definitions by name or part of it (exact, prefix, contains, camel humps; case-insensitive) workspace/symbol
references(symbol, exclude_imports, by_name) every use, grouped by file, with the line of code and the enclosing method (imports left out for types; large results open with a summary); optionally possible uses by name in strings findReferences
definition(symbol) location, kind, signature, javadoc, what it overrides or extends definition + hover
source(symbol) the exact source of a definition, with line numbers —
implementations(symbol, direct_only) subtypes of a type or overrides of a method, at any depth; anonymous classes included implementation
supertypes(symbol) supertypes of a type, or the methods a method overrides, direct first type hierarchy
members(symbol, inherited) own and inherited members of a type, marking overrides and generated ones —
family(symbol) a method's override family (ancestors, descendants, siblings) and the uses of each —
overloads(symbol) every overload of a method and the uses of each —
outline(file) definitions in a file, nested, with signatures; takes a path or a type name documentSymbol
callers(symbol, depth, include_overridden) incoming calls grouped by enclosing method incomingCalls
callees(symbol, include_fields, include_types) methods called from a body outgoingCalls
annotated(annotation) definitions carrying an annotation, with its line (attribute values) —
typed(symbol, categories) where a type is used: fields, parameters, return types, locals, supertypes, bodies, imports —
tests(symbol) test classes that use a symbol directly, with a ready --tests / -Dtest filter —
index_status() shards per task, stale and uncompiled files, tracked files without a shard, what to recompile —
batch(queries) several of the above in one call —

All tools are read-only and take an optional project_root. Lists take offset/limit and say next offset N when there is more.

Naming symbols

Pass a name or an exact SCIP symbol:

Input Means
Account a type (or member) named Account
Account#setState, Account.setState member setState of Account
com.example.model.Account qualified; /, . and # are all accepted as separators
setState() methods only, any overload
setState(+1) the second overload (SCIP numbers overloads (), (+1), (+2)…)
Account#<init> constructors
com/example/model/Account#setState(). the exact symbol, as printed by find_symbols
PersistenceManager#evict JDK and library symbols, found among the references

A name that matches one symbol is resolved, and the answer starts with -- Account#setState → com/example/model/Account#setState().. An ambiguous name returns the candidates with their signatures instead.

Freshness

What scipq-mcp sees is the last compilation. Every answer ends with a warning when:

  • a source was edited after its shard was written (its results may be off), naming those that appear in the answer;
  • a .java file was created after the last compilation of its module and has no shard yet.

--freshness full (default) checks every shard against its source in parallel with the query (~0.1 s on 10,000 files, mostly hidden behind the query); results checks only the files in the answer; off disables it.

Semantics and limits

  • Only compiled code is visible. Shards of deleted sources are ignored.
  • Occurrences only distinguish definitions from references: scip-javac does not record read/write access.
  • Symbols from the JDK or dependencies have references but no definition.
  • implementations reports every level: scip-javac records the whole chain of supertypes on each type and method. A result is direct unless it also implements another result.
  • Callers: uses inside lambdas and anonymous classes count for the enclosing method; field initializers for the field; initializer blocks (static or instance) for the class.
  • Lombok: generated members are located at the node that generates them (the field, or a class-level @Getter/@Setter) and marked generated; the references inside generated bodies are left out.
  • references(by_name=true) lists, separately, lines where the name (or its bean property name) appears inside string literals or other files: map keys, query strings, templates. The index cannot see those; check them by hand.

Command line

Besides serve (the default) and gradle-init, scipq-mcp query runs any tool from the shell, for debugging or scripts:

scipq-mcp query --root ~/src/project refs 'Account#setState'
scipq-mcp query impl Entity --direct
scipq-mcp query callers 'Entity#setState()' --depth 2

Development

uv venv && uv pip install -e . pytest
.venv/bin/python -m pytest

tests/fixtures/sample is a small two-module Java project; its shards are checked in, so the tests need no JDK. To regenerate them (JDK 17+): tests/fixtures/build-sample.sh.

Design notes and the roadmap: docs/design.md.

Releasing

Releases are published by GitHub Actions with PyPI Trusted Publishing: no API token exists in the repository, its secrets, or anyone's machine.

  1. Describe the changes under ## Unreleased in CHANGELOG.md and commit.
  2. scripts/release.sh [VERSION] — sets the version, dates the changelog, runs the tests, commits and tags vVERSION.
  3. git push origin main vVERSION — the release workflow tests, builds and publishes.

License

MIT

Metadata

Release files for scipq-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scipq-mcp 0.1.0
File Size Uploaded Provenance Actions
scipq_mcp-0.1.0.tar.gz 79.7 kB With provenance Details for scipq_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scipq-mcp 0.1.0
File Interpreter ABI Platform Actions
scipq_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for scipq_mcp-0.1.0-py3-none-any.whl

Total release size: 144.9 kB

Release files / scipq_mcp-0.1.0.tar.gz

Download URL scipq_mcp-0.1.0.tar.gz
Size 79.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d67a7b66f185590a0af3277607fec430aac005d9cec991afd4161958de1033a8
BLAKE2b-256 checksum
How to use checksums
1f9f2bedf4a10b15fb9bc41a369ad54c16fb466edb7c396878d86a2099b12a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / scipq_mcp-0.1.0-py3-none-any.whl

Download URL scipq_mcp-0.1.0-py3-none-any.whl
Size 65.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
176852e71c2d576ac966a33d0847a06478e6dc7a2472c8e5a1e396b4a1f70761
BLAKE2b-256 checksum
How to use checksums
214c5725b81527a179ec40fbcbfd79395e54bb078b24549b79edb0878e617074
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for scipq-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scipq_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page