mcp-vector-search 0.0.3__py3-none-any.whl
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.
Potentially problematic release.
This version of mcp-vector-search might be problematic. Click here for more details.
- mcp_vector_search/__init__.py +9 -0
- mcp_vector_search/cli/__init__.py +1 -0
- mcp_vector_search/cli/commands/__init__.py +1 -0
- mcp_vector_search/cli/commands/config.py +303 -0
- mcp_vector_search/cli/commands/index.py +304 -0
- mcp_vector_search/cli/commands/init.py +212 -0
- mcp_vector_search/cli/commands/search.py +395 -0
- mcp_vector_search/cli/commands/status.py +340 -0
- mcp_vector_search/cli/commands/watch.py +288 -0
- mcp_vector_search/cli/main.py +117 -0
- mcp_vector_search/cli/output.py +242 -0
- mcp_vector_search/config/__init__.py +1 -0
- mcp_vector_search/config/defaults.py +175 -0
- mcp_vector_search/config/settings.py +108 -0
- mcp_vector_search/core/__init__.py +1 -0
- mcp_vector_search/core/database.py +431 -0
- mcp_vector_search/core/embeddings.py +250 -0
- mcp_vector_search/core/exceptions.py +66 -0
- mcp_vector_search/core/indexer.py +310 -0
- mcp_vector_search/core/models.py +174 -0
- mcp_vector_search/core/project.py +304 -0
- mcp_vector_search/core/search.py +324 -0
- mcp_vector_search/core/watcher.py +320 -0
- mcp_vector_search/mcp/__init__.py +1 -0
- mcp_vector_search/parsers/__init__.py +1 -0
- mcp_vector_search/parsers/base.py +180 -0
- mcp_vector_search/parsers/javascript.py +238 -0
- mcp_vector_search/parsers/python.py +407 -0
- mcp_vector_search/parsers/registry.py +187 -0
- mcp_vector_search/py.typed +1 -0
- mcp_vector_search-0.0.3.dist-info/METADATA +333 -0
- mcp_vector_search-0.0.3.dist-info/RECORD +35 -0
- mcp_vector_search-0.0.3.dist-info/WHEEL +4 -0
- mcp_vector_search-0.0.3.dist-info/entry_points.txt +2 -0
- mcp_vector_search-0.0.3.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"""Parser registry for MCP Vector Search."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import Dict, List, Optional
|
|
5
|
+
|
|
6
|
+
from loguru import logger
|
|
7
|
+
|
|
8
|
+
from .base import BaseParser, FallbackParser
|
|
9
|
+
from .python import PythonParser
|
|
10
|
+
from .javascript import JavaScriptParser, TypeScriptParser
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ParserRegistry:
|
|
14
|
+
"""Registry for managing language parsers."""
|
|
15
|
+
|
|
16
|
+
def __init__(self) -> None:
|
|
17
|
+
"""Initialize parser registry."""
|
|
18
|
+
self._parsers: Dict[str, BaseParser] = {}
|
|
19
|
+
self._extension_map: Dict[str, str] = {}
|
|
20
|
+
self._fallback_parser = FallbackParser()
|
|
21
|
+
self._register_default_parsers()
|
|
22
|
+
|
|
23
|
+
def _register_default_parsers(self) -> None:
|
|
24
|
+
"""Register default parsers for supported languages."""
|
|
25
|
+
# Register Python parser
|
|
26
|
+
python_parser = PythonParser()
|
|
27
|
+
self.register_parser("python", python_parser)
|
|
28
|
+
|
|
29
|
+
# Register JavaScript parser
|
|
30
|
+
javascript_parser = JavaScriptParser()
|
|
31
|
+
self.register_parser("javascript", javascript_parser)
|
|
32
|
+
|
|
33
|
+
# Register TypeScript parser
|
|
34
|
+
typescript_parser = TypeScriptParser()
|
|
35
|
+
self.register_parser("typescript", typescript_parser)
|
|
36
|
+
|
|
37
|
+
def register_parser(self, language: str, parser: BaseParser) -> None:
|
|
38
|
+
"""Register a parser for a specific language.
|
|
39
|
+
|
|
40
|
+
Args:
|
|
41
|
+
language: Language name
|
|
42
|
+
parser: Parser instance
|
|
43
|
+
"""
|
|
44
|
+
self._parsers[language] = parser
|
|
45
|
+
|
|
46
|
+
# Map file extensions to language
|
|
47
|
+
for ext in parser.get_supported_extensions():
|
|
48
|
+
if ext != "*": # Skip fallback marker
|
|
49
|
+
self._extension_map[ext.lower()] = language
|
|
50
|
+
|
|
51
|
+
logger.debug(f"Registered parser for {language}: {parser.__class__.__name__}")
|
|
52
|
+
|
|
53
|
+
def get_parser(self, file_extension: str) -> BaseParser:
|
|
54
|
+
"""Get parser for a file extension.
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
file_extension: File extension (including dot)
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
Parser instance (fallback parser if no specific parser found)
|
|
61
|
+
"""
|
|
62
|
+
language = self._extension_map.get(file_extension.lower())
|
|
63
|
+
if language and language in self._parsers:
|
|
64
|
+
return self._parsers[language]
|
|
65
|
+
|
|
66
|
+
# Return fallback parser for unsupported extensions
|
|
67
|
+
return self._fallback_parser
|
|
68
|
+
|
|
69
|
+
def get_parser_for_file(self, file_path: Path) -> BaseParser:
|
|
70
|
+
"""Get parser for a specific file.
|
|
71
|
+
|
|
72
|
+
Args:
|
|
73
|
+
file_path: Path to the file
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Parser instance
|
|
77
|
+
"""
|
|
78
|
+
return self.get_parser(file_path.suffix)
|
|
79
|
+
|
|
80
|
+
def get_supported_languages(self) -> List[str]:
|
|
81
|
+
"""Get list of supported languages.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
List of language names
|
|
85
|
+
"""
|
|
86
|
+
return list(self._parsers.keys())
|
|
87
|
+
|
|
88
|
+
def get_supported_extensions(self) -> List[str]:
|
|
89
|
+
"""Get list of supported file extensions.
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
List of file extensions
|
|
93
|
+
"""
|
|
94
|
+
return list(self._extension_map.keys())
|
|
95
|
+
|
|
96
|
+
def is_supported(self, file_extension: str) -> bool:
|
|
97
|
+
"""Check if a file extension is supported.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
file_extension: File extension to check
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
True if supported (always True due to fallback parser)
|
|
104
|
+
"""
|
|
105
|
+
return True # Always supported due to fallback parser
|
|
106
|
+
|
|
107
|
+
def get_language_for_extension(self, file_extension: str) -> str:
|
|
108
|
+
"""Get language name for a file extension.
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
file_extension: File extension
|
|
112
|
+
|
|
113
|
+
Returns:
|
|
114
|
+
Language name (or "text" for unsupported extensions)
|
|
115
|
+
"""
|
|
116
|
+
return self._extension_map.get(file_extension.lower(), "text")
|
|
117
|
+
|
|
118
|
+
def get_parser_info(self) -> Dict[str, Dict[str, any]]:
|
|
119
|
+
"""Get information about registered parsers.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
Dictionary with parser information
|
|
123
|
+
"""
|
|
124
|
+
info = {}
|
|
125
|
+
|
|
126
|
+
for language, parser in self._parsers.items():
|
|
127
|
+
info[language] = {
|
|
128
|
+
"class": parser.__class__.__name__,
|
|
129
|
+
"extensions": parser.get_supported_extensions(),
|
|
130
|
+
"language": parser.language,
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
# Add fallback parser info
|
|
134
|
+
info["fallback"] = {
|
|
135
|
+
"class": self._fallback_parser.__class__.__name__,
|
|
136
|
+
"extensions": ["*"],
|
|
137
|
+
"language": self._fallback_parser.language,
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return info
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# Global parser registry instance
|
|
144
|
+
_registry = ParserRegistry()
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def get_parser_registry() -> ParserRegistry:
|
|
148
|
+
"""Get the global parser registry instance.
|
|
149
|
+
|
|
150
|
+
Returns:
|
|
151
|
+
Parser registry instance
|
|
152
|
+
"""
|
|
153
|
+
return _registry
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def register_parser(language: str, parser: BaseParser) -> None:
|
|
157
|
+
"""Register a parser in the global registry.
|
|
158
|
+
|
|
159
|
+
Args:
|
|
160
|
+
language: Language name
|
|
161
|
+
parser: Parser instance
|
|
162
|
+
"""
|
|
163
|
+
_registry.register_parser(language, parser)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def get_parser(file_extension: str) -> BaseParser:
|
|
167
|
+
"""Get parser for a file extension from the global registry.
|
|
168
|
+
|
|
169
|
+
Args:
|
|
170
|
+
file_extension: File extension
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
Parser instance
|
|
174
|
+
"""
|
|
175
|
+
return _registry.get_parser(file_extension)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def get_parser_for_file(file_path: Path) -> BaseParser:
|
|
179
|
+
"""Get parser for a file from the global registry.
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
file_path: File path
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
Parser instance
|
|
186
|
+
"""
|
|
187
|
+
return _registry.get_parser_for_file(file_path)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# PEP 561 marker file for type information
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcp-vector-search
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: CLI-first semantic code search with MCP integration
|
|
5
|
+
Project-URL: Homepage, https://github.com/bobmatnyc/mcp-vector-search
|
|
6
|
+
Project-URL: Documentation, https://mcp-vector-search.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/bobmatnyc/mcp-vector-search
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/bobmatnyc/mcp-vector-search/issues
|
|
9
|
+
Author-email: Robert Matsuoka <bobmatnyc@gmail.com>
|
|
10
|
+
License: MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2024 Robert Matsuoka
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
Keywords: code-search,mcp,semantic-search,vector-database
|
|
33
|
+
Classifier: Development Status :: 3 - Alpha
|
|
34
|
+
Classifier: Intended Audience :: Developers
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
38
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
39
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
40
|
+
Requires-Python: >=3.11
|
|
41
|
+
Requires-Dist: aiofiles>=23.0.0
|
|
42
|
+
Requires-Dist: chromadb>=0.5.0
|
|
43
|
+
Requires-Dist: httpx>=0.25.0
|
|
44
|
+
Requires-Dist: loguru>=0.7.0
|
|
45
|
+
Requires-Dist: pydantic-settings>=2.1.0
|
|
46
|
+
Requires-Dist: pydantic>=2.5.0
|
|
47
|
+
Requires-Dist: rich>=13.0.0
|
|
48
|
+
Requires-Dist: sentence-transformers>=2.2.2
|
|
49
|
+
Requires-Dist: tree-sitter-languages>=1.8.0
|
|
50
|
+
Requires-Dist: tree-sitter>=0.20.1
|
|
51
|
+
Requires-Dist: typer>=0.9.0
|
|
52
|
+
Requires-Dist: watchdog>=3.0.0
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# MCP Vector Search
|
|
56
|
+
|
|
57
|
+
🔍 **CLI-first semantic code search with MCP integration**
|
|
58
|
+
|
|
59
|
+
> ⚠️ **Alpha Release (v0.0.3)**: This is an early-stage project under active development. Expect breaking changes and rough edges. Feedback and contributions are welcome!
|
|
60
|
+
|
|
61
|
+
A modern, fast, and intelligent code search tool that understands your codebase through semantic analysis and AST parsing. Built with Python, powered by ChromaDB, and designed for developer productivity.
|
|
62
|
+
|
|
63
|
+
## ✨ Features
|
|
64
|
+
|
|
65
|
+
### 🚀 **Core Capabilities**
|
|
66
|
+
- **Semantic Search**: Find code by meaning, not just keywords
|
|
67
|
+
- **AST-Aware Parsing**: Understands code structure (functions, classes, methods)
|
|
68
|
+
- **Multi-Language Support**: Python, JavaScript, TypeScript (with extensible architecture)
|
|
69
|
+
- **Real-time Indexing**: File watching with automatic index updates
|
|
70
|
+
- **Local-First**: Complete privacy with on-device processing
|
|
71
|
+
- **Zero Configuration**: Auto-detects project structure and languages
|
|
72
|
+
|
|
73
|
+
### 🛠️ **Developer Experience**
|
|
74
|
+
- **CLI-First Design**: Simple commands for immediate productivity
|
|
75
|
+
- **Rich Output**: Syntax highlighting, similarity scores, context
|
|
76
|
+
- **Fast Performance**: Sub-second search responses, efficient indexing
|
|
77
|
+
- **Modern Architecture**: Async-first, type-safe, modular design
|
|
78
|
+
|
|
79
|
+
### 🔧 **Technical Features**
|
|
80
|
+
- **Vector Database**: ChromaDB for efficient similarity search
|
|
81
|
+
- **Embedding Models**: Configurable sentence transformers
|
|
82
|
+
- **Incremental Updates**: Smart file watching and re-indexing
|
|
83
|
+
- **Extensible Parsers**: Plugin architecture for new languages
|
|
84
|
+
- **Configuration Management**: Project-specific settings
|
|
85
|
+
|
|
86
|
+
## 🚀 Quick Start
|
|
87
|
+
|
|
88
|
+
### Installation
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Install with UV (recommended)
|
|
92
|
+
uv add mcp-vector-search
|
|
93
|
+
|
|
94
|
+
# Or with pip
|
|
95
|
+
pip install mcp-vector-search
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Basic Usage
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Initialize your project
|
|
102
|
+
mcp-vector-search init
|
|
103
|
+
|
|
104
|
+
# Index your codebase
|
|
105
|
+
mcp-vector-search index
|
|
106
|
+
|
|
107
|
+
# Search your code
|
|
108
|
+
mcp-vector-search search "authentication logic"
|
|
109
|
+
mcp-vector-search search "database connection setup"
|
|
110
|
+
mcp-vector-search search "error handling patterns"
|
|
111
|
+
|
|
112
|
+
# Check project status
|
|
113
|
+
mcp-vector-search status
|
|
114
|
+
|
|
115
|
+
# Start file watching (auto-update index)
|
|
116
|
+
mcp-vector-search watch
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 📖 Documentation
|
|
120
|
+
|
|
121
|
+
### Commands
|
|
122
|
+
|
|
123
|
+
#### `init` - Initialize Project
|
|
124
|
+
```bash
|
|
125
|
+
# Basic initialization
|
|
126
|
+
mcp-vector-search init
|
|
127
|
+
|
|
128
|
+
# Custom configuration
|
|
129
|
+
mcp-vector-search init --extensions .py,.js,.ts --embedding-model sentence-transformers/all-MiniLM-L6-v2
|
|
130
|
+
|
|
131
|
+
# Force re-initialization
|
|
132
|
+
mcp-vector-search init --force
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### `index` - Index Codebase
|
|
136
|
+
```bash
|
|
137
|
+
# Index all files
|
|
138
|
+
mcp-vector-search index
|
|
139
|
+
|
|
140
|
+
# Index specific directory
|
|
141
|
+
mcp-vector-search index /path/to/code
|
|
142
|
+
|
|
143
|
+
# Force re-indexing
|
|
144
|
+
mcp-vector-search index --force
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### `search` - Semantic Search
|
|
148
|
+
```bash
|
|
149
|
+
# Basic search
|
|
150
|
+
mcp-vector-search search "function that handles user authentication"
|
|
151
|
+
|
|
152
|
+
# Adjust similarity threshold
|
|
153
|
+
mcp-vector-search search "database queries" --threshold 0.7
|
|
154
|
+
|
|
155
|
+
# Limit results
|
|
156
|
+
mcp-vector-search search "error handling" --limit 10
|
|
157
|
+
|
|
158
|
+
# Search in specific context
|
|
159
|
+
mcp-vector-search search similar "path/to/function.py:25"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
#### `watch` - File Watching
|
|
163
|
+
```bash
|
|
164
|
+
# Start watching for changes
|
|
165
|
+
mcp-vector-search watch
|
|
166
|
+
|
|
167
|
+
# Check watch status
|
|
168
|
+
mcp-vector-search watch status
|
|
169
|
+
|
|
170
|
+
# Enable/disable watching
|
|
171
|
+
mcp-vector-search watch enable
|
|
172
|
+
mcp-vector-search watch disable
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### `status` - Project Information
|
|
176
|
+
```bash
|
|
177
|
+
# Basic status
|
|
178
|
+
mcp-vector-search status
|
|
179
|
+
|
|
180
|
+
# Detailed information
|
|
181
|
+
mcp-vector-search status --verbose
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### `config` - Configuration Management
|
|
185
|
+
```bash
|
|
186
|
+
# View configuration
|
|
187
|
+
mcp-vector-search config show
|
|
188
|
+
|
|
189
|
+
# Update settings
|
|
190
|
+
mcp-vector-search config set similarity_threshold 0.8
|
|
191
|
+
mcp-vector-search config set embedding_model microsoft/codebert-base
|
|
192
|
+
|
|
193
|
+
# List available models
|
|
194
|
+
mcp-vector-search config models
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Configuration
|
|
198
|
+
|
|
199
|
+
Projects are configured via `.mcp-vector-search/config.json`:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"project_root": "/path/to/project",
|
|
204
|
+
"file_extensions": [".py", ".js", ".ts"],
|
|
205
|
+
"embedding_model": "sentence-transformers/all-MiniLM-L6-v2",
|
|
206
|
+
"similarity_threshold": 0.75,
|
|
207
|
+
"languages": ["python", "javascript", "typescript"],
|
|
208
|
+
"watch_files": true,
|
|
209
|
+
"cache_embeddings": true
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## 🏗️ Architecture
|
|
214
|
+
|
|
215
|
+
### Core Components
|
|
216
|
+
|
|
217
|
+
- **Parser Registry**: Extensible system for language-specific parsing
|
|
218
|
+
- **Semantic Indexer**: Efficient code chunking and embedding generation
|
|
219
|
+
- **Vector Database**: ChromaDB integration for similarity search
|
|
220
|
+
- **File Watcher**: Real-time monitoring and incremental updates
|
|
221
|
+
- **CLI Interface**: Rich, user-friendly command-line experience
|
|
222
|
+
|
|
223
|
+
### Supported Languages
|
|
224
|
+
|
|
225
|
+
| Language | Status | Features |
|
|
226
|
+
|------------|--------|----------|
|
|
227
|
+
| Python | ✅ Full | Functions, classes, methods, docstrings |
|
|
228
|
+
| JavaScript | ✅ Full | Functions, classes, JSDoc, ES6+ syntax |
|
|
229
|
+
| TypeScript | ✅ Full | Interfaces, types, generics, decorators |
|
|
230
|
+
| Java | 🔄 Planned | Classes, methods, annotations |
|
|
231
|
+
| Go | 🔄 Planned | Functions, structs, interfaces |
|
|
232
|
+
| Rust | 🔄 Planned | Functions, structs, traits |
|
|
233
|
+
|
|
234
|
+
## 🤝 Contributing
|
|
235
|
+
|
|
236
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
237
|
+
|
|
238
|
+
### Development Setup
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Clone the repository
|
|
242
|
+
git clone https://github.com/bobmatnyc/mcp-vector-search.git
|
|
243
|
+
cd mcp-vector-search
|
|
244
|
+
|
|
245
|
+
# Install dependencies with UV
|
|
246
|
+
uv sync
|
|
247
|
+
|
|
248
|
+
# Install in development mode
|
|
249
|
+
uv pip install -e .
|
|
250
|
+
|
|
251
|
+
# Run tests
|
|
252
|
+
uv run pytest
|
|
253
|
+
|
|
254
|
+
# Run linting
|
|
255
|
+
uv run ruff check
|
|
256
|
+
uv run mypy src/
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Adding Language Support
|
|
260
|
+
|
|
261
|
+
1. Create a new parser in `src/mcp_vector_search/parsers/`
|
|
262
|
+
2. Extend the `BaseParser` class
|
|
263
|
+
3. Register the parser in `parsers/registry.py`
|
|
264
|
+
4. Add tests and documentation
|
|
265
|
+
|
|
266
|
+
## 📊 Performance
|
|
267
|
+
|
|
268
|
+
- **Indexing Speed**: ~1000 files/minute (typical Python project)
|
|
269
|
+
- **Search Latency**: <100ms for most queries
|
|
270
|
+
- **Memory Usage**: ~50MB baseline + ~1MB per 1000 code chunks
|
|
271
|
+
- **Storage**: ~1KB per code chunk (compressed embeddings)
|
|
272
|
+
|
|
273
|
+
## ⚠️ Known Limitations (Alpha)
|
|
274
|
+
|
|
275
|
+
- **Tree-sitter Integration**: Currently using regex fallback parsing (Tree-sitter setup needs improvement)
|
|
276
|
+
- **Search Relevance**: Embedding model may need tuning for code-specific queries
|
|
277
|
+
- **Error Handling**: Some edge cases may not be gracefully handled
|
|
278
|
+
- **Documentation**: API documentation is minimal
|
|
279
|
+
- **Testing**: Limited test coverage, needs real-world validation
|
|
280
|
+
|
|
281
|
+
## 🙏 Feedback Needed
|
|
282
|
+
|
|
283
|
+
We're actively seeking feedback on:
|
|
284
|
+
|
|
285
|
+
- **Search Quality**: How relevant are the search results for your codebase?
|
|
286
|
+
- **Performance**: How does indexing and search speed feel in practice?
|
|
287
|
+
- **Usability**: Is the CLI interface intuitive and helpful?
|
|
288
|
+
- **Language Support**: Which languages would you like to see added next?
|
|
289
|
+
- **Features**: What functionality is missing for your workflow?
|
|
290
|
+
|
|
291
|
+
Please [open an issue](https://github.com/bobmatnyc/mcp-vector-search/issues) or start a [discussion](https://github.com/bobmatnyc/mcp-vector-search/discussions) to share your experience!
|
|
292
|
+
|
|
293
|
+
## 🔮 Roadmap
|
|
294
|
+
|
|
295
|
+
### v0.0.x: Alpha (Current) 🔄
|
|
296
|
+
- [x] Core CLI interface
|
|
297
|
+
- [x] Python/JS/TS parsing
|
|
298
|
+
- [x] ChromaDB integration
|
|
299
|
+
- [x] File watching
|
|
300
|
+
- [x] Basic search functionality
|
|
301
|
+
- [ ] Real-world testing and feedback
|
|
302
|
+
- [ ] Bug fixes and stability improvements
|
|
303
|
+
- [ ] Performance optimizations
|
|
304
|
+
|
|
305
|
+
### v0.1.x: Beta 🔮
|
|
306
|
+
- [ ] Advanced search modes (contextual, similar code)
|
|
307
|
+
- [ ] Additional language support (Java, Go, Rust)
|
|
308
|
+
- [ ] Configuration improvements
|
|
309
|
+
- [ ] Comprehensive testing suite
|
|
310
|
+
- [ ] Documentation improvements
|
|
311
|
+
|
|
312
|
+
### v1.0.x: Stable 🔮
|
|
313
|
+
- [ ] MCP server implementation
|
|
314
|
+
- [ ] IDE extensions (VS Code, JetBrains)
|
|
315
|
+
- [ ] Git integration
|
|
316
|
+
- [ ] Team collaboration features
|
|
317
|
+
- [ ] Production-ready performance
|
|
318
|
+
|
|
319
|
+
## 📄 License
|
|
320
|
+
|
|
321
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
322
|
+
|
|
323
|
+
## 🙏 Acknowledgments
|
|
324
|
+
|
|
325
|
+
- [ChromaDB](https://github.com/chroma-core/chroma) for vector database
|
|
326
|
+
- [Tree-sitter](https://tree-sitter.github.io/) for parsing infrastructure
|
|
327
|
+
- [Sentence Transformers](https://www.sbert.net/) for embeddings
|
|
328
|
+
- [Typer](https://typer.tiangolo.com/) for CLI framework
|
|
329
|
+
- [Rich](https://rich.readthedocs.io/) for beautiful terminal output
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
**Built with ❤️ for developers who love efficient code search**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
mcp_vector_search/__init__.py,sha256=r0vZZ1e8T3dOOqEg929ycGTCy1a7fco_ujtncgEkUo8,269
|
|
2
|
+
mcp_vector_search/py.typed,sha256=lCKeV9Qcn9sGtbRsgg-LJO2ZwWRuknnnlmomq3bJFH0,43
|
|
3
|
+
mcp_vector_search/cli/__init__.py,sha256=TNB7CaOASz8u3yHWLbNmo8-GtHF0qwUjVKWAuNphKgo,40
|
|
4
|
+
mcp_vector_search/cli/main.py,sha256=WMFDUeCFMvJjC3PbJppWAmZDDeVn7lq5gMkb5sD8AqI,3750
|
|
5
|
+
mcp_vector_search/cli/output.py,sha256=gCzWECzabKWYCgnPTJfRS81lWJ7_GONECw2w2ldphPQ,7820
|
|
6
|
+
mcp_vector_search/cli/commands/__init__.py,sha256=vQls-YKZ54YEwmf7g1dL0T2SS9D4pdQljXzsUChG_V4,42
|
|
7
|
+
mcp_vector_search/cli/commands/config.py,sha256=xNB5U0X1aZ2ZO5HOh4ANX4mHZmw66xD-LRyChvkXpn8,10374
|
|
8
|
+
mcp_vector_search/cli/commands/index.py,sha256=zPl_8vNvaanVPoVf5sGXEVbLAv6lgFfo6-lcr0w1GQ8,9099
|
|
9
|
+
mcp_vector_search/cli/commands/init.py,sha256=m2EeA5WDUS5IJRzlgEcnSGYfhCdvGvaiHxDs_c_CIKs,7574
|
|
10
|
+
mcp_vector_search/cli/commands/search.py,sha256=jttTaCVicMvnF4cwjLwsPt7bSxhXtU8oj12IGVYCz0g,11608
|
|
11
|
+
mcp_vector_search/cli/commands/status.py,sha256=6QflT4U8SYl37VAqX0DmL_Qjr0YzTwuE-HN6rWSuWhY,12309
|
|
12
|
+
mcp_vector_search/cli/commands/watch.py,sha256=WkwfUBaf68mPv7lvLdERCa5011pp-kPHuQt3Q4WcbpI,9229
|
|
13
|
+
mcp_vector_search/config/__init__.py,sha256=r_qAQkU5gc0EQ2pv8EQARACe4klhrR_WRJqCb9lfGc0,54
|
|
14
|
+
mcp_vector_search/config/defaults.py,sha256=GC84f690Wp03uqQFPJrHhrxYrE1l4MK7GSH1AiQCUaQ,4379
|
|
15
|
+
mcp_vector_search/config/settings.py,sha256=fWe34fgEoKUfcHjDiEGB25fmdbSM2gCTSymf98imsNU,3688
|
|
16
|
+
mcp_vector_search/core/__init__.py,sha256=bWKtKmmaFs7gG5XPCbrx77UYIVeO1FF8wIJxpj1dLNw,48
|
|
17
|
+
mcp_vector_search/core/database.py,sha256=A4iyqpzzm5i_nU78LcvkgoFWaszjr8t6ST66GdMvPa4,14293
|
|
18
|
+
mcp_vector_search/core/embeddings.py,sha256=w-0z8JNVfOh1PaiTg1OBR1H2YLCKsB6uHFeOLAHHvBA,8847
|
|
19
|
+
mcp_vector_search/core/exceptions.py,sha256=01f0hE_bbIvyJV-3sYr_IMOPVsyDiFD1tsvoFwjTAsY,1415
|
|
20
|
+
mcp_vector_search/core/indexer.py,sha256=obpHGASAm1S-mG-0bdLmzYeNiLebLsCTu5rCYe4uevo,9987
|
|
21
|
+
mcp_vector_search/core/models.py,sha256=UcjE4E9ummpRCWS2I1aMj7TmqX1L2t8cFMSLUMbQtaE,6724
|
|
22
|
+
mcp_vector_search/core/project.py,sha256=p_1bm783-btK1JiJXYEwx7wULHfTYYPVV2_gY-jdr80,10029
|
|
23
|
+
mcp_vector_search/core/search.py,sha256=VBbA3A2sRvuRoui_mxXv4Ah-iSvIKeToN5UQr7_nPkY,10709
|
|
24
|
+
mcp_vector_search/core/watcher.py,sha256=VeaZTCr9nUrxMDqqDi1dpZbiedDTxhZyV4C65yCjVaE,11045
|
|
25
|
+
mcp_vector_search/mcp/__init__.py,sha256=QOpaCGNg4UWeDDH5OIrxzQJIZgYm_15m76RcBTScO60,52
|
|
26
|
+
mcp_vector_search/parsers/__init__.py,sha256=nk4clWDWQURMxzC1ev8O_vGlfraHlXqizTDXgFqIP5U,46
|
|
27
|
+
mcp_vector_search/parsers/base.py,sha256=MpgstIwsN2amjT0kwBMxopSsvrkJXYs1EgK9VdFoqWk,5645
|
|
28
|
+
mcp_vector_search/parsers/javascript.py,sha256=NTgHTEt8KZdxKKjFORB9Wjd3S4FobR9n_lAs4ONp0XM,9754
|
|
29
|
+
mcp_vector_search/parsers/python.py,sha256=EJYJjjQrOvG-_tBHJOt9zeCswjK3oO3dpfPurauHdj0,15741
|
|
30
|
+
mcp_vector_search/parsers/registry.py,sha256=7iLcj1sihfUhyFh6TZ-Hw3bMqs1rQW3zwMfslaDFneM,5539
|
|
31
|
+
mcp_vector_search-0.0.3.dist-info/METADATA,sha256=NoPD67cGMUKohy9lDrQ3QLVOZLPKFyedy9lHYtnOhKQ,10757
|
|
32
|
+
mcp_vector_search-0.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
33
|
+
mcp_vector_search-0.0.3.dist-info/entry_points.txt,sha256=dw8_HpBvwhauz6bkMbs3QM6dbstV1mPGo9DcNpVM-bE,69
|
|
34
|
+
mcp_vector_search-0.0.3.dist-info/licenses/LICENSE,sha256=FqZUgGJH_tZKZLQsMCpXaLawRyLmyFKRVfMwYyEcyTs,1072
|
|
35
|
+
mcp_vector_search-0.0.3.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Robert Matsuoka
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|