codesearch-mcp 0.0.10-alpha → 0.0.12-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js
CHANGED
|
@@ -47,7 +47,7 @@ async function main() {
|
|
|
47
47
|
const isIndex = argv1 === 'rag-index' || process.argv[2] === 'index';
|
|
48
48
|
const isMcp = argv1 === 'rag-mcp' || process.argv[2] === 'mcp';
|
|
49
49
|
const isSetup = argv1 === 'rag-setup' || process.argv[2] === 'setup';
|
|
50
|
-
const isBackfill = argv1 === 'rag-index' && process.argv[2] === 'backfill';
|
|
50
|
+
const isBackfill = (argv1 === 'rag-index' || process.argv[2] === 'backfill') && process.argv[2] === 'backfill';
|
|
51
51
|
const mode = isBackfill ? 'backfill' : isIndex ? 'index' : isMcp ? 'mcp' : isSetup ? 'setup' : (process.argv[2] ?? '');
|
|
52
52
|
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
53
53
|
(0, help_1.printHelp)(argv1 !== 'app.js' ? argv1 : mode);
|
|
@@ -58,6 +58,9 @@ You have access to a local semantic code search server. Use these tools to navig
|
|
|
58
58
|
- **read_file_range** — read a specific line range from any indexed file. Use this to expand context around a search result.
|
|
59
59
|
- **get_dependencies** — show what files a given file imports (direct or transitive). Use to understand what a file depends on.
|
|
60
60
|
- **get_dependents** — show which files import a given file (reverse graph). Use before refactoring to find all callers.
|
|
61
|
+
- **find_symbol** — find where a symbol (function, class, type, interface, variable) is defined by exact name. Faster than semantic search when you know the name.
|
|
62
|
+
- **list_files** — browse the directory tree of a project path. Use to understand project structure before reading files.
|
|
63
|
+
- **read_file** — read a complete file by absolute path with line numbers. Truncates at max_lines with a hint to continue.
|
|
61
64
|
|
|
62
65
|
## Recommended workflow
|
|
63
66
|
|
|
@@ -82,15 +85,9 @@ You have access to a local semantic code search server. Use these tools to navig
|
|
|
82
85
|
|
|
83
86
|
Lower score = better match (cosine distance). Results above the configured threshold are filtered out automatically.
|
|
84
87
|
|
|
85
|
-
## Dependency graph
|
|
86
|
-
|
|
87
|
-
- **get_dependencies** — show what files a given file imports (direct or transitive). Use when you need to understand what a file depends on.
|
|
88
|
-
- **get_dependents** — show which files import a given file (reverse graph). Use before refactoring to find all callers and avoid breaking changes.
|
|
89
|
-
- **find_symbol** — find where a symbol (function, class, type, interface, variable) is defined by exact name. Faster than semantic search when you know the name.
|
|
90
|
-
- **list_files** — browse the directory tree of a project path. Use to understand project structure before reading files.
|
|
91
|
-
- **read_file** — read a complete file by absolute path with line numbers. Truncates at max_lines with a hint to continue.
|
|
88
|
+
## Dependency graph
|
|
92
89
|
|
|
93
|
-
|
|
90
|
+
\`get_dependencies\` and \`get_dependents\` require \`file_path\` (as returned by \`search_codebase\`) and \`project\` (from \`list_projects\`). Pass \`transitive: true\` for the full dependency chain. depType values: \`import\` | \`import-default\` | \`import-namespace\` | \`reexport\` | \`reexport-namespace\`. \`fromSymbol\` — the top-level class or function in the importing file that uses this import (null if ambiguous or not tracked).
|
|
94
91
|
`.trim();
|
|
95
92
|
class McpServer {
|
|
96
93
|
searcher;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
name: codesearch-mcp
|
|
2
|
+
|
|
1
3
|
services:
|
|
2
4
|
db:
|
|
3
5
|
image: pgvector/pgvector:pg17
|
|
@@ -8,7 +10,7 @@ services:
|
|
|
8
10
|
ports:
|
|
9
11
|
- "5433:5432"
|
|
10
12
|
volumes:
|
|
11
|
-
-
|
|
13
|
+
- pgdata:/var/lib/postgresql/data
|
|
12
14
|
|
|
13
15
|
ollama:
|
|
14
16
|
image: ollama/ollama
|
|
@@ -18,4 +20,5 @@ services:
|
|
|
18
20
|
- ollama_data:/root/.ollama
|
|
19
21
|
|
|
20
22
|
volumes:
|
|
23
|
+
pgdata:
|
|
21
24
|
ollama_data:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codesearch-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12-alpha",
|
|
4
4
|
"description": "Local semantic codebase search via MCP — indexes projects into pgvector, exposes search to Claude",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/app.js",
|
|
@@ -21,9 +21,11 @@
|
|
|
21
21
|
"start:mcp": "ts-node app.ts mcp",
|
|
22
22
|
"index:workspace": "ts-node app.ts index",
|
|
23
23
|
"index:reindex": "ts-node app.ts index --reindex",
|
|
24
|
+
"index:backfill": "ts-node app.ts backfill",
|
|
24
25
|
"typecheck": "tsc --noEmit",
|
|
25
26
|
"test": "vitest run",
|
|
26
|
-
"test:watch": "vitest"
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"verify": "tsc --noEmit && vitest run"
|
|
27
29
|
},
|
|
28
30
|
"dependencies": {
|
|
29
31
|
"@inquirer/prompts": "^8.4.1",
|