About Vector Search
Vector Search is an MCP server published by bobmatnyc in the RAG category: cLI-first semantic code search with MCP integration. Modern, fast, and intelligent code search powered by ChromaDB and AST parsing. Conduid read 28 tools from its source: analyze_file, analyze_project, analyze_tests, check_circular_dependencies, code_review, embed_chunks and 22 more. It is published to PyPI as mcp-vector-search and runs with uvx.
The repository has 57 stars and 11 forks, and its last commit was on 21 May 2026. The latest release is v4.1.14 (21 May 2026). It follows v4.1.13 (11 May 2026), and the 5 most recent releases go back to v4.1.3 (8 May 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include rag.
Install
uvx mcp-vector-searchpip install mcp-vector-searchgit clone https://github.com/bobmatnyc/mcp-vector-searchTools (28)
analyze_fileReturns file-level metricsanalyze_projectReturns project-wide metrics summaryanalyze_testsAnalyze test code quality and coverage. Detects public production symbols that lack tests (coverage gaps), test anti-patterns (no_assertion, empty_body, excessive_mocking, test_calls_test), and optionally builds a pytest fixture-to-consumers map. Python AST-based; safe to run on any directory.check_circular_dependenciesReturns circular dependency cyclescode_reviewLocal code review for substantial changes before pushing. **What it does:** - Reviews staged changes (git diff --staged) using full codebase context - Only analyzes substantial commits (research-backed thresholds) - Uses vector search to find similar patterns and related code - Uses knowledge graph to identify impact and dependencies - Provides actionable feedback before pushing changes - Prevents issues from reaching PR stage **Substantial commit criteria (research-backed):** - More than 20 lines changed across all files - More than 2 files modified - New functions or classes added - Security-sensitive areas modified (auth, database, validation) - Architecture changes (imports, inheritance, interfaces) **Review focus:** - Security vulnerabilities (SQL injection, XSS, auth issues) - Code quality (error handling, input validation, edge cases) - Performance issues (N+1 queries, inefficient algorithms) - Architecture violations (coupling, separation of concerns) - Style consistency with existing codebase patterns - Test coverage for modified functionality **Example usage:** {} # Review all staged changes {"include_trivial": true} # Include trivial changes {"focus": "security"} # Focus on security issues {"max_files": 10} # Limit number of files to review **Example response:** { "status": "success", "is_substantial": true, "summary": "Found 1 security issue and 2 style improvements", "verdict": "blocking_issues", "changes_summary": { "files_changed": 3, "lines_added": 45, "lines_deleted": 12, "functions_added": 2, "functions_modified": 1 }, "findings": [ { "file_path": "src/auth.py", "line_number": 42, "title": "SQL injection vulnerability", "description": "User input concatenated directly into SQL query", "severity": "critical", "category": "security", "recommendation": "Use parameterized queries or an ORM", "code_suggestion": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))", "is_blocking": true } ], "blocking_issues": 1, "warnings": 1, "suggestions": 2, "push_recommendation": "Fix critical issues before pushing" } **Non-substantial commits:** { "status": "success", "is_substantial": false, "summary": "Changes are trivial - safe to push", "changes_summary": { "files_changed": 1, "lines_added": 5, "lines_deleted": 2 }, "push_recommendation": "Safe to push" }embed_chunksGenerate embeddings for indexed code chunks. Only embeds chunks that haven't been embedded yet (incremental). Use fresh=true to re-embed everything. Run index_project first to chunk files, then embed_chunks to generate embeddings.find_smellsIdentify code quality issues, anti-patterns, bad practices, and technical debt. Detects Long Methods, Deep Nesting, Long Parameter Lists, God Classes, and Complex Methods. Use when assessing code quality, finding refactoring opportunities, or identifying maintainability issues.get_complexity_hotspotsReturns top N most complex functionsget_project_statusGet project indexing status and statisticsindex_projectIndex or reindex the project codebase. IMPORTANT: Always call get_project_status first to check if an index already exists. Only call this tool if: (1) No index exists (total_chunks: 0), OR (2) User explicitly requests reindexing with force=true. This operation can take 2-5 minutes for large projects.interpret_analysisInterpret analysis results with natural language explanations and recommendationskg_buildBuild or rebuild the Knowledge Graph from indexed code. **What it does:** - Extracts code entities (functions, classes, modules) and relationships (calls, imports, inheritance) - Creates documentation-to-code mappings (DOCUMENTS, REFERENCES) - Extracts authorship from git history (AUTHORED, PART_OF) - Builds queryable graph for code navigation and exploration **When to use:** - After initial project indexing - After significant code changes - When KG queries return empty results - To refresh relationships after refactoring **Performance:** - ~2-3 minutes for 10K files (batch optimized) - Use skip_documents for faster builds (25-30% faster) - Progress tracking available via CLI **Example usage:** {"force": false} # Build only if not exists {"force": true} # Force rebuild {"force": true, "skip_documents": true} # Fast rebuild {"limit": 100} # Test with 100 chunks **Example response:** { "status": "success", "statistics": { "entities": 3243, "relationships": { "calls": 3944, "imports": 3243, "inherits": 289, "contains": 5821 } } }kg_callers_at_commitFind what called a function as of a given git commit. Returns CALLS edges whose calling entity's stored commit_sha is an ancestor of (or equal to) the specified commit. Requires knowledge graph to be built first (mvs kg build). V1 note: reflects the most recent commit per file at kg_build time.kg_historyGet the recorded commit history for a named entity in the knowledge graph. Returns the commit SHA(s) stored at last kg_build time for the entity. V1 note: reflects the most recent commit per file at kg_build time, not the full git log.kg_iaBrowse the document Information Architecture (IA) tree. Shows documents organized into thematic groups (Orientation, Guides & Tutorials, Architecture & Design, API Reference, Operations, Lifecycle, Testing). Each group lists its documents with file path, title, doc_category, and word count.kg_ontologyBrowse the document ontology tree showing documents grouped by category with sections, tags, and cross-references. **What it does:** - Returns all Document nodes from the knowledge graph organised by doc_category - Includes section headings (level, line number) for each document - Shows cross-references between documents (RELATED_TO edges) - Shows tags aggregated per document (via DocSection HAS_TAG) **Document categories:** - readme: Top-level README files - guide: How-to guides, tutorials, usage docs - api_doc: API reference documentation - design: Design documents, architecture docs - spec: Specifications and requirements - research: Research notes, investigation documents - changelog: CHANGELOG files, release notes - other: Everything else **Example usage:** {} # Browse all documents {"category": "guide"} # Only guide documents {"category": "readme"} # Only README files **Example response:** { "status": "success", "ontology": { "categories": { "readme": [ { "id": "doc:README.md", "file_path": "README.md", "title": "MCP Vector Search", "word_count": 2450, "section_count": 8, "sections": [ {"name": "Installation", "level": 2, "line": 45}, {"name": "Usage", "level": 2, "line": 67} ], "cross_references": [ {"file_path": "docs/ci-cd-quickstart.md", "title": "CI/CD Quickstart"} ], "tags": ["semantic-search", "mcp", "vector-database"] } ] }, "total_documents": 42, "total_sections": 187, "total_cross_references": 15 } }kg_queryQuery entity relationships in the Knowledge Graph. **What it does:** - Finds entities related to a given entity - Supports filtering by relationship type - Returns relationship metadata and paths - Traverses graph within specified hops - Supports tag-based document lookup (see Tag queries below) **Relationship types:** - **calls**: Functions called BY this entity - **called_by**: Functions that CALL this entity - **imports**: Modules imported BY this entity - **imported_by**: Modules that IMPORT this entity - **inherits**: Classes this entity INHERITS FROM (parents) - **inherited_by**: Classes that INHERIT FROM this entity (children) - **contains**: Entities CONTAINED BY this entity (module contains functions) - **contained_by**: Entities that CONTAIN this entity **Tag queries — find documents by tag:** Use the "tag:" prefix in the entity field to search by frontmatter tag instead of by entity name. Comma-separated tags perform an AND query (all tags must match). Alternatively, pass query_type="tag" and use the entity field as the tag value. - Single tag: {"entity": "tag:python"} - AND query: {"entity": "tag:python,async"} - Explicit: {"entity": "async", "query_type": "tag"} **Query patterns:** 1. **Call graph discovery**: Find all functions a method calls 2. **Impact analysis**: Find what calls a function (callers) 3. **Inheritance hierarchy**: Find parent/child classes 4. **Module structure**: Find what a module contains 5. **Dependency analysis**: Find import relationships 6. **General exploration**: Find all related entities (no relationship filter) 7. **Tag search**: Find documentation sections by frontmatter tag **Example queries:** 1. Find all functions called by search_code: {"entity": "search_code", "relationship": "calls"} 2. Find what calls search_code (impact analysis): {"entity": "search_code", "relationship": "called_by"} 3. Find parent classes of VectorDatabase: {"entity": "VectorDatabase", "relationship": "inherits"} 4. Find child classes of BaseModel: {"entity": "BaseModel", "relationship": "inherited_by"} 5. Find all related entities (no filter): {"entity": "SemanticSearchEngine"} 6. Limit results: {"entity": "search", "relationship": "calls", "limit": 10} 7. Find docs tagged "performance": {"entity": "tag:performance"} 8. Find docs tagged both "python" and "async": {"entity": "tag:python,async"} **Example response (entity query):** { "status": "success", "query": { "entity": "search_code", "relationship": "calls" }, "results": [ { "name": "_embed_query", "type": "function", "direction": "calls", "file_path": "src/core/search.py" } ], "count": 1 } **Example response (tag query):** { "status": "success", "query": { "type": "tag", "tags": ["performance"] }, "results": [ { "file_path": "docs/performance-guide.md", "title": "Performance Guide", "section_id": "doc:abc123:10" } ], "count": 1 } **Empty results:** { "status": "success", "query": {"entity": "unknown_function"}, "results": [], "message": "No related entities found for 'unknown_function'" }kg_statsGet Knowledge Graph statistics and health. **What it returns:** - Entity counts: code entities, doc sections, tags, persons, projects - Relationship counts: calls, imports, inherits, contains, documents, authored, etc. - Database size and location - Health status indicators **When to use:** - Check if KG is built and populated - Verify KG health after indexing - Monitor KG size for large repos - Validate before running queries - Troubleshoot KG issues **Example usage:** {} # No parameters required **Example response:** { "status": "success", "statistics": { "total_entities": 15609, "code_entities": 3243, "doc_sections": 10483, "tags": 1060, "persons": 4, "projects": 1, "database_path": "/path/.mcp-vector-search/knowledge_graph/kg.db", "relationships": { "calls": 3944, "imports": 3243, "inherits": 289, "contains": 5821, "documents": 2864, "authored": 1276 } } }review_pull_requestReview a pull request/merge request using full codebase context. **What it does:** - Analyzes code changes between two git refs (branches, commits, tags) - Uses vector search to find related code (callers, similar patterns, dependencies) - Uses knowledge graph to identify impact and relationships - Applies customizable review instructions from user config - Returns structured, actionable comments with severity levels **Key Features:** - **Context-Aware**: For each changed file, finds callers, similar code, tests, dependencies - **Customizable**: Applies user-defined review standards from .mcp-vector-search/review-instructions.yaml - **Structured Output**: Returns inline comments (file + line) and overall PR comments - **Severity Levels**: critical, high, medium, low, info with blocking semantics - **Verdict**: approve, request_changes, or comment based on findings **Review Focus:** - Security vulnerabilities (SQL injection, XSS, hardcoded secrets) - Code quality (error handling, input validation, test coverage) - Style consistency with similar codebase patterns - Architecture issues (coupling, separation of concerns) - Performance problems (N+1 queries, inefficient algorithms) **Example usage:** {"base_ref": "main", "head_ref": "HEAD"} # Review current changes vs main {"base_ref": "develop", "head_ref": "feature-branch"} # Review feature branch {"base_ref": "abc123", "head_ref": "def456"} # Review specific commits {"base_ref": "main", "head_ref": "HEAD", "custom_instructions": "..."} # Custom rules **Example response:** { "status": "success", "summary": "Found 2 security issues and 3 style improvements", "verdict": "request_changes", "overall_score": 0.65, "comments": [ { "file_path": "src/auth.py", "line_number": 42, "comment": "SQL injection vulnerability: use parameterized queries", "severity": "critical", "category": "security", "suggestion": "cursor.execute('SELECT * FROM users WHERE id = ?', (user_id,))", "is_blocking": true }, { "file_path": null, "line_number": null, "comment": "Consider adding integration tests for auth flow", "severity": "info", "category": "quality", "suggestion": null, "is_blocking": false } ], "blocking_issues": 2, "warnings": 0, "suggestions": 3, "context_files_used": 15, "kg_relationships_used": 8 }review_repositoryRun an AI-powered code review on the indexed codebase using vector search and LLM analysis. **What it does:** - Performs specialized code reviews (security, architecture, performance) - Uses targeted vector search queries to find relevant code - Analyzes code with LLM to identify issues and provide recommendations - Returns structured findings with severity levels, categories, and recommendations **Review types:** - **security**: Finds vulnerabilities (SQL injection, XSS, authentication issues, etc.) - **architecture**: Identifies design issues (tight coupling, missing abstractions, etc.) - **performance**: Detects performance problems (N+1 queries, inefficient algorithms, etc.) **Output format:** Returns structured findings with: - title: Brief description of the issue - description: Detailed explanation - severity: critical, high, medium, low, info - file_path: Location of the issue - start_line/end_line: Precise location in file - category: Issue category (e.g., "SQL Injection", "Tight Coupling") - recommendation: How to fix the issue - confidence: Confidence score (0.0-1.0) - cwe_id: Common Weakness Enumeration ID (for security issues) **Example usage:** {"review_type": "security"} # Review entire codebase for security issues {"review_type": "architecture", "scope": "src/auth"} # Review auth module {"review_type": "performance", "max_chunks": 50} # Analyze more code {"review_type": "security", "changed_only": true} # Only review changed files **Example response:** { "status": "success", "review_type": "security", "scope": "entire project", "findings": [ { "title": "SQL Injection Vulnerability", "description": "User input is concatenated directly into SQL query", "severity": "critical", "file_path": "src/db/users.py", "start_line": 42, "end_line": 45, "category": "SQL Injection", "recommendation": "Use parameterized queries or an ORM", "confidence": 0.95, "cwe_id": "CWE-89" } ], "summary": "Found 1 security issue(s):\n - CRITICAL: 1", "context_chunks_used": 25, "kg_relationships_used": 12, "model_used": "claude-3-5-sonnet-20241022", "duration_seconds": 8.3 }save_reportSave analysis or search results as a markdown file for documentationsearch_codeSearch codebase using natural language queries (text-to-code search). Use when you know what functionality you're looking for but not where it's implemented. Example: 'authentication middleware' or 'database connection pooling' to find relevant code.search_contextSearch for code using rich contextual descriptions with optional focus areas. Use when you need broader context around specific concerns. Example: 'code handling user sessions' with focus_areas=['security', 'authentication'] to find session management with security emphasis.search_hybridHybrid search that fuses semantic (vector), full-text (BM25), and knowledge-graph (KG) strategies in parallel using Reciprocal Rank Fusion (RRF). Returns a single ranked list that benefits from the complementary strengths of all three strategies. Use when you want the most comprehensive search results, or when standard search_code misses expected results.search_similarFind code snippets similar to a specific file or function (code-to-code similarity). Use when looking for duplicate code, similar patterns, or related implementations. Example: 'Find functions similar to auth_handler.py' to discover related authentication code.story_generateGenerate a development narrative from git history enriched with semantic code analysis. Produces a StoryIndex JSON artifact with extraction data, semantic analysis, and optional LLM-generated narrative.trace_execution_flowTrace the call chain from a function entry point through the codebase. Shows what a function calls, and what calls it, up to N hops deep. Requires knowledge graph to be built first (mvs index kg). Uses the CALLS relationship graph built from source code analysis.wiki_generateGenerate codebase wiki/ontology showing hierarchical concept organization with LLM-powered semantic groupingSecurity checks
Static checks derived from the repository a month ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 5.3K words.
- ✓License declaredUsable under a stated license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedA lockfile pins dependency versions.
- !No dynamic code executionScanned 254 source files and found 4 calls to eval or shell execution, in src/mcp_vector_search/analysis/review/language_profiles.py among others. Review how tool inputs reach them before granting credentials.
1 check has not been run yet.
Releases
README
The repository's README runs to about 5.3K words, fetched a month ago. The original in the repository is authoritative.
Read full README