mcp-code-indexer 2.0.0__tar.gz → 2.0.1__tar.gz
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-2.0.0/src/mcp_code_indexer.egg-info → mcp_code_indexer-2.0.1}/PKG-INFO +3 -3
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/README.md +2 -2
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/pyproject.toml +1 -1
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/database.py +27 -10
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/server/mcp_server.py +8 -1
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1/src/mcp_code_indexer.egg-info}/PKG-INFO +3 -3
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/LICENSE +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/MANIFEST.in +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/api-reference.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/architecture.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/configuration.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/contributing.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/database-resilience.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/git-hook-setup.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/monitoring.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/docs/performance-tuning.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/migrations/001_initial.sql +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/migrations/002_performance_indexes.sql +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/migrations/003_project_overviews.sql +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/requirements.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/setup.cfg +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/setup.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/__main__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/data/stop_words_english.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/connection_health.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/models.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/retry_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/error_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/file_scanner.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/git_hook_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/logging_config.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/main.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/merge_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/middleware/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/middleware/error_middleware.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/server/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/token_counter.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/tools/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/SOURCES.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/dependency_links.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/entry_points.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/requires.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-code-indexer
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.1
|
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
|
@@ -59,8 +59,8 @@ Dynamic: requires-python
|
|
59
59
|
|
60
60
|
# MCP Code Indexer 🚀
|
61
61
|
|
62
|
-
[](https://badge.fury.io/py/mcp-code-indexer)
|
63
|
+
[](https://pypi.org/project/mcp-code-indexer/)
|
64
64
|
[](https://opensource.org/licenses/MIT)
|
65
65
|
|
66
66
|
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.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# MCP Code Indexer 🚀
|
2
2
|
|
3
|
-
[](https://badge.fury.io/py/mcp-code-indexer)
|
4
|
+
[](https://pypi.org/project/mcp-code-indexer/)
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
6
6
|
|
7
7
|
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 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "mcp-code-indexer"
|
7
|
-
version = "2.0.
|
7
|
+
version = "2.0.1"
|
8
8
|
description = "MCP server that tracks file descriptions across codebases, enabling AI agents to efficiently navigate and understand code through searchable summaries and token-aware overviews."
|
9
9
|
readme = "README.md"
|
10
10
|
license = {text = "MIT"}
|
@@ -39,16 +39,28 @@ class DatabaseManager:
|
|
39
39
|
and caching with proper transaction management and error handling.
|
40
40
|
"""
|
41
41
|
|
42
|
-
def __init__(self,
|
42
|
+
def __init__(self,
|
43
|
+
db_path: Path,
|
44
|
+
pool_size: int = 3,
|
45
|
+
retry_count: int = 5,
|
46
|
+
timeout: float = 10.0,
|
47
|
+
enable_wal_mode: bool = True,
|
48
|
+
health_check_interval: float = 30.0):
|
43
49
|
"""Initialize database manager with path to SQLite database."""
|
44
50
|
self.db_path = db_path
|
45
51
|
self.pool_size = pool_size
|
52
|
+
self.retry_count = retry_count
|
53
|
+
self.timeout = timeout
|
54
|
+
self.enable_wal_mode = enable_wal_mode
|
55
|
+
self.health_check_interval = health_check_interval
|
46
56
|
self._connection_pool: List[aiosqlite.Connection] = []
|
47
57
|
self._pool_lock = None # Will be initialized in async context
|
48
58
|
self._write_lock = None # Write serialization lock, initialized in async context
|
49
59
|
|
50
|
-
# Retry and recovery components
|
51
|
-
|
60
|
+
# Retry and recovery components - configure with provided settings
|
61
|
+
from .retry_handler import RetryConfig
|
62
|
+
retry_config = RetryConfig(max_attempts=retry_count)
|
63
|
+
self._retry_handler = create_retry_handler(retry_config)
|
52
64
|
self._recovery_manager = None # Initialized in async context
|
53
65
|
|
54
66
|
# Health monitoring and metrics
|
@@ -66,8 +78,12 @@ class DatabaseManager:
|
|
66
78
|
# Initialize connection recovery manager
|
67
79
|
self._recovery_manager = ConnectionRecoveryManager(self)
|
68
80
|
|
69
|
-
# Initialize health monitoring
|
70
|
-
self._health_monitor = ConnectionHealthMonitor(
|
81
|
+
# Initialize health monitoring with configured interval
|
82
|
+
self._health_monitor = ConnectionHealthMonitor(
|
83
|
+
self,
|
84
|
+
check_interval=self.health_check_interval,
|
85
|
+
timeout_seconds=self.timeout
|
86
|
+
)
|
71
87
|
await self._health_monitor.start_monitoring()
|
72
88
|
|
73
89
|
# Ensure database directory exists
|
@@ -82,7 +98,7 @@ class DatabaseManager:
|
|
82
98
|
db.row_factory = aiosqlite.Row
|
83
99
|
|
84
100
|
# Configure WAL mode and optimizations for concurrent access
|
85
|
-
await self._configure_database_optimizations(db)
|
101
|
+
await self._configure_database_optimizations(db, include_wal_mode=self.enable_wal_mode)
|
86
102
|
|
87
103
|
# Apply each migration
|
88
104
|
for migration_file in migration_files:
|
@@ -108,6 +124,7 @@ class DatabaseManager:
|
|
108
124
|
# WAL mode is database-level, only set during initialization
|
109
125
|
if include_wal_mode:
|
110
126
|
optimizations.append("PRAGMA journal_mode = WAL")
|
127
|
+
logger.info("Enabling WAL mode for database concurrency")
|
111
128
|
|
112
129
|
# Connection-level optimizations that can be set per connection
|
113
130
|
optimizations.extend([
|
@@ -422,7 +439,7 @@ class DatabaseManager:
|
|
422
439
|
|
423
440
|
async def create_project(self, project: Project) -> None:
|
424
441
|
"""Create a new project record."""
|
425
|
-
async with self.
|
442
|
+
async with self.get_write_connection_with_retry("create_project") as db:
|
426
443
|
await db.execute(
|
427
444
|
"""
|
428
445
|
INSERT INTO projects (id, name, remote_origin, upstream_origin, aliases, created, last_accessed)
|
@@ -609,7 +626,7 @@ class DatabaseManager:
|
|
609
626
|
|
610
627
|
async def update_project_access_time(self, project_id: str) -> None:
|
611
628
|
"""Update the last accessed time for a project."""
|
612
|
-
async with self.
|
629
|
+
async with self.get_write_connection_with_retry("update_project_access_time") as db:
|
613
630
|
await db.execute(
|
614
631
|
"UPDATE projects SET last_accessed = ? WHERE id = ?",
|
615
632
|
(datetime.utcnow(), project_id)
|
@@ -618,7 +635,7 @@ class DatabaseManager:
|
|
618
635
|
|
619
636
|
async def update_project(self, project: Project) -> None:
|
620
637
|
"""Update an existing project record."""
|
621
|
-
async with self.
|
638
|
+
async with self.get_write_connection_with_retry("update_project") as db:
|
622
639
|
await db.execute(
|
623
640
|
"""
|
624
641
|
UPDATE projects
|
@@ -680,7 +697,7 @@ class DatabaseManager:
|
|
680
697
|
|
681
698
|
async def create_file_description(self, file_desc: FileDescription) -> None:
|
682
699
|
"""Create or update a file description."""
|
683
|
-
async with self.
|
700
|
+
async with self.get_write_connection_with_retry("create_file_description") as db:
|
684
701
|
await db.execute(
|
685
702
|
"""
|
686
703
|
INSERT OR REPLACE INTO file_descriptions
|
@@ -83,7 +83,14 @@ class MCPCodeIndexServer:
|
|
83
83
|
}
|
84
84
|
|
85
85
|
# Initialize components
|
86
|
-
self.db_manager = DatabaseManager(
|
86
|
+
self.db_manager = DatabaseManager(
|
87
|
+
db_path=self.db_path,
|
88
|
+
pool_size=db_pool_size,
|
89
|
+
retry_count=db_retry_count,
|
90
|
+
timeout=db_timeout,
|
91
|
+
enable_wal_mode=enable_wal_mode,
|
92
|
+
health_check_interval=health_check_interval
|
93
|
+
)
|
87
94
|
self.token_counter = TokenCounter(token_limit)
|
88
95
|
self.merge_handler = MergeHandler(self.db_manager)
|
89
96
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-code-indexer
|
3
|
-
Version: 2.0.
|
3
|
+
Version: 2.0.1
|
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
|
@@ -59,8 +59,8 @@ Dynamic: requires-python
|
|
59
59
|
|
60
60
|
# MCP Code Indexer 🚀
|
61
61
|
|
62
|
-
[](https://badge.fury.io/py/mcp-code-indexer)
|
63
|
+
[](https://pypi.org/project/mcp-code-indexer/)
|
64
64
|
[](https://opensource.org/licenses/MIT)
|
65
65
|
|
66
66
|
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.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/data/stop_words_english.txt
RENAMED
File without changes
|
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/connection_health.py
RENAMED
File without changes
|
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/database/retry_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer/middleware/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/dependency_links.txt
RENAMED
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/entry_points.txt
RENAMED
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/requires.txt
RENAMED
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.1}/src/mcp_code_indexer.egg-info/top_level.txt
RENAMED
File without changes
|