mcp-code-indexer 2.0.0__tar.gz → 2.0.2__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.2}/PKG-INFO +3 -3
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/README.md +2 -2
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/pyproject.toml +1 -1
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/database/database.py +25 -10
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/server/mcp_server.py +8 -1
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2/src/mcp_code_indexer.egg-info}/PKG-INFO +3 -3
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/LICENSE +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/MANIFEST.in +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/api-reference.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/architecture.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/configuration.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/contributing.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/database-resilience.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/git-hook-setup.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/monitoring.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/docs/performance-tuning.md +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/migrations/001_initial.sql +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/migrations/002_performance_indexes.sql +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/migrations/003_project_overviews.sql +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/requirements.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/setup.cfg +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/setup.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/__main__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/data/stop_words_english.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/database/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/database/connection_health.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/database/models.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/database/retry_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/error_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/file_scanner.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/git_hook_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/logging_config.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/main.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/merge_handler.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/middleware/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/middleware/error_middleware.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/server/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/token_counter.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer/tools/__init__.py +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/SOURCES.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/dependency_links.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/entry_points.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/requires.txt +0 -0
- {mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/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.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
|
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.2"
|
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,26 @@ 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
|
-
self._retry_handler = create_retry_handler()
|
60
|
+
# Retry and recovery components - configure with provided settings
|
61
|
+
self._retry_handler = create_retry_handler(max_attempts=retry_count)
|
52
62
|
self._recovery_manager = None # Initialized in async context
|
53
63
|
|
54
64
|
# Health monitoring and metrics
|
@@ -66,8 +76,12 @@ class DatabaseManager:
|
|
66
76
|
# Initialize connection recovery manager
|
67
77
|
self._recovery_manager = ConnectionRecoveryManager(self)
|
68
78
|
|
69
|
-
# Initialize health monitoring
|
70
|
-
self._health_monitor = ConnectionHealthMonitor(
|
79
|
+
# Initialize health monitoring with configured interval
|
80
|
+
self._health_monitor = ConnectionHealthMonitor(
|
81
|
+
self,
|
82
|
+
check_interval=self.health_check_interval,
|
83
|
+
timeout_seconds=self.timeout
|
84
|
+
)
|
71
85
|
await self._health_monitor.start_monitoring()
|
72
86
|
|
73
87
|
# Ensure database directory exists
|
@@ -82,7 +96,7 @@ class DatabaseManager:
|
|
82
96
|
db.row_factory = aiosqlite.Row
|
83
97
|
|
84
98
|
# Configure WAL mode and optimizations for concurrent access
|
85
|
-
await self._configure_database_optimizations(db)
|
99
|
+
await self._configure_database_optimizations(db, include_wal_mode=self.enable_wal_mode)
|
86
100
|
|
87
101
|
# Apply each migration
|
88
102
|
for migration_file in migration_files:
|
@@ -108,6 +122,7 @@ class DatabaseManager:
|
|
108
122
|
# WAL mode is database-level, only set during initialization
|
109
123
|
if include_wal_mode:
|
110
124
|
optimizations.append("PRAGMA journal_mode = WAL")
|
125
|
+
logger.info("Enabling WAL mode for database concurrency")
|
111
126
|
|
112
127
|
# Connection-level optimizations that can be set per connection
|
113
128
|
optimizations.extend([
|
@@ -422,7 +437,7 @@ class DatabaseManager:
|
|
422
437
|
|
423
438
|
async def create_project(self, project: Project) -> None:
|
424
439
|
"""Create a new project record."""
|
425
|
-
async with self.
|
440
|
+
async with self.get_write_connection_with_retry("create_project") as db:
|
426
441
|
await db.execute(
|
427
442
|
"""
|
428
443
|
INSERT INTO projects (id, name, remote_origin, upstream_origin, aliases, created, last_accessed)
|
@@ -609,7 +624,7 @@ class DatabaseManager:
|
|
609
624
|
|
610
625
|
async def update_project_access_time(self, project_id: str) -> None:
|
611
626
|
"""Update the last accessed time for a project."""
|
612
|
-
async with self.
|
627
|
+
async with self.get_write_connection_with_retry("update_project_access_time") as db:
|
613
628
|
await db.execute(
|
614
629
|
"UPDATE projects SET last_accessed = ? WHERE id = ?",
|
615
630
|
(datetime.utcnow(), project_id)
|
@@ -618,7 +633,7 @@ class DatabaseManager:
|
|
618
633
|
|
619
634
|
async def update_project(self, project: Project) -> None:
|
620
635
|
"""Update an existing project record."""
|
621
|
-
async with self.
|
636
|
+
async with self.get_write_connection_with_retry("update_project") as db:
|
622
637
|
await db.execute(
|
623
638
|
"""
|
624
639
|
UPDATE projects
|
@@ -680,7 +695,7 @@ class DatabaseManager:
|
|
680
695
|
|
681
696
|
async def create_file_description(self, file_desc: FileDescription) -> None:
|
682
697
|
"""Create or update a file description."""
|
683
|
-
async with self.
|
698
|
+
async with self.get_write_connection_with_retry("create_file_description") as db:
|
684
699
|
await db.execute(
|
685
700
|
"""
|
686
701
|
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.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
|
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.2}/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.2}/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.2}/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.2}/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.2}/src/mcp_code_indexer.egg-info/dependency_links.txt
RENAMED
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/entry_points.txt
RENAMED
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/requires.txt
RENAMED
File without changes
|
{mcp_code_indexer-2.0.0 → mcp_code_indexer-2.0.2}/src/mcp_code_indexer.egg-info/top_level.txt
RENAMED
File without changes
|