Skip to main content
Glama

Orihime

PyPI License: MIT MCP orihime MCP server

A cross-repository code knowledge graph for Java/Kotlin/JavaScript/TypeScript codebases. Orihime indexes your source code into an embedded KuzuDB graph database using tree-sitter and exposes the graph through an MCP server (for AI assistants), a local web UI, and a CLI.

Mythology: Orihime (織姫) is Vega — the weaving princess who weaves the fabric of the cosmos. She weaves connections. The tool that weaves your codebase into a single graph.

Orihime call graph — com.rakuten.point, ~1,200 classes, node size = out-degree, edge thickness = call count


What It Does

  • Call graph across repositories — who calls what, across service boundaries, including REST calls resolved to the endpoint they target

  • Cross-repo taint analysis — track user-controlled data from HTTP/Kafka/JMS entry points through the call graph to dangerous sinks (SQL injection, path traversal, XXE, deserialization, SSRF, log injection, …)

  • Security reports — OWASP Top 10, CWE, PCI DSS, STIG frameworks; second-order injection detection; custom sources/sinks via YAML

  • Entry-point reachability filtering — suppress false positives from dead code; only surface findings reachable from real entry points (HTTP handlers, @KafkaListener, @Scheduled, @JmsListener, @RabbitListener)

  • Complexity hints — static O(n²) loop detection, N+1 JPA risk, unbounded queries, recursive calls — no profiler needed

  • Performance correlation — ingest Gatling/JMeter load test results; correlate with the call graph to find confirmed hotspots and Little's Law capacity ceilings per endpoint

  • License compliance — scan Maven/Gradle dependencies against SPDX identifiers; flag GPL/AGPL/LGPL in commercial projects

  • Incremental re-index — git blob-hash-based skip; only changed files are re-parsed on subsequent runs

  • Multi-language — Java, Kotlin, JavaScript, TypeScript (Next.js, Express, React)


Related MCP server: code-graph-mcp

Quick Start — AI-first (Claude Code)

The primary way to use Orihime is through an AI assistant via MCP. You index once, then ask questions in natural language — no Cypher, no grep, no reading source files.

1. Install

git clone https://github.com/srinivasan-sundaresan95/orihime.git
cd orihime
pip install -e .

2. Register with Claude Code (one-time setup)

python -m orihime register       # writes MCP server entry to ~/.claude/settings.json
python -m orihime install-skills # copies Claude Code skills to ~/.claude/skills/

Restart Claude Code. The orihime MCP tools and skills (/orihime-call-flow, /orihime-security-audit, /orihime-perf-analysis, /orihime-change-impact) are now active.

3. Index your repositories

python -m orihime index --repo /path/to/your/service-a --name service-a
python -m orihime index --repo /path/to/your/service-b --name service-b

4. Ask questions

Trace the call flow for GET /api/orders in service-a
Find SQL injection risks in service-b
What breaks if I change OrderService.processPayment?
Which endpoints are approaching saturation?

No source file reads. No grep. Claude uses the graph directly — typically 5–8 tool calls vs 30+ for source-only analysis.

CLI alternative: All operations above are also available as Python commands (python -m orihime index, python -m orihime ui, etc.) if you prefer working outside an AI assistant. See CLI Reference below.


Feature Comparison

Capability

Orihime

GitNexus

SonarQube Community

SonarQube Developer

SonarQube Enterprise

Cross-repo call graph

✓

✓

✗

✗

✗

REST endpoint resolution

✓

✓

✗

✗

✗

MCP integration (AI assistants)

✓

✓

✓¹

✓¹

✓¹

Claude Code hooks + skills

✓

✓

✗

✗

✗

Cross-file taint (SAST / injection)

✓

✗

✗

✓

✓

Second-order injection

✓

✗

✗

✗

✗

Entry-point reachability filter

✓

✗

✗

✗

✗

Custom sources/sinks (YAML)

✓

✗

✗

✗

✓²

OWASP/CWE/PCI/STIG compliance reports

✓

✗

✗

✗

✓

Argument-level taint (value-flow)

✓

✗

✗

✗

✗

Complexity hints (O(n²), N+1)

✓

✗

partial

partial

partial

I/O fan-out + serial/parallel analysis

✓

✗

✗

✗

✗

Perf ingestion + capacity model

✓

✗

✗

✗

✗

Cross-service cascade risk

✓

✗

✗

✗

✗

License compliance

✓

✗

✗

✗

✓³

