{"id":51052329,"url":"https://github.com/jayarrowz/coderag","last_synced_at":"2026-06-22T18:02:26.098Z","repository":{"id":359985316,"uuid":"1245795750","full_name":"JayArrowz/CodeRag","owner":"JayArrowz","description":"Hybrid vector + call-graph code indexer for RAG — semantic search over C# and TypeScript codebases with live file-watch reindexing","archived":false,"fork":false,"pushed_at":"2026-05-24T12:21:31.000Z","size":460,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T14:12:17.701Z","etag":null,"topics":["code-analysis","rag"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JayArrowz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T15:04:58.000Z","updated_at":"2026-05-24T12:21:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/JayArrowz/CodeRag","commit_stats":null,"previous_names":["jayarrowz/coderag"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/JayArrowz/CodeRag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayArrowz%2FCodeRag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayArrowz%2FCodeRag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayArrowz%2FCodeRag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayArrowz%2FCodeRag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayArrowz","download_url":"https://codeload.github.com/JayArrowz/CodeRag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayArrowz%2FCodeRag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34659896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-analysis","rag"],"created_at":"2026-06-22T18:02:25.190Z","updated_at":"2026-06-22T18:02:26.085Z","avatar_url":"https://github.com/JayArrowz.png","language":"C#","funding_links":["https://buymeacoffee.com/jayarrowz"],"categories":[],"sub_categories":[],"readme":"﻿# CodeRag\n\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![npm version](https://img.shields.io/npm/v/@jayarrowz/mcp-coderag?logo=npm)](https://www.npmjs.com/package/@jayarrowz/mcp-coderag)\n[![GHCR image](https://img.shields.io/badge/GHCR-coderag%2Fcoderag-blue?logo=github)](https://github.com/JayArrowz/CodeRag/pkgs/container/coderag%2Fcoderag)\n[![Docker pull](https://img.shields.io/badge/docker%20pull-ghcr.io%2Fjayarrowz%2Fcoderag%2Fcoderag%3Asha--1aa420f-blue?logo=docker)](https://github.com/JayArrowz/CodeRag/pkgs/container/coderag%2Fcoderag)\n[![Buy Me A Coffee](https://img.shields.io/badge/Buy%20Me%20A%20Coffee-support-yellow.svg)](https://buymeacoffee.com/jayarrowz)\n\nA hybrid **vector + call-graph** code index for RAG. It extracts classes, methods, properties, library calls, and call-graph edges from C# and TypeScript/TSX source code, embeds them, and stores everything in PostgreSQL/pgvector for semantic and structural search. A Blazor Server dashboard provides live indexing, interactive exploration, and semantic search.\n\n\u003cimg width=\"2886\" height=\"2067\" alt=\"image\" src=\"https://github.com/user-attachments/assets/c55b2a1e-75a6-4766-8706-359ec925d05b\" /\u003e\n\n\u003cimg width=\"1484\" height=\"2010\" alt=\"image\" src=\"https://github.com/user-attachments/assets/0cc311ae-a709-42e9-9c86-7de7e18c32d8\" /\u003e\n\n## Architecture\n\n```\nCodeRag.Core          Models, interfaces (IVectorStore, ILanguageAnalyzer, IEmbeddingService, ISolutionAnalyzer)\nCodeRag.Analyzers     Roslyn (C#, full semantic) + TsCompilerAnalyzer (TS/TSX, full type-checker)\n                      + Tree-sitter stubs (JavaScript/JSX, Python, Go)\nCodeRag.Storage       EF Core + PostgreSQL/pgvector, OpenAI / Google / Ollama embeddings\nCodeRag.Dashboard     Blazor Server dashboard -- indexing, search, explorer, watches\ntools/ts-analyzer     Node.js sidecar (ts-morph) spawned by TsCompilerAnalyzer\n```\n\n## Supported Languages\n\n| Language | Analyzer | Semantic edges | Notes |\n|----------|----------|----------------|-------|\n| C# | Roslyn (`MSBuildWorkspace`) | Full — calls, creates, inherits, implements | Requires a `.sln` / `.csproj` descriptor |\n| TypeScript / TSX | `TsCompilerAnalyzer` + Node.js sidecar | Full — calls, creates, inherits, implements, renders, passes | Requires Node.js 18+; `tsconfig.json` auto-discovered |\n| JavaScript / JSX | `JavaScriptAnalyzer` (tree-sitter) | Structural only | No type resolution |\n| Python, Go | Tree-sitter stubs | Structural only | Extend `TreeSitterAnalyzerBase` |\n\n## Concepts\n\n### Workspaces\n\nA **workspace** is a logical grouping -- typically one solution, repo, or monorepo -- used to keep indexes isolated.\n\n- Every chunk and edge is tagged with a workspace.\n- Edge resolution (caller -\u003e callee) is scoped within the workspace so two workspaces with identical method signatures never cross-link.\n- Workspaces can be **closed** (watches disabled, Roslyn cache freed) and **re-opened**, or **dropped** (all chunks/edges deleted).\n\nA workspace is **distinct from a `ProjectName`** (the `.csproj` name inside a solution). One workspace usually contains several projects.\n\n### Call graph\n\nIn addition to vector chunks, the indexer extracts directed edges:\n\n| Edge kind    | Languages         | Meaning                                        |\n|--------------|-------------------|------------------------------------------------|\n| `calls`      | C#, TS/TSX        | method / function A invokes B                  |\n| `creates`    | C#, TS/TSX        | method A constructs type B (`new`)             |\n| `inherits`   | C#, TS/TSX        | type A inherits from base type B               |\n| `implements` | C#, TS/TSX        | type A implements interface B                  |\n| `renders`    | TSX               | component A renders component B in JSX         |\n| `passes`     | TSX               | component A passes a symbol as a prop to B     |\n\nEdges are resolved against canonical signatures within the workspace. Unresolved edges (target indexed in a different run) are lazily resolved at query time and persisted so subsequent lookups are instant.\n\n### Query pipeline\n\n`CodebaseIndexer.QueryAsync` runs a multi-stage hybrid retrieval:\n\n1. **Symbol match** -- exact identifier lookup, pinned at the top (optional).\n2. **Vector ANN** -- embedding similarity search over the candidate pool.\n3. **Lexical search** -- full-text match over names, signatures, docs, and paths.\n\nStages 1-3 run **concurrently**. Results are then fused with **Reciprocal Rank Fusion**, pruned by a minimum vector score, and diversity-capped (per-file and per-class limits). An optional **neighborhood expansion** step adds the containing type and incoming callers for each top result, also run in parallel. Outgoing edges can be hydrated in a parallel pass so AI context includes external-library docs.\n\nEvery stage is individually toggleable via `QueryOptions`.\n\n## What Gets Indexed\n\n| Element                      | Languages  | Fields Stored                                                                    |\n|------------------------------|------------|-----------------------------------------------------------------------------------|\n| Classes / interfaces         | C#, TS/TSX | Name, namespace, modifiers, attributes, doc, file, line, base/interface refs      |\n| Methods / functions          | C#, TS/TSX | Signature, parameters, return type, body, doc, modifiers, callers/callees          |\n| Constructors                 | C#, TS/TSX | Parameters, body, doc                                                             |\n| Properties / fields          | C#, TS/TSX | Name, type, modifiers, doc                                                        |\n| Arrow functions / `const fn` | TS/TSX     | Inlined as `function_declaration` chunks with full signature                      |\n| Type aliases                 | TS/TSX     | Name, namespace, body                                                             |\n| Enums                        | C#         | Name, members, XML doc                                                            |\n| Library calls                | C#, TS/TSX | Assembly, namespace, signature, call location                                     |\n| Edges                        | C#, TS/TSX | Source → target signature/chunk, kind (calls/creates/inherits/implements/renders/passes) |\n\n## Quick Start\n\n### Option A — Docker Compose (recommended)\n\nRuns the dashboard **and** PostgreSQL together with a single command. No local .NET or Node.js install needed.\n\n**1. Copy the example env file and fill in your embedding API key:**\n\n```bash\ncp .env.example .env\n# edit .env and set CODERAG_Embedding__ApiKey\n```\n\n**2. Build and start everything:**\n\n```bash\ndocker compose up -d --build\n```\n\n\u003e **Using Ollama for embeddings?** Enable the `ollama` profile so the Ollama server and model pull run alongside the dashboard:\n\u003e ```bash\n\u003e # in .env\n\u003e COMPOSE_PROFILES=ollama\n\u003e CODERAG_Embedding__Provider=Ollama\n\u003e CODERAG_Embedding__Model=qwen3-embedding\n\u003e CODERAG_Embedding__BaseUrl=http://ollama:11434\n\u003e ```\n\u003e The `ollama-pull` service automatically pulls the configured model on first start. Model files are stored at `OLLAMA_DATA_PATH` (default: `./ollama-data`).\n\u003e\n\u003e **GPU support:** by default Ollama runs CPU-only. Add the appropriate override for your GPU:\n\u003e - **NVIDIA**: `docker compose -f docker-compose.yml -f docker-compose.nvidia.yml up -d --build` (requires [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html))\n\u003e - **AMD**: `docker compose -f docker-compose.yml -f docker-compose.amd.yml up -d --build`\n\u003e - **Intel**: `docker compose -f docker-compose.yml -f docker-compose.intel.yml up -d --build`\n\nThe first build takes a few minutes (restores NuGet packages, runs `npm ci`). Subsequent starts are instant.\n\n**3. Open the dashboard:**\n\n```\nhttp://localhost:5180\n```\n\n\u003e **Indexing paths**: the host directory set by `WORKSPACE_PATH` in your `.env` file (default: the repo root) is mounted read-write at `/workspace` inside the container. All paths entered in the dashboard must use this prefix — e.g. `/workspace/myapp` maps to `$WORKSPACE_PATH/myapp` on the host.\n\n**Tear down** (keeps data volumes):\n```bash\ndocker compose down\n```\n\n**Full reset** (destroys all indexed data):\n```bash\ndocker compose down -v\n```\n\n---\n\n### Option B — Local (bare metal)\n\n### 1. Start the database\n\n```bash\ndocker compose up -d\n```\n\n**SQLite** (zero setup): set `Database.Provider` to `Sqlite` and `Database.ConnectionString` to `Data Source=coderag.db` in `appsettings.json` -- no Docker needed.\n\n### 2. Configure an embedding provider\n\nEdit `src/CodeRag.Dashboard/appsettings.json` (or use environment variables):\n\n**Google (Gemini):**\n```json\n\"Embedding\": { \"Provider\": \"Google\", \"ApiKey\": \"AIza...\", \"Model\": \"models/gemini-embedding-001\", \"Dimensions\": 3072 }\n```\n\n**OpenAI:**\n```json\n\"Embedding\": { \"Provider\": \"OpenAI\", \"ApiKey\": \"sk-...\", \"Model\": \"text-embedding-3-small\", \"Dimensions\": 1536 }\n```\n\n**Ollama:**\n```json\n\"Embedding\": { \"Provider\": \"Ollama\", \"Model\": \"qwen3-embedding\", \"Dimensions\": 3072, \"BaseUrl\": \"http://localhost:11434\" }\n```\n\nWithout an API key the app starts with fake embeddings (vector search returns nothing useful but the rest of the UI works).\n\n### 3. Run the dashboard\n\n```bash\ndotnet run --project src/CodeRag.Dashboard\n```\n\nThe database schema is created automatically on first run. Open `https://localhost:5001` in your browser.\n\n### 4. Index your code\n\nNavigate to **Index** in the sidebar and either:\n\n- **Index a solution** -- provide the path to a `.sln` or `.slnx` file and a workspace name. Uses full Roslyn semantic analysis (cross-file call edges, type resolution).\n- **Index a directory** -- provide any source directory path, workspace name, and optional project name. Uses fast structure-only analysis.\n\nAfter indexing completes the job page shows stats and a `FileSystemWatcher` is automatically registered for the indexed path so future file changes are reindexed incrementally.\n\n## Dashboard\n\n### Pages\n\n| Page | Route | Description |\n|---|---|---|\n| **Overview** | `/` | Total chunk/edge counts, per-workspace summary, links to all sections |\n| **Workspaces** | `/workspaces` | List all workspaces with chunk/edge stats |\n| **Workspace detail** | `/workspaces/{name}` | Stats breakdown by language and project; **Close**, **Open**, and **Drop** actions |\n| **Search** | `/search` | Hybrid semantic search with configurable pipeline options; results link to Explorer |\n| **Explorer** | `/explore/{workspace}` | Interactive tree (project -\u003e namespace -\u003e class -\u003e member) with call graph detail panel; supports `?chunk={guid}` URL navigation |\n| **Index** | `/index` | Kick off a solution or directory index job |\n| **Watches** | `/watches` | Manage live file-system watches; add watches manually or view/edit those created by index jobs |\n| **Jobs** | `/jobs` | Browse background indexing jobs |\n| **Job detail** | `/jobs/{id}` | Live console output and stats for a running or completed job |\n\n### Watches\n\nA **watch** is a directory that is automatically reindexed when files change. Watches are persisted to a JSON file and survive app restarts.\n\n- **Local / bare-metal**: stored at `%LOCALAPPDATA%/CodeRag/watches.json` by default.\n- **Docker**: stored at `/data/watches.json` inside the container, backed by the `watches-data` named volume declared in `docker-compose.yml`. This ensures watches are not lost when the container is restarted or replaced.\n- Override the path via the `WatchesFile` config key (or `CODERAG_WatchesFile` env var).\n\n- Watches are created automatically after a successful index job.\n- For **solution-level** jobs, one watch is created per project directory with the solution path stored -- file changes are then reindexed using the full Roslyn semantic model (preserving cross-file call edges).\n- For **directory-level** jobs, a single watch is created for the directory.\n- A **debounce window** (750 ms) coalesces rapid saves, git checkouts, and build output bursts before reindexing.\n- On startup, a **catch-up sweep** re-indexes any files modified while the dashboard was offline.\n- Watches can also be added manually from the Watches page, including an optional **solution path** to enable Roslyn-semantic incremental reindex.\n\n### Workspace lifecycle\n\n| Action | Effect |\n|--------|--------|\n| **Close** | Disables all watches, detaches `FileSystemWatcher`s, evicts Roslyn's `MSBuildWorkspace` cache. Chunks/edges and watch records are preserved. |\n| **Open** | Re-enables watches, re-attaches watchers, runs a catch-up sweep. |\n| **Drop** | Closes the workspace first, then permanently deletes all chunks and edges from the database. |\n\n### Explorer URL navigation\n\nThe Explorer supports deep-linking via `?chunk={guid}`. Navigating to `/explore/MyApp?chunk=\u003cid\u003e` will load the workspace, select that chunk in the tree (auto-expanding the project -\u003e namespace -\u003e class path), and show its detail panel. All call-graph entries and member rows are rendered as `\u003ca href\u003e` links for easy bookmarking.\n\n## Configuration\n\nAll settings live under two JSON sections in `appsettings.json`. Every key can be overridden at runtime by a `CODERAG_` prefixed environment variable using double-underscore `__` as section separator (e.g. `CODERAG_Embedding__ApiKey`).\n\n### Database\n\n```json\n\"Database\": {\n  \"Provider\": \"Postgres\",\n  \"ConnectionString\": \"Host=localhost;Database=coderag;Username=postgres;Password=...\"\n}\n```\n\n| `Provider` value | Backend | Notes |\n|------------------|---------|-------|\n| `Postgres` | PostgreSQL + pgvector | Recommended for production. Requires the `vector` extension. |\n| `Sqlite` | SQLite + sqlite-vec | Zero-setup, single-file DB. Use `Data Source=coderag.db` as the connection string. |\n\n### Embedding\n\n```json\n\"Embedding\": {\n  \"Provider\": \"Google\",\n  \"ApiKey\": \"AIza...\",\n  \"Model\": \"models/gemini-embedding-001\",\n  \"Dimensions\": 3072\n}\n```\n\n| `Provider` value | Default model | Default dims | Notes |\n|------------------|---------------|--------------|-------|\n| `OpenAI` | `text-embedding-3-small` | 1536 | Set `BaseUrl` to override the endpoint (Azure OpenAI, local proxy, etc.) |\n| `Google` | `text-embedding-004` | 3072 | Uses Gemini Embedding API. `models/gemini-embedding-001` also works (3072 dims). |\n| `Ollama` | _(none)_ | _(model-specific)_ | Set `BaseUrl` to the Ollama server (e.g. `http://localhost:11434`). When using Docker Compose, use `http://ollama:11434` and enable `COMPOSE_PROFILES=ollama`. The first embedding request will be slow while Ollama loads the model into memory; after that the model stays resident and subsequent calls are fast. |\n\n`Dimensions` can be left at `0` to use the provider default. When no `ApiKey` is set, a deterministic fake embedding service is used (useful for smoke tests, not for real search).\n\n### Other settings\n\n| appsettings.json key | Default | Description |\n|----------------------|---------|-------------|\n| `WatchesFile` | `%LOCALAPPDATA%/CodeRag/watches.json` (local) / `/data/watches.json` (Docker) | Path to the file-watch persistence store. Set via `CODERAG_WatchesFile` env var when running in Docker. |\n\n## Swapping the Vector Store\n\n`IVectorStore` abstracts the database. To use Qdrant, ChromaDB, or another backend:\n\n1. Implement `IVectorStore` (chunks, edges, workspace ops).\n2. Register it in `VectorStoreServiceCollectionExtensions.AddVectorStore` or replace the call in DI setup directly.\n\nKey methods: `InitializeAsync`, `UpsertAsync` (chunks), `UpsertEdgesAsync`, `SearchAsync`, `ExactSymbolSearchAsync`, `LexicalSearchAsync`, `GetCallersAsync` / `GetCalleesAsync` / `GetOutgoingEdgesAsync`, `DeleteByFileAsync` / `DeleteByProjectAsync` / `DeleteByWorkspaceAsync`, `ListWorkspacesAsync`, `GetStatsAsync`.\n\n## TypeScript / TSX Support\n\nTypeScript and TSX files are analyzed by a long-lived **Node.js sidecar** process (`tools/ts-analyzer/analyze.js`) that uses [ts-morph](https://ts-morph.com/) to run the full TypeScript type-checker. The .NET `TsCompilerAnalyzer` communicates with it over NDJSON on stdin/stdout.\n\n### Prerequisites\n\n- **Node.js 18+** must be on `PATH` (or available as `node` / `cmd /c node`).\n- `npm install` must have been run in `tools/ts-analyzer/` (done automatically on first use, or pre-baked into the Docker image).\n\n### How it works\n\n1. On first use for a workspace, `TsCompilerAnalyzer` spawns `node analyze.js --server` as a background sidecar.\n2. An `open` request loads the nearest `tsconfig.json` (auto-discovered from the project directory upward).\n3. For a **full index**, an `analyze` request streams all chunks and edges back to .NET.\n4. For an **incremental watch update**, a `reanalyze` request passes only the changed file paths; the sidecar refreshes those files from disk and re-emits only the affected chunks/edges while still resolving cross-file type edges against the full project.\n5. On workspace deletion, the sidecar session is evicted and the process exits cleanly.\n\n### Running locally without Docker\n\n```bash\ncd tools/ts-analyzer\nnpm install\n```\n\nThen index a TypeScript workspace from the dashboard. The sidecar is started automatically.\n\n### Docker\n\nThe `Dockerfile` has a dedicated `node-deps` build stage that runs `npm ci --omit=dev`. The runtime image installs Node.js 20 via NodeSource and copies the pre-built `tools/ts-analyzer/node_modules` — no `npm install` is needed at container startup.\n\n## Adding Languages\n\n1. Implement `ILanguageAnalyzer` (or extend `TreeSitterAnalyzerBase`).\n2. Register it: `services.AddSingleton\u003cILanguageAnalyzer, YourAnalyzer\u003e()`.\n3. The indexer auto-routes files by extension.\n\nTree-sitter stubs for JavaScript/JSX, Python, and Go are in place — add the NuGet packages and implement the parsing logic.\n\n## Database Schema\n\nTwo tables, both logically partitioned by `workspace` (indexed).\n\n### `code_chunks`\n\n```\n-- Identity\nid, workspace, kind, language, namespace, class_name, function_name, signature\n\n-- Location\nfile_path, line_number, end_line_number\n\n-- Content\ndocumentation, body, body_summary\n\n-- Library tracking\nlibrary_assembly, library_package\n\n-- Metadata\nproject_name, return_type, modifiers[], parameters[], attributes[], caller_ids[]\n\n-- Vector\nembedding vector(1536)\n```\n\nIndexed on: `workspace`, `language`, `kind`, `project_name`, `file_path`, `class_name`, and `embedding` (HNSW/IVFFlat).\n\n### `code_edges`\n\n```\nid, workspace, source_chunk_id, target_chunk_id, target_signature, source_signature,\nkind, file_path, line_number, project_name, is_external\n```\n\nIndexed on: `workspace`, `source_chunk_id`, `target_chunk_id`, `target_signature`, `kind`.\n\n## MCP / AI Assistant Integration\n\nCodeRag ships an **MCP (Model Context Protocol) server** as an npm package. It exposes the following tools to any MCP-compatible AI assistant (Copilot, Claude, Cursor, etc.):\n\n| Tool | Description |\n|------|-------------|\n| `coderag_list_workspaces` | List all indexed workspaces and their chunk/edge counts. Call this first to discover workspace names. |\n| `coderag_bulk_query` | Run 1–10 hybrid searches in parallel (vector + lexical + symbol, RRF-fused). Returns LLM-ready text blocks including call-graph neighbors and external library XML docs. Prefer this over a single query. |\n| `coderag_bulk_file_chunks` | Fetch chunk outlines (all functions, classes, methods) for 1–20 files in parallel. |\n| `coderag_bulk_type_members` | Fetch all members of 1–20 types in parallel. Useful after `coderag_type_implementors` to drill into each implementation. |\n| `coderag_type_implementors` | Find all types that directly implement or inherit a given signature. |\n| `coderag_chunk_edges` | Get incoming and outgoing call-graph edges for a chunk ID. Answers \"who calls this?\" and \"what does this call?\" |\n\n### Install\n\n```bash\nnpm install -g @jayarrowz/mcp-coderag\n```\n\nOr run without installing:\n\n```bash\nnpx @jayarrowz/mcp-coderag\n```\n\n### Configure\n\nThe server connects to the CodeRag dashboard API. Set `CODERAG_URL` to point at your running dashboard (defaults to `http://localhost:5180` or port 7180 via docker):\n\n**VS Code (`settings.json`):**\n```json\n\"mcp\": {\n  \"servers\": {\n    \"coderag\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@jayarrowz/mcp-coderag\"],\n      \"env\": { \"CODERAG_URL\": \"http://localhost:7180\" }\n    }\n  }\n}\n```\n\n**Claude Desktop (`claude_desktop_config.json`):**\n```json\n\"mcpServers\": {\n  \"coderag\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"@jayarrowz/mcp-coderag\"],\n    \"env\": { \"CODERAG_URL\": \"http://localhost:7180\" }\n  }\n}\n```\n\nThe source lives in `src/CodeRag.Mcp/`. See the [npm package](https://www.npmjs.com/package/@jayarrowz/mcp-coderag) for the latest release.\n\n## Notes\n\n- Schema is created via `EnsureCreatedAsync` -- there are no EF migrations. After schema changes, recreate the DB:\n\n  ```bash\n  docker compose down -v\n  docker compose up -d\n  dotnet run --project src/CodeRag.Dashboard\n  ```\n- Embeddings fall back to a deterministic fake vector when no API key is set -- useful for smoke tests, not for real search.\n- `TargetChunkId` on edges may be `null` when the callee was indexed in a different run. The Explorer lazily resolves these at query time and persists the result so subsequent lookups are instant.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayarrowz%2Fcoderag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayarrowz%2Fcoderag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayarrowz%2Fcoderag/lists"}