skills / codeindex-mcp.md
codeindex-mcp is an LM Studio plugin that exposes the upstream Code Index MCP
(a Python package) as a set of MCP tools. The upstream Python repo is cloned at install
time (scripts/setup.cjs) and left untouched, so it stays git pull-able. A thin
TypeScript wrapper (src/) calls each upstream tool over MCP/stdio.
Use this skill whenever you need to index, search, or analyze a codebase / source tree.
skills / codeindex-mcp.md
codeindex-mcp is an LM Studio plugin that exposes the upstream Code Index MCP
(a Python package) as a set of MCP tools. The upstream Python repo is cloned at install
time (scripts/setup.cjs) and left untouched, so it stays git pull-able. A thin
TypeScript wrapper (src/) calls each upstream tool over MCP/stdio.
Use this skill whenever you need to index, search, or analyze a codebase / source tree.
CodeIndex/), which you never edit.0 if you want no truncation.set_project_path β point the backend at the repo you want to work on. DO THIS FIRST.build_deep_index β run once if you plan to use get_file_summary / get_symbol_body.
(Skip it for pure text search; the shallow index is enough.)find_files / search_code_advanced β locate files and code.get_file_content / get_file_summary / get_symbol_body β read the code.refresh_index (shallow, fast) or build_deep_index
(deep, slower).All tool names match the upstream Code Index MCP exactly. Args are listed in order.
| Tool | Arguments | Purpose |
|---|---|---|
set_project_path | path (string, required) | Set the base project path for indexing. Call this FIRST. |
refresh_index | β | Rebuild the shallow file index after changes / git operations. |
build_deep_index | max_workers (int, optional), timeout (int, optional) | Build the full symbol index for deep analysis. Tune max_workers for large codebases. |
get_settings_info | β | Show current project config & indexed state (temp/settings dirs, writable, file count). |
| Tool | Arguments | Purpose |
|---|---|---|
find_files | pattern (string, required) | Find files by glob pattern (**/*.py, src/**/*, README.md). Default 10 results. |
search_code_advanced | pattern (req), case_sensitive (bool, default true), context_lines (int, default 0), file_pattern (glob opt), fuzzy (bool, default false), regex (bool, optional), start_index (int, default 0), max_results (int, optional) | Smart code search. Literal by default; set regex=true for regex and fuzzy=true for fuzzy matching. Paginated. |
get_file_summary | file_path (string, required) | File structure: line count, functions/classes, imports, complexity. Needs the deep index. |
| Tool | Arguments | Purpose |
|---|---|---|
get_file_content | file_path (string, required) | Raw text content of a file (the files://{file_path} resource). |
get_symbol_body | file_path (required), symbol_name (required, e.g. process_data or MyClass.my_method) | Source body of one symbol (function/method/class) without loading the whole file. Needs the deep index. |
| Tool | Arguments | Purpose |
|---|---|---|
get_file_watcher_status | β | Check file-watcher status & statistics (active/inactive, debounce). |
configure_file_watcher | enabled (bool/null/opt), debounce_seconds (float, opt), additional_exclude_patterns (list, opt), observer_type ("auto"/"kqueue"/"fsevents"/"polling", opt) | Enable/disable auto-refresh and configure the watcher. |
| Tool | Arguments | Purpose |
|---|---|---|
create_temp_directory | β | Create the storage directory for index data. |
check_temp_directory | β | Verify the index storage location & permissions. |
clear_settings | β | Reset all cached settings, index, and cache. (Then re-run set_project_path + build_deep_index.) |
refresh_search_tools | β | Re-detect available search tools (ugrep/ripgrep/ag/grep). Call if search returns zero results unexpectedly. |
set_project_path first. Every tool assumes the backend already knows the
project path. If you are unsure, check get_settings_info (it reports base_path).search_code_advanced / find_files with the shallow index for
speed. Call build_deep_index once before get_file_summary, get_symbol_body, or any
symbol-level work. If a summary says it "needs deep index", run build_deep_index first.fuzzy=true β tolerant matching (e.g. authUser matches authenticateUser).regex=true β regex; needs a native search tool (ugrep/ripgrep). If none is available,
run refresh_search_tools and install one, or fall back to literal/fuzzy.search_code_advanced returns up to max_results (server default 10). Use
start_index to page forward and max_results to fetch more.get_file_summary for a quick overview, get_symbol_body for a
single function/class, and get_file_content when you need the entire file verbatim.refresh_index. Or enable configure_file_watcher
with enabled=true for automatic refresh while you work.refresh_search_tools; if no native tool exists, fall back to
literal/fuzzy or tell the user a search binary is missing.set_project_path fails β check the path is accessible; run clear_settings then retry.configure_file_watcher(enabled=true) + refresh_index.CodeIndex/ β it is the upstream repo and must stay
It is the upstream repo and must stay git pull-able. This plugin only wraps it.User: "Let's work in /home/sensei/works/my-react-app."
set_project_path(path="/home/sensei/works/my-react-app")build_deep_index() if you expect to summarize files or symbols.find_files(pattern="**/*.tsx") to list all React components.get_settings_info() to confirm the index loaded and see the file count.User: "Find every place that calls
authenticateUser."
search_code_advanced(pattern="authenticateUser", case_sensitive=true, context_lines=3, max_results=30)search_code_advanced(pattern="authUser", fuzzy=true, max_results=20)*Data call with a regex in Python files only:
search_code_advanced(pattern="get.*Data", regex=true, file_pattern="*.py", context_lines=2)User: "Explain what src/api/userService.ts does and how it's structured."
get_file_summary(file_path="src/api/userService.ts") β shows functions, classes, imports, complexity.
(If it needs the deep index, run build_deep_index() first, then retry.)get_symbol_body(file_path="src/api/userService.ts", symbol_name="getUser")get_file_content(file_path="src/api/userService.ts")User: "I'm renaming
process_data. Where is it used?"
search_code_advanced(pattern="process_data", context_lines=2, max_results=50) to find every reference.get_symbol_body(file_path="<the file>", symbol_name="process_data") to read its signature/docstring/callers.refresh_index() (or rely on the enabled watcher) so the index stays current.User: "Show me the main components of this project."
set_project_path(path="...") then `find_files(pattern="**/*.{ts,tsx,js,jsx}") to enumerate source files.search_code_advanced(pattern="export", file_pattern="*.tsx", fuzzy=false, max_results=20) to spot public entry points.get_file_summary() on the top-level components to summarize each.User: "I just added new components; refresh the index."
refresh_index().configure_file_watcher(enabled=true, debounce_seconds=6) so future changes auto-refresh.clear_settings() (then re-run set_project_path + build_deep_index).| You want to⦠| Use this tool |
|---|---|
| Point at a repo / start | set_project_path |
| List files by name or glob | find_files |
| Find code/text inside files | search_code_advanced |
| Summarize a file's structure | get_file_summary (needs deep index) |
| Read one function/class body | get_symbol_body (needs deep index) |
| Read a whole file verbatim | get_file_content |
| Rebuild the index after changes | refresh_index / build_deep_index |
| Auto-refresh on file changes | configure_file_watcher |
| Check status / troubleshoot | get_settings_info, get_file_watcher_status, refresh_search_tools, check_temp_directory |
| Reset everything | clear_settings |
CodeIndex/), which you never edit.0 if you want no truncation.set_project_path β point the backend at the repo you want to work on. DO THIS FIRST.build_deep_index β run once if you plan to use get_file_summary / get_symbol_body.
(Skip it for pure text search; the shallow index is enough.)find_files / search_code_advanced β locate files and code.get_file_content / get_file_summary / get_symbol_body β read the code.refresh_index (shallow, fast) or build_deep_index
(deep, slower).All tool names match the upstream Code Index MCP exactly. Args are listed in order.
| Tool | Arguments | Purpose |
|---|---|---|
set_project_path | path (string, required) | Set the base project path for indexing. Call this FIRST. |
refresh_index | β | Rebuild the shallow file index after changes / git operations. |
build_deep_index | max_workers (int, optional), timeout (int, optional) | Build the full symbol index for deep analysis. Tune max_workers for large codebases. |
get_settings_info | β | Show current project config & indexed state (temp/settings dirs, writable, file count). |
| Tool | Arguments | Purpose |
|---|---|---|
find_files | pattern (string, required) | Find files by glob pattern (**/*.py, src/**/*, README.md). Default 10 results. |
search_code_advanced | pattern (req), case_sensitive (bool, default true), context_lines (int, default 0), file_pattern (glob opt), fuzzy (bool, default false), regex (bool, optional), start_index (int, default 0), max_results (int, optional) | Smart code search. Literal by default; set regex=true for regex and fuzzy=true for fuzzy matching. Paginated. |
get_file_summary | file_path (string, required) | File structure: line count, functions/classes, imports, complexity. Needs the deep index. |
| Tool | Arguments | Purpose |
|---|---|---|
get_file_content | file_path (string, required) | Raw text content of a file (the files://{file_path} resource). |
get_symbol_body | file_path (required), symbol_name (required, e.g. process_data or MyClass.my_method) | Source body of one symbol (function/method/class) without loading the whole file. Needs the deep index. |
| Tool | Arguments | Purpose |
|---|---|---|
get_file_watcher_status | β | Check file-watcher status & statistics (active/inactive, debounce). |
configure_file_watcher | enabled (bool/null/opt), debounce_seconds (float, opt), additional_exclude_patterns (list, opt), observer_type ("auto"/"kqueue"/"fsevents"/"polling", opt) | Enable/disable auto-refresh and configure the watcher. |
| Tool | Arguments | Purpose |
|---|---|---|
create_temp_directory | β | Create the storage directory for index data. |
check_temp_directory | β | Verify the index storage location & permissions. |
clear_settings | β | Reset all cached settings, index, and cache. (Then re-run set_project_path + build_deep_index.) |
refresh_search_tools | β | Re-detect available search tools (ugrep/ripgrep/ag/grep). Call if search returns zero results unexpectedly. |
set_project_path first. Every tool assumes the backend already knows the
project path. If you are unsure, check get_settings_info (it reports base_path).search_code_advanced / find_files with the shallow index for
speed. Call build_deep_index once before get_file_summary, get_symbol_body, or any
symbol-level work. If a summary says it "needs deep index", run build_deep_index first.fuzzy=true β tolerant matching (e.g. authUser matches authenticateUser).regex=true β regex; needs a native search tool (ugrep/ripgrep). If none is available,
run refresh_search_tools and install one, or fall back to literal/fuzzy.search_code_advanced returns up to max_results (server default 10). Use
start_index to page forward and max_results to fetch more.get_file_summary for a quick overview, get_symbol_body for a
single function/class, and get_file_content when you need the entire file verbatim.refresh_index. Or enable configure_file_watcher
with enabled=true for automatic refresh while you work.refresh_search_tools; if no native tool exists, fall back to
literal/fuzzy or tell the user a search binary is missing.set_project_path fails β check the path is accessible; run clear_settings then retry.configure_file_watcher(enabled=true) + refresh_index.CodeIndex/ β it is the upstream repo and must stay
It is the upstream repo and must stay git pull-able. This plugin only wraps it.User: "Let's work in /home/sensei/works/my-react-app."
set_project_path(path="/home/sensei/works/my-react-app")build_deep_index() if you expect to summarize files or symbols.find_files(pattern="**/*.tsx") to list all React components.get_settings_info() to confirm the index loaded and see the file count.User: "Find every place that calls
authenticateUser."
search_code_advanced(pattern="authenticateUser", case_sensitive=true, context_lines=3, max_results=30)search_code_advanced(pattern="authUser", fuzzy=true, max_results=20)*Data call with a regex in Python files only:
search_code_advanced(pattern="get.*Data", regex=true, file_pattern="*.py", context_lines=2)User: "Explain what src/api/userService.ts does and how it's structured."
get_file_summary(file_path="src/api/userService.ts") β shows functions, classes, imports, complexity.
(If it needs the deep index, run build_deep_index() first, then retry.)get_symbol_body(file_path="src/api/userService.ts", symbol_name="getUser")get_file_content(file_path="src/api/userService.ts")User: "I'm renaming
process_data. Where is it used?"
search_code_advanced(pattern="process_data", context_lines=2, max_results=50) to find every reference.get_symbol_body(file_path="<the file>", symbol_name="process_data") to read its signature/docstring/callers.refresh_index() (or rely on the enabled watcher) so the index stays current.User: "Show me the main components of this project."
set_project_path(path="...") then `find_files(pattern="**/*.{ts,tsx,js,jsx}") to enumerate source files.search_code_advanced(pattern="export", file_pattern="*.tsx", fuzzy=false, max_results=20) to spot public entry points.get_file_summary() on the top-level components to summarize each.User: "I just added new components; refresh the index."
refresh_index().configure_file_watcher(enabled=true, debounce_seconds=6) so future changes auto-refresh.clear_settings() (then re-run set_project_path + build_deep_index).| You want to⦠| Use this tool |
|---|---|
| Point at a repo / start | set_project_path |
| List files by name or glob | find_files |
| Find code/text inside files | search_code_advanced |
| Summarize a file's structure | get_file_summary (needs deep index) |
| Read one function/class body | get_symbol_body (needs deep index) |
| Read a whole file verbatim | get_file_content |
| Rebuild the index after changes | refresh_index / build_deep_index |
| Auto-refresh on file changes | configure_file_watcher |
| Check status / troubleshoot | get_settings_info, get_file_watcher_status, refresh_search_tools, check_temp_directory |
| Reset everything | clear_settings |