Embedded DB (no server daemon)

✓

✓

✗

✗

✗

Indexes Java / Kotlin

✓

✓

✓

✓

✓

Indexes JS / TS

✓

✓

✓

✓

✓

License

MIT

PolyForm NC

LGPL

Commercial

Commercial

¹ Via the official sonarqube-mcp-server (SonarSource, production-ready). Works with all SonarQube editions. ² Custom taint sources/sinks require the Advanced Security add-on (Enterprise+). ³ License compliance (SBOM + policy enforcement) requires the Advanced Security add-on (Enterprise+).

GitNexus (PolyForm Non-Commercial) provides cross-repo call graphs and MCP integration across 14 languages including Java and Kotlin. It does not cover SAST, perf analysis, or compliance reporting.


MCP Tools Reference

Call Graph

Tool

Description

find_callers(method_fqn)

All methods that call the given method

find_callees(method_fqn)

All methods called by the given method

blast_radius(method_fqn, max_depth)

Transitive set of callers up to N hops

find_endpoint_callers(http_method, path_pattern)

Trace back from an HTTP endpoint to its callers

find_implementations(interface_fqn)

All classes implementing an interface

find_superclasses(class_fqn, max_depth)

Inheritance chain

find_external_calls(repo_name)

All calls to methods outside the indexed repo

Discovery

Tool

Description

search_symbol(query)

Full-text search across class/method FQNs

get_file_location(fqn)

File path and line number for any class or method

list_repos()

All indexed repositories

list_branches(repo_name)

All indexed branches for a repo

list_endpoints(repo_name)

All HTTP endpoints in a repo

list_unresolved_calls(repo_name)

REST calls that couldn't be matched to an endpoint

find_repo_dependencies(repo_name)

Cross-service DEPENDS_ON edges

ORM / JPA

Tool

Description

list_entity_relations(repo_name)

All JPA entity relationships — also used in design review (Phase 1.5)

find_eager_fetches(repo_name)

EAGER-fetched collections (N+1 risk)

Security (SAST)

Tool

Description

find_taint_sinks(repo_name)

All taint sinks reachable in the call graph

find_taint_flows(repo_name)

Value-flow taint: argument → parameter across CALLS edges

find_cross_service_taint(repo_name, max_depth)

Taint that crosses service boundaries via REST

find_second_order_injection(repo_name)

Taint stored to DB then re-read and used as sink

find_entry_points(repo_name)

All HTTP/Kafka/Scheduled/JMS/RabbitMQ entry points

find_reachable_sinks(repo_name, show_all)

Taint sinks filtered to those reachable from entry points only

generate_security_report(repo_name, framework)

Report in OWASP / CWE / PCI / STIG format

list_security_config()

Show active sources, sinks, and sanitizers from YAML config

Complexity & Performance

Tool

Description

find_complexity_hints(repo_name, min_severity)

Methods flagged with O(n²), N+1, unbounded-query, recursive

ingest_perf_results(repo_name, file_path)

Load Gatling simulation.log, JMeter XML, or JSON perf data

find_hotspots(repo_name)

Complexity hints × p99 latency, sorted by risk score

estimate_capacity(repo_name)

Little's Law capacity per endpoint; flags near-saturation

find_cascade_risk(repo_name)

Cross-service cascade: upstream endpoints limited by downstream saturation

License Compliance

Tool

Description

find_license_violations(repo_name, allowed, skip_lookup)

Flag GPL/AGPL/LGPL dependencies via Maven Central

Index

Tool

Description

index_repo_tool(repo_path, repo_name)

Trigger an index from within the MCP session


CLI Reference

All operations are also accessible directly without an AI assistant:

python -m orihime index        --repo PATH  --name NAME  [--db PATH] [--force] [--branch NAME]
python -m orihime ui           [--port 7700] [--db PATH]
python -m orihime serve
python -m orihime serve-sse    [--port 7702] [--db PATH]
python -m orihime resolve        [--db PATH]
python -m orihime write-server   [--port 7701] [--db PATH]
python -m orihime register       [--db PATH] [--python PATH]
python -m orihime install-skills

Command

Description

index

Parse a repository and write its graph into KuzuDB

ui

Start the local web UI on port 7700

serve

Start the MCP server on stdio (for Claude Code, Claude Desktop, any MCP client)

serve-sse

Start the MCP server with SSE transport (for CI runners and remote clients)

resolve

Match RestCall URL patterns against Endpoints across all indexed repos

