mcp-code-indexer 3.1.2__py3-none-any.whl → 3.1.4__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/database/database.py +1 -58
- mcp_code_indexer/server/mcp_server.py +27 -26
- {mcp_code_indexer-3.1.2.dist-info → mcp_code_indexer-3.1.4.dist-info}/METADATA +3 -3
- {mcp_code_indexer-3.1.2.dist-info → mcp_code_indexer-3.1.4.dist-info}/RECORD +8 -8
- {mcp_code_indexer-3.1.2.dist-info → mcp_code_indexer-3.1.4.dist-info}/WHEEL +0 -0
- {mcp_code_indexer-3.1.2.dist-info → mcp_code_indexer-3.1.4.dist-info}/entry_points.txt +0 -0
- {mcp_code_indexer-3.1.2.dist-info → mcp_code_indexer-3.1.4.dist-info}/licenses/LICENSE +0 -0
- {mcp_code_indexer-3.1.2.dist-info → mcp_code_indexer-3.1.4.dist-info}/top_level.txt +0 -0
@@ -910,64 +910,7 @@ class DatabaseManager:
|
|
910
910
|
row = await cursor.fetchone()
|
911
911
|
return row['count'] if row else 0
|
912
912
|
|
913
|
-
|
914
|
-
|
915
|
-
async def inherit_from_upstream(self, project: Project, target_branch: str = "main") -> int:
|
916
|
-
"""
|
917
|
-
Inherit file descriptions from upstream repository.
|
918
|
-
|
919
|
-
Args:
|
920
|
-
project: Target project that should inherit descriptions
|
921
|
-
target_branch: Branch to inherit descriptions into
|
922
|
-
|
923
|
-
Returns:
|
924
|
-
Number of descriptions inherited
|
925
|
-
"""
|
926
|
-
if not project.upstream_origin:
|
927
|
-
return 0
|
928
|
-
|
929
|
-
# Find upstream project
|
930
|
-
upstream_project = await self.find_project_by_origin(project.upstream_origin)
|
931
|
-
if not upstream_project:
|
932
|
-
logger.debug(f"No upstream project found for {project.upstream_origin}")
|
933
|
-
return 0
|
934
|
-
|
935
|
-
# Get upstream descriptions
|
936
|
-
upstream_descriptions = await self.get_all_file_descriptions(
|
937
|
-
upstream_project.id, target_branch
|
938
|
-
)
|
939
|
-
|
940
|
-
if not upstream_descriptions:
|
941
|
-
logger.debug(f"No upstream descriptions found in branch {target_branch}")
|
942
|
-
return 0
|
943
|
-
|
944
|
-
# Get existing descriptions to avoid overwriting
|
945
|
-
existing_descriptions = await self.get_all_file_descriptions(
|
946
|
-
project.id, target_branch
|
947
|
-
)
|
948
|
-
existing_paths = {desc.file_path for desc in existing_descriptions}
|
949
|
-
|
950
|
-
# Create new descriptions for files that don't exist locally
|
951
|
-
inherited_descriptions = []
|
952
|
-
for upstream_desc in upstream_descriptions:
|
953
|
-
if upstream_desc.file_path not in existing_paths:
|
954
|
-
new_desc = FileDescription(
|
955
|
-
project_id=project.id,
|
956
|
-
branch=target_branch,
|
957
|
-
file_path=upstream_desc.file_path,
|
958
|
-
description=upstream_desc.description,
|
959
|
-
file_hash=None, # Don't copy hash as local file may differ
|
960
|
-
last_modified=datetime.utcnow(),
|
961
|
-
version=1,
|
962
|
-
source_project_id=upstream_project.id # Track inheritance source
|
963
|
-
)
|
964
|
-
inherited_descriptions.append(new_desc)
|
965
|
-
|
966
|
-
if inherited_descriptions:
|
967
|
-
await self.batch_create_file_descriptions(inherited_descriptions)
|
968
|
-
logger.info(f"Inherited {len(inherited_descriptions)} descriptions from upstream")
|
969
|
-
|
970
|
-
return len(inherited_descriptions)
|
913
|
+
|
971
914
|
|
972
915
|
|
973
916
|
|
@@ -349,48 +349,49 @@ class MCPCodeIndexServer:
|
|
349
349
|
),
|
350
350
|
types.Tool(
|
351
351
|
name="update_codebase_overview",
|
352
|
-
description="""
|
352
|
+
description="""Creates a concise codebase overview for AI agents. Focus on essential navigation and context in 3500-7000 words. Include: (1) One-paragraph system summary - what it does and its core purpose, (2) Directory tree with one-line descriptions for each major folder, (3) Key architectural patterns (e.g., MVC, microservices, event-driven) in 2-3 sentences, (4) Critical file locations (entry points, config, main business logic), (5) Essential conventions (naming, file organization, error handling), (6) Important gotchas or non-obvious connections. Keep it scannable and action-oriented.
|
353
353
|
|
354
|
-
Example
|
354
|
+
Example:
|
355
355
|
|
356
356
|
````
|
357
|
+
## System Summary
|
358
|
+
E-commerce platform handling product catalog, orders, and payments with React frontend and Node.js API.
|
359
|
+
|
357
360
|
## Directory Structure
|
358
361
|
```
|
359
362
|
src/
|
360
|
-
├── api/ # REST
|
361
|
-
├── models/ #
|
362
|
-
├── services/ #
|
363
|
-
├──
|
364
|
-
└──
|
363
|
+
├── api/ # REST endpoints (auth in auth.js, orders in orders/)
|
364
|
+
├── models/ # Sequelize models (User, Product, Order)
|
365
|
+
├── services/ # Stripe (payments/), SendGrid (email/)
|
366
|
+
├── client/ # React app (components/, pages/, hooks/)
|
367
|
+
└── shared/ # Types and constants used by both API and client
|
365
368
|
```
|
366
369
|
|
367
|
-
## Architecture
|
368
|
-
|
369
|
-
|
370
|
-
## Core Components
|
371
|
-
### API Layer
|
372
|
-
[Details about API structure, authentication, routing]
|
370
|
+
## Architecture
|
371
|
+
RESTful API with JWT auth. React frontend calls API. Background jobs via Bull queue. PostgreSQL with Sequelize ORM.
|
373
372
|
|
374
|
-
|
375
|
-
|
373
|
+
## Key Files
|
374
|
+
- Entry: `src/index.js` (starts Express server)
|
375
|
+
- Config: `src/config/` (env-specific settings)
|
376
|
+
- Routes: `src/api/routes.js` (all endpoints defined here)
|
377
|
+
- Auth: `src/middleware/auth.js` (JWT validation)
|
376
378
|
|
377
|
-
##
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
[How data moves through the system]
|
379
|
+
## Conventions
|
380
|
+
- Files named `[entity].service.js` handle business logic
|
381
|
+
- All API routes return `{ success: boolean, data?: any, error?: string }`
|
382
|
+
- Database migrations in `migrations/` - run before adding models
|
382
383
|
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
384
|
+
## Important Notes
|
385
|
+
- Payment webhooks MUST be idempotent (check `processedWebhooks` table)
|
386
|
+
- User emails are case-insensitive (lowercase in DB)
|
387
|
+
- Order status transitions enforced in `Order.beforeUpdate` hook
|
388
|
+
````""",
|
387
389
|
inputSchema={
|
388
390
|
"type": "object",
|
389
391
|
"properties": {
|
390
392
|
"projectName": {"type": "string", "description": "The name of the project"},
|
391
393
|
"folderPath": {"type": "string", "description": "Absolute path to the project folder on disk"},
|
392
|
-
|
393
|
-
"overview": {"type": "string", "description": "Comprehensive narrative overview of the codebase (10-30k tokens recommended)"}
|
394
|
+
"overview": {"type": "string", "description": "Concise codebase overview (aim for 3500-7500 words / 5k-10k tokens)"}
|
394
395
|
},
|
395
396
|
"required": ["projectName", "folderPath", "overview"],
|
396
397
|
"additionalProperties": False
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-code-indexer
|
3
|
-
Version: 3.1.
|
3
|
+
Version: 3.1.4
|
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.
|
@@ -14,7 +14,7 @@ mcp_code_indexer/token_counter.py,sha256=WrifOkbF99nWWHlRlhCHAB2KN7qr83GOHl7apE-
|
|
14
14
|
mcp_code_indexer/data/stop_words_english.txt,sha256=7Zdd9ameVgA6tN_zuXROvHXD4hkWeELVywPhb7FJEkw,6343
|
15
15
|
mcp_code_indexer/database/__init__.py,sha256=aPq_aaRp0aSwOBIq9GkuMNjmLxA411zg2vhdrAuHm-w,38
|
16
16
|
mcp_code_indexer/database/connection_health.py,sha256=s2r9L_KipH5NlemAUDnhBQO90Dn4b_0Ht9UDs7F6QPk,24432
|
17
|
-
mcp_code_indexer/database/database.py,sha256=
|
17
|
+
mcp_code_indexer/database/database.py,sha256=1DxjTlSI-Pdzz5mLqHffS_lYjXamdu7u5OGu78Tp46k,46792
|
18
18
|
mcp_code_indexer/database/exceptions.py,sha256=AgpRA9Z5R-GoWYdQSPeSdYvAXDopFCQkLGN3jD7Ha4E,10215
|
19
19
|
mcp_code_indexer/database/models.py,sha256=t4HJ2HJfRzMWt0kHjfLEh8p_ecqdQIdej5LyQYUqpsI,6858
|
20
20
|
mcp_code_indexer/database/retry_executor.py,sha256=QUayjkCk8OsckVMYiJ_HBQ9NTUss-H8GQeUIUbbw4_U,13419
|
@@ -26,12 +26,12 @@ mcp_code_indexer/migrations/003_project_overviews.sql,sha256=pPzn7UmJ_Bda9mJ1nYT
|
|
26
26
|
mcp_code_indexer/migrations/004_remove_branch_dependency.sql,sha256=whZvj2qfba1-Xq7Vg4IfpCpIrRKN21AdtG0gZbFSRi4,6466
|
27
27
|
mcp_code_indexer/migrations/005_remove_git_remotes.sql,sha256=vT84AaV1hyN4zq5W67hR14TgAwhW7_RNtBHrCoksxA4,1299
|
28
28
|
mcp_code_indexer/server/__init__.py,sha256=16xMcuriUOBlawRqWNBk6niwrvtv_JD5xvI36X1Vsmk,41
|
29
|
-
mcp_code_indexer/server/mcp_server.py,sha256=
|
29
|
+
mcp_code_indexer/server/mcp_server.py,sha256=k8keLOigvRnAjBc1aysSQCr0goNk7zt9vLh80xBrebQ,57853
|
30
30
|
mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
|
31
31
|
mcp_code_indexer/tools/__init__.py,sha256=m01mxML2UdD7y5rih_XNhNSCMzQTz7WQ_T1TeOcYlnE,49
|
32
|
-
mcp_code_indexer-3.1.
|
33
|
-
mcp_code_indexer-3.1.
|
34
|
-
mcp_code_indexer-3.1.
|
35
|
-
mcp_code_indexer-3.1.
|
36
|
-
mcp_code_indexer-3.1.
|
37
|
-
mcp_code_indexer-3.1.
|
32
|
+
mcp_code_indexer-3.1.4.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
|
33
|
+
mcp_code_indexer-3.1.4.dist-info/METADATA,sha256=od-4mM0b86GIWInHF4amsQMCVpyI4EF1DVpPGEVjxZw,19849
|
34
|
+
mcp_code_indexer-3.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
35
|
+
mcp_code_indexer-3.1.4.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
|
36
|
+
mcp_code_indexer-3.1.4.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
|
37
|
+
mcp_code_indexer-3.1.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|