mcp-code-indexer 3.5.1__py3-none-any.whl → 3.5.2__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.
- mcp_code_indexer/commands/makelocal.py +18 -7
- {mcp_code_indexer-3.5.1.dist-info → mcp_code_indexer-3.5.2.dist-info}/METADATA +3 -3
- {mcp_code_indexer-3.5.1.dist-info → mcp_code_indexer-3.5.2.dist-info}/RECORD +6 -6
- {mcp_code_indexer-3.5.1.dist-info → mcp_code_indexer-3.5.2.dist-info}/LICENSE +0 -0
- {mcp_code_indexer-3.5.1.dist-info → mcp_code_indexer-3.5.2.dist-info}/WHEEL +0 -0
- {mcp_code_indexer-3.5.1.dist-info → mcp_code_indexer-3.5.2.dist-info}/entry_points.txt +0 -0
@@ -52,10 +52,20 @@ class MakeLocalCommand:
|
|
52
52
|
if not folder_path_obj.is_dir():
|
53
53
|
raise ValueError(f"Path is not a directory: {folder_path}")
|
54
54
|
|
55
|
-
# Check if local database already exists
|
55
|
+
# Check if local database already exists and has data
|
56
56
|
local_db_path = folder_path_obj / ".code-index.db"
|
57
57
|
if local_db_path.exists() and local_db_path.stat().st_size > 0:
|
58
|
-
|
58
|
+
# Check if it actually has project data (not just schema)
|
59
|
+
from sqlite3 import connect
|
60
|
+
try:
|
61
|
+
with connect(local_db_path) as conn:
|
62
|
+
cursor = conn.execute("SELECT COUNT(*) FROM projects")
|
63
|
+
project_count = cursor.fetchone()[0]
|
64
|
+
if project_count > 0:
|
65
|
+
raise ValueError(f"Local database already contains {project_count} project(s): {local_db_path}")
|
66
|
+
except Exception:
|
67
|
+
# If we can't check, assume it has data to be safe
|
68
|
+
raise ValueError(f"Local database already exists: {local_db_path}")
|
59
69
|
|
60
70
|
# Get global database manager
|
61
71
|
global_db_manager = await self.db_factory.get_database_manager()
|
@@ -78,13 +88,14 @@ class MakeLocalCommand:
|
|
78
88
|
if project_overview:
|
79
89
|
logger.info("Found project overview to migrate")
|
80
90
|
|
81
|
-
# Create local database (
|
82
|
-
if local_db_path.exists():
|
83
|
-
local_db_path.unlink()
|
84
|
-
|
85
|
-
# Create local database manager
|
91
|
+
# Create local database manager (this will initialize schema if needed)
|
86
92
|
local_db_manager = await self.db_factory.get_database_manager(str(folder_path_obj))
|
87
93
|
|
94
|
+
# Check if project already exists in local database
|
95
|
+
existing_local_project = await local_db_manager.get_project(project.id)
|
96
|
+
if existing_local_project:
|
97
|
+
raise ValueError(f"Project '{project.name}' (ID: {project.id}) already exists in local database")
|
98
|
+
|
88
99
|
# Migrate data
|
89
100
|
await self._migrate_project_data(
|
90
101
|
local_db_manager, project, file_descriptions, project_overview
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: mcp-code-indexer
|
3
|
-
Version: 3.5.
|
3
|
+
Version: 3.5.2
|
4
4
|
Summary: MCP server that tracks file descriptions across codebases, enabling AI agents to efficiently navigate and understand code through searchable summaries and token-aware overviews.
|
5
5
|
License: MIT
|
6
6
|
Keywords: mcp,model-context-protocol,code-indexer,ai-tools,codebase-navigation,file-descriptions,llm-tools
|
@@ -40,8 +40,8 @@ Description-Content-Type: text/markdown
|
|
40
40
|
|
41
41
|
# MCP Code Indexer 🚀
|
42
42
|
|
43
|
-
[](https://badge.fury.io/py/mcp-code-indexer)
|
44
|
+
[](https://pypi.org/project/mcp-code-indexer/)
|
45
45
|
[](https://opensource.org/licenses/MIT)
|
46
46
|
|
47
47
|
A production-ready **Model Context Protocol (MCP) server** that revolutionizes how AI agents navigate and understand codebases. Built for high-concurrency environments with advanced database resilience, the server provides instant access to intelligent descriptions, semantic search, and context-aware recommendations while maintaining 800+ writes/sec throughput.
|
@@ -4,7 +4,7 @@ mcp_code_indexer/ask_handler.py,sha256=cy7gVFyXF0c10GZ3Aquktvgw1A8e4_NtBsbjlE1Bc
|
|
4
4
|
mcp_code_indexer/claude_api_handler.py,sha256=uZF6P64Cac9AHfO2Q3Whe4exhZyZmqZ1grWT1nHw-Wc,13616
|
5
5
|
mcp_code_indexer/cleanup_manager.py,sha256=qjIAMiJ-F1pfgCwVbNaNE0dfs8Wh9aaWh51DBMCWFuI,9491
|
6
6
|
mcp_code_indexer/commands/__init__.py,sha256=141U722dS_NnFTZyxTPipzhXKdU21kCv-mcrN4djyHo,45
|
7
|
-
mcp_code_indexer/commands/makelocal.py,sha256=
|
7
|
+
mcp_code_indexer/commands/makelocal.py,sha256=rqb0JQHh2-lei1hl7F4BnssgajcDsG5WvOXyq79YIpk,8325
|
8
8
|
mcp_code_indexer/data/stop_words_english.txt,sha256=7Zdd9ameVgA6tN_zuXROvHXD4hkWeELVywPhb7FJEkw,6343
|
9
9
|
mcp_code_indexer/database/__init__.py,sha256=aPq_aaRp0aSwOBIq9GkuMNjmLxA411zg2vhdrAuHm-w,38
|
10
10
|
mcp_code_indexer/database/connection_health.py,sha256=vu8c8lDLEwva7ldTdxvlACTKT59kO-KjZ9I3tMbwr3s,25240
|
@@ -33,8 +33,8 @@ mcp_code_indexer/server/mcp_server.py,sha256=o6G5vNxtyWwL_x4UXTB9XfG6acoba5P9hTJ
|
|
33
33
|
mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
|
34
34
|
mcp_code_indexer/token_counter.py,sha256=e6WsyCEWMMSkMwLbcVtr5e8vEqh-kFqNmiJErCNdqHE,8220
|
35
35
|
mcp_code_indexer/tools/__init__.py,sha256=m01mxML2UdD7y5rih_XNhNSCMzQTz7WQ_T1TeOcYlnE,49
|
36
|
-
mcp_code_indexer-3.5.
|
37
|
-
mcp_code_indexer-3.5.
|
38
|
-
mcp_code_indexer-3.5.
|
39
|
-
mcp_code_indexer-3.5.
|
40
|
-
mcp_code_indexer-3.5.
|
36
|
+
mcp_code_indexer-3.5.2.dist-info/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
|
37
|
+
mcp_code_indexer-3.5.2.dist-info/METADATA,sha256=25-ZLpMXyX2ZkaS1132tpVbDVt4RYoYGhsCMJhR41xo,19359
|
38
|
+
mcp_code_indexer-3.5.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
39
|
+
mcp_code_indexer-3.5.2.dist-info/entry_points.txt,sha256=UABj7HZ0mC6rvF22gxaz2LLNLGQShTrFmp5u00iUtvo,67
|
40
|
+
mcp_code_indexer-3.5.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|