write-server

Start the write-serialization server for team/server deployments

register

Write the Orihime MCP server entry to ~/.claude/settings.json

install-skills

Copy bundled skills to the target AI assistant's config dir (--agent claude|cursor|codex|copilot|all)


Web UI

http://localhost:7700

Page

Description

/

Call graph explorer: search methods, trace callers/callees, visualize CALLS graph

/findings

Security + complexity findings table — filter by OWASP category, severity, file

/api/…

JSON endpoints backing the UI (also usable directly)


Configuration

Environment Variables

Variable

Default

Description

ORIHIME_DB_PATH

~/.orihime/orihime.db

Path to KuzuDB database directory

ORIHIME_SERVER_URL

(unset)

URL of the write-serialization server (team mode)

Custom Sources and Sinks

Create ~/.orihime/security_config.yaml (or set ORIHIME_SECURITY_CONFIG):

sources:
  - method_pattern: ".*getCustomUserInput"
    description: "Custom input source"

sinks:
  - method_pattern: ".*legacyExec"
    sink_type: "COMMAND_INJECTION"
    description: "Legacy shell executor"

sanitizers:
  - method_pattern: ".*sanitizeForLegacy"

The built-in config covers HttpServletRequest, @RequestParam, @PathVariable, @RequestBody, JDBC execute*, JPA native queries, Runtime.exec, ProcessBuilder, XML parsers, ObjectInputStream, Files.get, Paths.get, new URL, logging calls, and more.


Documentation

Doc

Description

MCP Server

All MCP tools with parameters and examples

Extractors

How Java/Kotlin/JS/TS are parsed; ExtractResult schema

Security Config

Custom sources, sinks, sanitizers — YAML reference

CI Integration

GitHub Actions PR review workflow setup

Docker

Docker Compose setup for server deployments

Adding a Language

How to add a new language extractor

Cross-Repo Resolution

How REST calls are matched to endpoints across repos


Team / Server Mode

KuzuDB has a single-writer constraint. In team deployments where multiple developers re-index simultaneously, run the write-serialization server:

# On the shared server — owns the KuzuDB connection
python -m orihime write-server --port 7701 --db /shared/orihime.db

# Each developer's indexer sends writes to the server
ORIHIME_SERVER_URL=http://server:7701 python -m orihime index --repo /path --name my-service

Developers running locally without ORIHIME_SERVER_URL open KuzuDB directly as always. The web UI and MCP server always read directly from KuzuDB (reads do not go through the write server).


Architecture

Source files
    │
    ▼ tree-sitter (Java, Kotlin, JS, TS)
ParseResult (plain Python dicts, picklable)
    │
    ▼ ProcessPoolExecutor (parallel parse workers)
Phase 2: KuzuDB writes (batched by table, 500-edge transactions)
    │
    ▼
KuzuDB embedded graph  ←──────────────────────────────┐
    │                                                   │
    ├── MCP server (FastMCP, stdio)                     │
    ├── Web UI (Starlette, port 7700)                   │
    └── Write server (FastAPI, port 7701, team mode) ──┘

Graph schema (SCHEMA_VERSION 10):

Node

Key fields

Repo

id, name, root_path

File

path, language, blob_hash, branch_name

Class

fqn, annotations, is_interface

Method

fqn, line_start, annotations, is_entry_point, complexity_hint

Endpoint

http_method, path, path_regex

RestCall

http_method, url_pattern

EntityRelation

source_class, target_class, fetch_type, relation_type

PerfSample

endpoint_fqn, p50_ms, p99_ms, rps, source

CapacityEstimate

endpoint_fqn, saturation_rps, ceiling_concurrency, risk_level

Relationship

Description

CALLS

Method → Method; carries callee_name, caller_arg_pos, callee_param_pos

CALLS_REST

Method → Endpoint (resolved cross-service call)

UNRESOLVED_CALL

Method → RestCall (not yet resolved)

CONTAINS_CLASS

File → Class

CONTAINS_METHOD

Class → Method

EXPOSES

Repo → Endpoint

DEPENDS_ON

Repo → Repo (cross-service dependency)

EXTENDS

Class → Class

IMPLEMENTS

Class → Class

HAS_RELATION

Class → EntityRelation

OBSERVED_AT

Method → PerfSample


Performance

Query performance (graph DB)

Benchmarked on an 845-file Java/Kotlin service:

Operation

Time

Cold index

~67s

Incremental re-index (no changes)

~34s

find_callers

