mcp-code-indexer 3.5.0__py3-none-any.whl → 3.5.1__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/main.py CHANGED
@@ -110,6 +110,12 @@ def parse_arguments() -> argparse.Namespace:
110
110
  ),
111
111
  )
112
112
 
113
+ parser.add_argument(
114
+ "--makelocal",
115
+ type=str,
116
+ help="Create local database in specified folder and migrate project data from global DB",
117
+ )
118
+
113
119
  return parser.parse_args()
114
120
 
115
121
 
@@ -837,6 +843,52 @@ def generate_project_markdown(project, overview, files, logger):
837
843
  return "\n".join(markdown_lines)
838
844
 
839
845
 
846
+ async def handle_makelocal(args: argparse.Namespace) -> None:
847
+ """Handle --makelocal command."""
848
+ try:
849
+ from .database.database_factory import DatabaseFactory
850
+ from .commands.makelocal import MakeLocalCommand
851
+
852
+ # Initialize database factory
853
+ db_path = Path(args.db_path).expanduser()
854
+ cache_dir = Path(args.cache_dir).expanduser()
855
+
856
+ # Create directories if they don't exist
857
+ db_path.parent.mkdir(parents=True, exist_ok=True)
858
+ cache_dir.mkdir(parents=True, exist_ok=True)
859
+
860
+ db_factory = DatabaseFactory(
861
+ global_db_path=db_path,
862
+ pool_size=3,
863
+ retry_count=5,
864
+ timeout=10.0,
865
+ enable_wal_mode=True,
866
+ health_check_interval=30.0,
867
+ retry_min_wait=0.1,
868
+ retry_max_wait=2.0,
869
+ retry_jitter=0.2,
870
+ )
871
+
872
+ # Initialize make local command
873
+ makelocal_cmd = MakeLocalCommand(db_factory)
874
+
875
+ # Execute the command
876
+ result = await makelocal_cmd.execute(args.makelocal)
877
+
878
+ print(f"Successfully migrated project '{result['project_name']}' to local database")
879
+ print(f"Local database created at: {result['local_database_path']}")
880
+ print(f"Migrated {result['migrated_files']} file descriptions")
881
+ if result['migrated_overview']:
882
+ print("Migrated project overview")
883
+
884
+ # Close all database connections
885
+ await db_factory.close_all()
886
+
887
+ except Exception as e:
888
+ print(f"Make local command error: {e}", file=sys.stderr)
889
+ sys.exit(1)
890
+
891
+
840
892
  async def main() -> None:
841
893
  """Main entry point for the MCP server."""
842
894
  args = parse_arguments()
@@ -867,6 +919,10 @@ async def main() -> None:
867
919
  await handle_map(args)
868
920
  return
869
921
 
922
+ if args.makelocal:
923
+ await handle_makelocal(args)
924
+ return
925
+
870
926
  # Setup structured logging
871
927
  log_file = (
872
928
  Path(args.cache_dir).expanduser() / "server.log" if args.cache_dir else None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mcp-code-indexer
3
- Version: 3.5.0
3
+ Version: 3.5.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
  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
- [![PyPI version](https://badge.fury.io/py/mcp-code-indexer.svg?35)](https://badge.fury.io/py/mcp-code-indexer)
44
- [![Python](https://img.shields.io/pypi/pyversions/mcp-code-indexer.svg?35)](https://pypi.org/project/mcp-code-indexer/)
43
+ [![PyPI version](https://badge.fury.io/py/mcp-code-indexer.svg?36)](https://badge.fury.io/py/mcp-code-indexer)
44
+ [![Python](https://img.shields.io/pypi/pyversions/mcp-code-indexer.svg?36)](https://pypi.org/project/mcp-code-indexer/)
45
45
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](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.
@@ -19,7 +19,7 @@ mcp_code_indexer/error_handler.py,sha256=XBjjEriq1diPTGKpHcaBh9fj88_qhuNMwPeLiTW
19
19
  mcp_code_indexer/file_scanner.py,sha256=smY1Yfxfyqb_J5RQz5ETaSgE2_syC2SUUwzJxby3Bg8,11432
20
20
  mcp_code_indexer/git_hook_handler.py,sha256=mP8uvtQFo4C6dPNSBlG4NUXwVTXofDzDpjZVSk43yzw,45542
21
21
  mcp_code_indexer/logging_config.py,sha256=hexJWw7-6QQkH_2BwtKGO1CDOtQnP8F3Yss_yHKnzE4,9816
22
- mcp_code_indexer/main.py,sha256=2T2yXG_-MIDmj1xdW85FolaOtv4vshlWjljhRSIh5IA,30800
22
+ mcp_code_indexer/main.py,sha256=ayiXfkSIXpE6K04rVQdpJvIXPRlS9XRfaBzB1nuuDqA,32621
23
23
  mcp_code_indexer/middleware/__init__.py,sha256=p-mP0pMsfiU2yajCPvokCUxUEkh_lu4XJP1LyyMW2ug,220
24
24
  mcp_code_indexer/middleware/error_middleware.py,sha256=YHd7sm4PdNPIMKD8Nub_N7WaOH2JtiqkHBbTOGyxTno,11685
25
25
  mcp_code_indexer/migrations/001_initial.sql,sha256=hIXkCP4LA_4A9HJ1CHU0a1DD-a6EN6u-uJPMqW0c2Yo,4120
@@ -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.0.dist-info/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
37
- mcp_code_indexer-3.5.0.dist-info/METADATA,sha256=2vo4ryVLHtcq_qNukXkMJCZoBT1qC_cmK5JHAd_NlB4,19359
38
- mcp_code_indexer-3.5.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
39
- mcp_code_indexer-3.5.0.dist-info/entry_points.txt,sha256=UABj7HZ0mC6rvF22gxaz2LLNLGQShTrFmp5u00iUtvo,67
40
- mcp_code_indexer-3.5.0.dist-info/RECORD,,
36
+ mcp_code_indexer-3.5.1.dist-info/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
37
+ mcp_code_indexer-3.5.1.dist-info/METADATA,sha256=4cf0IispuUS6u5he-5TcJEunzhepMq2IT0YQK4Ah2Pg,19359
38
+ mcp_code_indexer-3.5.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
39
+ mcp_code_indexer-3.5.1.dist-info/entry_points.txt,sha256=UABj7HZ0mC6rvF22gxaz2LLNLGQShTrFmp5u00iUtvo,67
40
+ mcp_code_indexer-3.5.1.dist-info/RECORD,,