mcp-code-indexer 1.0.4__py3-none-any.whl → 1.0.6__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.
@@ -6,7 +6,7 @@ intelligent codebase navigation through searchable file descriptions,
6
6
  token-aware overviews, and advanced merge capabilities.
7
7
  """
8
8
 
9
- __version__ = "1.0.4"
9
+ __version__ = "1.0.5"
10
10
  __author__ = "MCP Code Indexer Contributors"
11
11
  __email__ = ""
12
12
  __license__ = "MIT"
@@ -338,7 +338,7 @@ class FileScanner:
338
338
  Get statistics about the project directory.
339
339
 
340
340
  Returns:
341
- Dictionary with project statistics
341
+ Dictionary with project statistics for trackable files only
342
342
  """
343
343
  stats = {
344
344
  'total_files': 0,
@@ -349,8 +349,17 @@ class FileScanner:
349
349
  }
350
350
 
351
351
  try:
352
+ all_files_count = 0
352
353
  for file_path in self._walk_directory():
353
- stats['total_files'] += 1
354
+ all_files_count += 1
355
+
356
+ # Check if trackable first
357
+ if self.should_ignore_file(file_path):
358
+ stats['ignored_files'] += 1
359
+ continue
360
+
361
+ # Only process trackable files for detailed stats
362
+ stats['trackable_files'] += 1
354
363
 
355
364
  # Track file size
356
365
  try:
@@ -359,15 +368,12 @@ class FileScanner:
359
368
  except OSError:
360
369
  pass
361
370
 
362
- # Track extensions
371
+ # Track extensions for trackable files only
363
372
  ext = file_path.suffix.lower()
364
373
  stats['file_extensions'][ext] = stats['file_extensions'].get(ext, 0) + 1
365
-
366
- # Check if trackable
367
- if self.should_ignore_file(file_path):
368
- stats['ignored_files'] += 1
369
- else:
370
- stats['trackable_files'] += 1
374
+
375
+ # Total files is just trackable files
376
+ stats['total_files'] = stats['trackable_files']
371
377
 
372
378
  except Exception as e:
373
379
  logger.error(f"Error getting project stats: {e}")
@@ -310,8 +310,10 @@ class MCPCodeIndexServer:
310
310
  folder_path = arguments["folderPath"]
311
311
  branch = arguments.get("branch", "main")
312
312
 
313
- # Create project ID from identifiers
314
- id_source = f"{project_name}:{remote_origin}:{upstream_origin}:{folder_path}"
313
+ # Create project ID from identifiers (normalize None values for consistent hashing)
314
+ remote_key = remote_origin or ""
315
+ upstream_key = upstream_origin or ""
316
+ id_source = f"{project_name}:{remote_key}:{upstream_key}:{folder_path}"
315
317
  project_id = hashlib.sha256(id_source.encode()).hexdigest()[:16]
316
318
 
317
319
  # Check if project exists, create if not
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-code-indexer
3
- Version: 1.0.4
3
+ Version: 1.0.6
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
  Author: MCP Code Indexer Contributors
6
6
  Maintainer: MCP Code Indexer Contributors
@@ -1,6 +1,6 @@
1
- mcp_code_indexer/__init__.py,sha256=tFNpOTeNAG23YobUnL1oXAdr6CfSQXPtzvGswDz8uPg,473
1
+ mcp_code_indexer/__init__.py,sha256=PUkiM7VGRk7n2B_Ma0fzZWC0wmHCjyE15wxsvU9I54E,473
2
2
  mcp_code_indexer/error_handler.py,sha256=cNSUFFrGBMLDv4qa78c7495L1wSl_dXCRbzCJOidx-Q,11590
3
- mcp_code_indexer/file_scanner.py,sha256=1Z6wq7H14V1OMAHIF4v9G7SY8hC1puDmU5IXsCKH4kU,11442
3
+ mcp_code_indexer/file_scanner.py,sha256=ctXeZMROgDThEtjzsANTK9TbK-fhTScMBd4iyuleBT4,11734
4
4
  mcp_code_indexer/logging_config.py,sha256=5L1cYIG8IAX91yCjc5pzkbO_KPt0bvm_ABHB53LBZjI,5184
5
5
  mcp_code_indexer/main.py,sha256=Rou-mAN9-12PPP8jC7dIs2_UNambJuC2F8BF--j-0m8,3715
6
6
  mcp_code_indexer/merge_handler.py,sha256=lJR8eVq2qSrF6MW9mR3Fy8UzrNAaQ7RsI2FMNXne3vQ,14692
@@ -11,12 +11,12 @@ mcp_code_indexer/database/models.py,sha256=3wOxHKb6j3zKPWFSwB5g1TLpI507vLNZcqsxZ
11
11
  mcp_code_indexer/middleware/__init__.py,sha256=p-mP0pMsfiU2yajCPvokCUxUEkh_lu4XJP1LyyMW2ug,220
12
12
  mcp_code_indexer/middleware/error_middleware.py,sha256=v6jaHmPxf3qerYdb85X1tHIXLxgcbybpitKVakFLQTA,10109
13
13
  mcp_code_indexer/server/__init__.py,sha256=16xMcuriUOBlawRqWNBk6niwrvtv_JD5xvI36X1Vsmk,41
14
- mcp_code_indexer/server/mcp_server.py,sha256=Ok4nrwkRNLGmHTEeW-Ij00gVMMRtS5aX-Hi-lUot5bg,39900
14
+ mcp_code_indexer/server/mcp_server.py,sha256=PGy6X6U6NTbbOHz11bgf3a7RJ8-pb0KbRY6LyokmJyM,40027
15
15
  mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
16
16
  mcp_code_indexer/tools/__init__.py,sha256=m01mxML2UdD7y5rih_XNhNSCMzQTz7WQ_T1TeOcYlnE,49
17
- mcp_code_indexer-1.0.4.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
18
- mcp_code_indexer-1.0.4.dist-info/METADATA,sha256=ZOl-psh9Y4q9OtUFzuevW53lpm0SsczC7Nr3aSzIso4,11930
19
- mcp_code_indexer-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- mcp_code_indexer-1.0.4.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
21
- mcp_code_indexer-1.0.4.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
22
- mcp_code_indexer-1.0.4.dist-info/RECORD,,
17
+ mcp_code_indexer-1.0.6.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
18
+ mcp_code_indexer-1.0.6.dist-info/METADATA,sha256=WWfwybckUQpCurpButvXGA6cRmaK-gZPOgUeJS6KuJI,11930
19
+ mcp_code_indexer-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ mcp_code_indexer-1.0.6.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
21
+ mcp_code_indexer-1.0.6.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
22
+ mcp_code_indexer-1.0.6.dist-info/RECORD,,