<5ms

blast_radius (depth 3)

<15ms

find_taint_sinks (full repo)

<25ms

Batch write speedup vs naive per-row writes: 12×.


AI assistant benchmark — tracing a single call flow

Java/Kotlin codebase (845 + 224 files, measured)

Benchmarked on a 845-file Kotlin service and a 224-file Java service, tracing one controller endpoint through service → repositories → upstream APIs. GitNexus v1.6.3, Orihime v1.9, and a grep+source-read baseline were all measured on the same codebase on the same hardware (WSL2/Ubuntu, Intel i7, 2026-04-30).

Approach

Cold index

Query latency

Avg tokens/query

Files read

Baseline — Claude reads source files directly

—

~4–5 min

~14,000

27

GitNexus v1.6.3

51.4s

2–10s⁴

~1,490

0

Orihime v1.9

66.6s

3–22ms

~683

0

Orihime vs baseline: 95% fewer tokens · 200–1,400× faster queries
Orihime vs GitNexus: 2.2× fewer tokens · 200–1,400× faster queries · MCP-native

The 7 Orihime tool calls produced ~80% of the structural picture (full controller→service→repo→upstream chain, 27 test methods surfaced, resilience wiring discovered automatically). The remaining ~20% — upstream API URLs, auth headers, branch-level control flow — requires targeted source reads, scoped to ~5 specific files rather than 27.

GitNexus's cold index is ~1.3× faster on NTFS (Node.js parse throughput advantage). On native Linux this gap narrows to near parity.

⁴ GitNexus query latency is dominated by live GitHub API round trips (1–3 per query × 500–2,000ms each, rate-limit dependent). Blast radius returned results in the wrong direction (upstream imports rather than downstream dependents).


License

MIT

Available Tools

33 tools
blast_radiusA

Find all methods transitively affected by changing the given method.

Performs a breadth-first traversal of CALLS edges in reverse
(callers of callers) up to *max_depth* hops.

Args:
    method_fqn: FQN of the method being changed, e.g. ``com.example.Foo.bar``.
    max_depth:  Maximum number of hops to traverse (default 3, max 10).
    exclude_generated: When True, filter out Lombok/compiler-generated callers.

Returns:
    List of dicts with keys ``fqn``, ``file_path``, and ``depth``.
    Depth 1 = direct callers, depth 2 = their callers, etc.
    The changed method itself is not included.

Inputs: method_fqn (required), max_depth, exclude_generated. Returns: result

estimate_capacityA

Estimate capacity per endpoint using Little's Law.

concurrency = RPS x (p99_ms / 1000)
saturation_rps = thread_pool_size / (p99_ms / 1000)

Risk levels (based on current_rps / saturation_rps):
  CRITICAL  > 80%
  HIGH      > 60%
  MEDIUM    > 40%
  LOW       otherwise

Args:
    repo_name: The logical name of the indexed repository.

Returns:
    List of dicts: ``endpoint_fqn``, ``current_rps``, ``p99_ms``,
    ``saturation_rps``, ``ceiling_concurrency``, ``risk_level``.

Inputs: repo_name (required). Returns: result

find_calleesA

Find all methods directly called by the given method.

Args:
    method_fqn: Fully-qualified method name, e.g. ``com.example.Foo.bar``.
    exclude_generated: When True, filter out Lombok/compiler-generated callees.

Returns:
    List of dicts with keys ``fqn``, ``file_path``, ``line_start``.
    Empty list if the method is not found or makes no calls.

Inputs: method_fqn (required), exclude_generated. Returns: result

find_callersA

Find all methods that directly call the given method.

Args:
    method_fqn: Fully-qualified method name, e.g. ``com.example.Foo.bar``.
    exclude_generated: When True, filter out Lombok/compiler-generated callers.

Returns:
    List of dicts with keys ``fqn``, ``file_path``, ``line_start``.
    Empty list if the method is not found or has no callers.

Inputs: method_fqn (required), exclude_generated. Returns: result

find_cascade_riskA

Find upstream endpoints at cascade risk from saturated downstream services.

Walks CALLS_REST edges: if Method A (in repo_name) calls Endpoint B (in
another repo) and B's corresponding PerfSample has a lower saturation_rps
than A's current_rps, A is flagged as being at cascade risk.

saturation_rps for endpoint B = thread_pool_size / (p99_ms / 1000).

Args:
    repo_name: The logical name of the upstream repository to analyse.

Returns:
    List of dicts: ``upstream_method_fqn``, ``downstream_endpoint``,
    ``downstream_saturation_rps``, ``upstream_current_rps``,
    ``risk`` (``"SATURATED"`` or ``"NEAR_SATURATION"``).

Inputs: repo_name (required). Returns: result

find_complexity_hintsA

Return methods with complexity hints, sorted by CALLS in-degree descending.

Detects static complexity patterns stored on Method nodes during indexing:
O(n2)-candidate, O(n2)-list-scan, recursive, n+1-risk, unbounded-query.

Args:
    repo_name:    Repository to query.
    min_severity: Severity filter:
                  ``"low"``    — include all hints
                  ``"medium"`` — exclude hints that are ONLY ``recursive``
                  ``"high"``   — only include hints containing ``O(n2)`` or ``n+1-risk``

Returns:
    List of dicts: ``method_fqn``, ``file_path``, ``line_start``,
    ``complexity_hint``, ``call_degree``.
    Sorted by ``call_degree`` descending (most-called methods first).

Inputs: repo_name (required), min_severity. Returns: result

find_cross_service_taintA

Find taint paths from HTTP endpoint handler parameters to outgoing REST calls.

This is an Orihime-native equivalent of SonarQube Enterprise "Advanced SAST"
cross-service taint analysis.

A taint path is a call chain that starts at an HTTP endpoint handler method
(whose parameters are user-controlled: @RequestParam, @PathVariable, @RequestBody)
and ends at a method that issues an outgoing HTTP call (UNRESOLVED_CALL or
CALLS_REST edge).  Intermediate hops are method CALLS edges.

Args:
    repo_name: Repository to analyse.
    max_depth: Maximum call-chain depth to traverse (default 6).

Returns:
    List of dicts, each describing one taint path::

        {
            "source_handler_fqn":   str,  # endpoint handler method
            "source_endpoint":       str,  # HTTP path e.g. GET /api/users/{id}
            "sink_method_fqn":       str,  # method that makes the outgoing call
            "sink_url_pattern":      str,  # URL pattern of the outgoing call
            "sink_http_method":      str,  # GET/POST/...
            "path_length":           int,  # number of hops
            "call_chain":            list, # [method_fqn, ...] from source to sink
        }

Inputs: repo_name (required), max_depth. Returns: result

find_eager_fetchesA

Find all EAGER fetch relationships — potential N+1 query sources.

Returns list of dicts with source_class_fqn, field_name, relation_type,
target_class_fqn for all relations where fetch_type = 'EAGER'.

Inputs: repo_name (required). Returns: result

find_endpoint_callersA

Find the handler method for an endpoint and all upstream callers.

Args:
    http_method:  HTTP verb — GET, POST, PUT, DELETE, or PATCH (case-insensitive).
    path_pattern: Exact path of the endpoint, e.g. ``/api/users/{id}``.

Returns:
    List of dicts with keys ``role`` (``"handler"`` or ``"caller"``),
    ``fqn``, ``file_path``, ``line_start``.
    Empty list if the endpoint is not found.

Inputs: http_method (required), path_pattern (required). Returns: result

find_entry_pointsB

Return all methods/endpoints marked as entry points (is_entry_point=true).

Entry points include HTTP handler methods, @KafkaListener, @Scheduled,
@JmsListener, and @RabbitListener methods.

Args:
    repo_name: Repository to query.

Returns:
    List of dicts with keys ``fqn``, ``file_path``, ``line_start``,
    ``annotations``.

Inputs: repo_name (required). Returns: result

find_external_callsA

Return all calls to methods NOT in the indexed repo (callee has no Method node).

These are calls to external libraries, frameworks, or unindexed services.
Returns [{caller_fqn, callee_name, call_count}] sorted by call_count descending.
Useful for: "what external dependencies does this service actually call at runtime?"

Args:
    repo_name: The logical name of the indexed repository.

Returns:
    List of dicts with keys ``caller_fqn``, ``callee_name``, ``call_count``.
    Empty list if the repo is not found or has no external calls.

Inputs: repo_name (required). Returns: result

find_hotspotsA

Return methods ranked by composite risk: complexity_hint x p99.

Methods with both a complexity hint AND high p99 latency are ranked highest.
Methods that have a complexity hint but no perf data are included with
p99_ms=null and risk_score = hint_weight * 100.

Args:
    repo_name: The logical name of the indexed repository.

Returns:
    List of dicts: ``method_fqn``, ``complexity_hint``, ``p99_ms``,
    ``p50_ms``, ``risk_score``, ``file_path``, ``line_start``.
    Sorted by risk_score descending.

Inputs: repo_name (required). Returns: result

find_implementationsA

Find all classes that directly implement the given interface (up to 10 hops via IMPLEMENTS).

Args:
    interface_fqn: FQN of the interface, e.g. ``com.example.WalletService``.

Returns:
    List of dicts with keys ``class_fqn``, ``class_name``, ``file_path``, ``repo_name``.

Inputs: interface_fqn (required). Returns: result

find_io_fanoutA

Return entry-point methods ranked by I/O call count, with serial/parallel breakdown.

For each HTTP/Kafka/Scheduled entry point, reports the total number of I/O
operations (DB + HTTP + cache) detectable in its method body, split into
serial (latency adds) and parallel (latency = max of group).

If perf data has been ingested via ingest_perf_results, also estimates
latency_floor_ms = sum(serial p99s) + max(parallel p99s).

Args:
    repo_name: Repository to query.
    min_total: Only return methods with at least this many I/O calls (default 2).

Returns:
    List of dicts: endpoint_path, http_method, handler_fqn, file_path,
    line_start, total_io, serial_io, parallel_io, parallel_wrapper, latency_floor_ms.
    Sorted by total_io descending.

Inputs: repo_name (required), min_total. Returns: result

find_license_violationsA

Check dependencies in the repo for license compliance.

Looks for pom.xml and build.gradle/build.gradle.kts in the repo root.
Queries Maven Central for each dependency's license.

Args:
    repo_name: The logical name of the indexed repository.
    allowed:   List of SPDX license IDs to allow
               (default: MIT, Apache-2.0, BSD-*, ISC, etc.).
    license_overrides: Maps "group:artifact" to a license SPDX string to
                       bypass Maven Central lookups (useful for testing or
                       when a known license is not in Maven Central metadata).

Returns:
    List of dicts [{group, artifact, version, license, status, reason}]
    where status is "OK", "VIOLATION", "WARNING", or "UNKNOWN".
    Only VIOLATION and WARNING items are returned (OK items filtered out).

Inputs: repo_name (required), allowed, license_overrides. Returns: result

find_reachable_sinksA

Return taint sinks reachable from entry points via CALLS edges.

When show_all=False (default), only returns sinks reachable from an entry
point.  When show_all=True, returns all sinks (same as find_taint_sinks).

Uses BFS from all entry points through CALLS edges to build a reachable
method ID set, then filters find_taint_sinks results to only those whose
caller method is reachable from an entry point.

Args:
    repo_name: Repository to analyse.
    show_all:  When True, skip reachability filtering and return all sinks.

Returns:
    List of dicts with keys ``caller_fqn``, ``sink_method``, ``file_path``,
    ``line_start``, ``sink_category``.

Inputs: repo_name (required), show_all. Returns: result

find_repo_dependenciesA

Find all repositories that the given repository directly depends on.

Args:
    repo_name: The logical name of the repository as indexed (e.g. ``point-bank-bff``).

Returns:
    List of dicts with key ``name`` for each dependency repo.
    Empty list if the repo is not found or has no declared dependencies.

Inputs: repo_name (required). Returns: result

find_second_order_injectionA

Detect second-order injection patterns: taint written to DB then read back unsanitized.

A second-order (stored) injection occurs when:
  1. User-controlled data reaches a persistence write (JPA save/persist/merge).
  2. That same data is later read back from the DB and passed to a dangerous sink.

Orihime approximates this by finding:
  - Methods that write to a JPA entity (call to save/persist/merge on a Repository
    class or on an EntityManager).
  - Methods that read from the same entity type (findById/findAll/executeQuery) AND
    whose return value flows into a sink (detected via call chain analysis).

This is a structural approximation — it is not full data-flow.  False positives are
expected; use it to prioritise manual review, not as a definitive scanner.

Args:
    repo_name: Repository to analyse.

Returns:
    List of dicts with keys:
        ``entity_fqn``, ``write_method_fqn``, ``read_method_fqn``,
        ``read_file_path``, ``risk_level``.

Inputs: repo_name (required). Returns: result

find_superclassesA

Walk the EXTENDS chain upward from the given class (BFS, max depth 10).

Returns:
    List of dicts with keys ``class_fqn``, ``depth``, ``repo_name``.
    Depth 1 = direct parent. Starting class not included.

Inputs: class_fqn (required), max_depth. Returns: result

find_taint_flowsA

Return confirmed taint flows where a tainted argument (position 0) flows to a known sink's first parameter.

Stricter than find_taint_sinks — only returns findings where:
1. The caller method has a @RequestParam/@RequestBody/@PathVariable parameter (taint source)
2. The CALLS edge has caller_arg_pos=0 (first argument is passed)
3. The callee method name matches a known sink

Returns:
    List of dicts with keys:
        ``source_method_fqn``, ``sink_method_name``, ``caller_arg_pos``,
        ``callee_param_pos``, ``file_path``, ``line_start``, ``owasp_category``.

Inputs: repo_name (required). Returns: result

find_taint_pathsA

Multi-hop taint path analysis from annotation-based sources to dangerous sinks.

Performs BFS forward through CALLS edges from all taint-source methods
(those annotated with @RequestParam, @PathVariable, @RequestBody, etc.)
up to max_depth hops. Sanitizer calls prune the branch. All distinct
call chains reaching a sink are returned.

Unlike find_taint_flows (single-hop, arg_pos=0 only), this tool finds
handler → service → sink chains of arbitrary depth up to max_depth.

Args:
    repo_name: Repository to analyse.
    max_depth: Maximum hop depth (default 5, capped at 10).

Returns:
    List of dicts with keys:
        source_method_fqn, source_annotations, sink_method_fqn, sink_type,
        path_length, call_chain, sanitizer_pruned, file_path, line_start.
    Empty list if no repo found, no sources, or no paths exist.

Inputs: repo_name (required), max_depth. Returns: result

find_taint_sinksA

Find all calls to known dangerous sink methods in the given repository.

Uses the built-in sink registry (SQL, HTTP clients, exec) merged with any
custom sinks defined in ``~/.orihime/security.yml``.  This is the custom
sources/sinks equivalent of SonarQube Enterprise's configurable taint rules.

Args:
    repo_name: Repository to analyse.

Returns:
    List of dicts with keys:
        ``caller_fqn``, ``sink_method``, ``file_path``, ``line_start``.

Inputs: repo_name (required). Returns: result

generate_security_reportA

Generate a security findings report mapped to a compliance framework.

This is the Orihime equivalent of SonarQube Enterprise's OWASP / CWE /
PCI DSS / STIG security reports.  It aggregates findings from the taint
analysis and maps each to the requested framework's taxonomy.

Args:
    repo_name: Repository to analyse.
    framework: One of ``owasp``, ``cwe``, ``pci``, ``stig`` (default: ``owasp``).

Returns:
    List of dicts, each a finding with framework-specific keys.
    OWASP: ``category``, ``caller_fqn``, ``sink_method``, ``file_path``, ``line_start``.
    CWE:   ``cwe_id``, ``caller_fqn``, ``sink_method``, ``file_path``, ``line_start``.
    PCI:   ``requirement``, ``caller_fqn``, ``sink_method``, ``file_path``.
    STIG:  ``vuln_id``, ``caller_fqn``, ``sink_method``, ``file_path``.

Inputs: repo_name (required), framework. Returns: result

get_file_locationA

Get the source file path and line number for a method or class by FQN.

Tries Method first, then Class.

Args:
    fqn: Fully-qualified name of the method or class.

Returns:
    Dict with keys ``fqn``, ``file_path``, ``line_start``,
    or ``None`` if not found.

Inputs: fqn (required). Returns: result

index_repo_toolA

Index a source repository into the Orihime knowledge graph.

After indexing, all other query tools will reflect the new data.

Args:
    repo_path: Absolute path to the repository root on disk.
    repo_name: Logical name to identify the repo in queries
               (e.g. ``point-bank-bff``).
    branch: Branch name to tag this index run with (default: ``"master"``).
            Index the same repo under different branch names to compare
            branches side-by-side.
    force: When True, re-parse every file even if blob hashes are unchanged.

Returns:
    Summary dict with counts: ``repos``, ``files``, ``classes``,
    ``methods``, ``endpoints``, ``rest_calls``, ``call_edges``.
    On failure, returns ``{"error": "<message>"}``.

Inputs: repo_path (required), repo_name (required), branch, force.

ingest_perf_resultsA

Ingest a Gatling/JMeter/JSON perf results file into the graph.

Creates PerfSample nodes and OBSERVED_AT edges to matching Method nodes.

Args:
    repo_name: The logical name of the indexed repository.
    file_path: Absolute path to the perf results file
               (.log = Gatling, .xml = JMeter, .json = simple JSON).

Returns:
    Dict with keys ``ingested``, ``matched_methods``, ``unmatched``.
    On failure, returns ``{"error": "<message>"}``.

Inputs: repo_name (required), file_path (required).

list_branchesA

List all indexed branches, optionally filtered by repository.

Args:
    repo_name: If provided, only return branches belonging to this repo.
               Pass an empty string (the default) to list all repos.

Returns:
    List of dicts with keys ``repo_name``, ``branch_name``.

Inputs: repo_name. Returns: result

list_endpointsA

List all HTTP endpoints in the graph, optionally filtered by repository.

Args:
    repo_name: If provided, only return endpoints belonging to this repo.
               Pass an empty string (the default) to list all repos.

Returns:
    List of dicts with keys ``http_method``, ``path``,
    ``handler_fqn``, and ``repo_name``.

Inputs: repo_name. Returns: result

list_entity_relationsA

List all JPA entity relationships in a repo.

Returns list of dicts: source_class_fqn, field_name, relation_type,
fetch_type, target_class_fqn.

Inputs: repo_name (required). Returns: result

list_reposA

List all indexed repositories with their stats.

Returns:
    List of dicts with keys: ``name``, ``root_path``, ``method_count``,
    ``endpoint_count``.
    Empty list if no repositories have been indexed yet.

Inputs: no named parameters. Returns: result

list_security_configA

Return the active security configuration (sources, sinks, sanitizers).

Shows the merged built-in + user-defined rules currently in effect.
Useful for verifying that custom ``~/.orihime/security.yml`` rules were loaded.

Returns:
    Dict with keys ``source_annotations``, ``source_methods``,
    ``sink_methods``, ``sanitizer_methods``.

Inputs: no named parameters.

list_unresolved_callsA

List outgoing REST calls that could not be matched to a known endpoint.

These represent cross-repo or external HTTP calls that Orihime has not yet
resolved to an Endpoint node.

Args:
    repo_name: If provided, only return unresolved calls from this repo.
               Pass an empty string (the default) to list all repos.

Returns:
    List of dicts with keys ``url_pattern``, ``http_method``,
    ``callee_name``, ``caller_fqn``, and ``repo_name``.

Inputs: repo_name. Returns: result

search_symbolA

Search for classes or methods by name (case-insensitive substring match).

Args:
    query: Substring to search for, e.g. ``InterestCalc`` or ``calculate``.

Returns:
    List of dicts with keys ``type`` (``"class"`` or ``"method"``),
    ``fqn``, and ``file_path``.
    Results from both classes and methods are merged and returned together.

Inputs: query (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 33 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is notable overlap in the taint analysis family (find_taint_sinks, find_taint_flows, find_taint_paths, find_reachable_sinks, find_cross_service_taint, find_second_order_injection) and call graph queries (find_callers, blast_radius, find_endpoint_callers). Detailed descriptions help distinguish them, but an agent could misselect between similar-sounding tools.

    Naming Consistency4/5

    Naming follows a mostly consistent verb_noun pattern with find_* for queries and list_* for enumerations. However, there are deviations like search_symbol, get_file_location, ingest_perf_results, index_repo_tool, generate_security_report, estimate_capacity, and blast_radius, which mix conventions. Still readable and predictable overall.

    Tool Count3/5

    33 tools is above the typical heavy threshold (25+), but the server is a comprehensive static analysis platform covering indexing, security, performance, dependencies, and call graphs. While each tool has a purpose, the count feels large and could be consolidated (e.g., merging some taint variants), making it borderline appropriate.

    Completeness4/5

    The toolset covers the core lifecycle of static analysis: indexing, searching, security (taint, license), performance (hotspots, capacity, cascade), dependencies, and call graph traversal. Minor gaps exist, such as no tool to delete a repository or retrieve all methods in a class, but these are not critical to the primary workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Framework-aware code intelligence MCP server that builds a cross-language dependency graph from source code. 53 integrations (Laravel, Django, Rails, Spring, NestJS, Next.js, and more) across 68 languages. 100+ tools for navigation, impact analysis, refactoring, security scanning, session memory, and CI/PR reports — up to 97% token reduction.
      29
      4,769 npm
      204
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      A high-performance code knowledge graph server implementing MCP, indexing codebases into a structured AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing.
      3,102 npm
      96
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 159 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.
      17
      48,637
      MIT