codrspot-processor-mcp 0.1.0__tar.gz → 0.1.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.
Files changed (109) hide show
  1. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/LICENSE +8 -4
  2. codrspot_processor_mcp-0.1.2/PKG-INFO +266 -0
  3. codrspot_processor_mcp-0.1.2/README.md +205 -0
  4. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/pyproject.toml +1 -1
  5. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/__init__.py +1 -1
  6. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/cli/main.py +9 -1
  7. codrspot_processor_mcp-0.1.2/src/codepreproc_client/layer1_business/cli/setup.py +93 -0
  8. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/mcp/server.py +1 -2
  9. codrspot_processor_mcp-0.1.2/src/codrspot_processor_mcp.egg-info/PKG-INFO +266 -0
  10. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codrspot_processor_mcp.egg-info/SOURCES.txt +1 -0
  11. codrspot_processor_mcp-0.1.0/PKG-INFO +0 -396
  12. codrspot_processor_mcp-0.1.0/README.md +0 -339
  13. codrspot_processor_mcp-0.1.0/src/codrspot_processor_mcp.egg-info/PKG-INFO +0 -396
  14. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/setup.cfg +0 -0
  15. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/__main__.py +0 -0
  16. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/__init__.py +0 -0
  17. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/allowed_scope_cache.py +0 -0
  18. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/__init__.py +0 -0
  19. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/lease_client.py +0 -0
  20. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/net_guard.py +0 -0
  21. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/promote_client.py +0 -0
  22. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/reasoning_client.py +0 -0
  23. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/registry_client.py +0 -0
  24. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/api_client/superkg_client.py +0 -0
  25. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/cli/__init__.py +0 -0
  26. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/cli/init.py +0 -0
  27. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/config.py +0 -0
  28. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/git_utils.py +0 -0
  29. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/license/__init__.py +0 -0
  30. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/license/fingerprint.py +0 -0
  31. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/license/jwt_client.py +0 -0
  32. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/license/project_lock.py +0 -0
  33. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/local_registry.py +0 -0
  34. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/manifest/__init__.py +0 -0
  35. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/manifest/credentials.py +0 -0
  36. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/mcp/__init__.py +0 -0
  37. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/mcp/action_monitor.py +0 -0
  38. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/mcp/lifecycle.py +0 -0
  39. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/mcp/tools.py +0 -0
  40. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer1_business/project_registry.py +0 -0
  41. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/__init__.py +0 -0
  42. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/__init__.py +0 -0
  43. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/ast_graph.py +0 -0
  44. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/bm25_store.py +0 -0
  45. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/chunking/__init__.py +0 -0
  46. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/chunking/ast_chunker.py +0 -0
  47. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/chunking/languages.py +0 -0
  48. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/embed_worker.py +0 -0
  49. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/embeddings.py +0 -0
  50. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/extract/__init__.py +0 -0
  51. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/extract/compactor.py +0 -0
  52. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/extract/providers/__init__.py +0 -0
  53. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/extract/providers/base.py +0 -0
  54. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/indexer.py +0 -0
  55. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/ppl/__init__.py +0 -0
  56. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/ppl/emitter.py +0 -0
  57. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/ppl/parser.py +0 -0
  58. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/qdrant_store.py +0 -0
  59. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/scanning/__init__.py +0 -0
  60. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/scanning/manifest_scanner.py +0 -0
  61. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/scanning/md_scanner.py +0 -0
  62. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/scanning/repo_mapper.py +0 -0
  63. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/condensation/session_vector_store.py +0 -0
  64. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/coupling/__init__.py +0 -0
  65. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/coupling/domain.py +0 -0
  66. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/coupling/graph.py +0 -0
  67. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/coupling/layer2_gate.py +0 -0
  68. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/coupling/projector.py +0 -0
  69. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/coupling/resolver.py +0 -0
  70. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/__init__.py +0 -0
  71. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/pipeline/__init__.py +0 -0
  72. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/pipeline/execute_semantic.py +0 -0
  73. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/pipeline/filesystem_reorg.py +0 -0
  74. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/pipeline/patch_generator.py +0 -0
  75. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/pipeline/patch_validator.py +0 -0
  76. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/__init__.py +0 -0
  77. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/anchors.py +0 -0
  78. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/applicability.py +0 -0
  79. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/edit_planner.py +0 -0
  80. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/materializer.py +0 -0
  81. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/merger.py +0 -0
  82. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/__init__.py +0 -0
  83. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/add_import.py +0 -0
  84. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/append_argument.py +0 -0
  85. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/insert_literal.py +0 -0
  86. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/remove_import.py +0 -0
  87. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/remove_statement_unique.py +0 -0
  88. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/ops/rename_symbol_local.py +0 -0
  89. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/region_resolver.py +0 -0
  90. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/synthesizer.py +0 -0
  91. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/target_locator.py +0 -0
  92. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/semantic/validator.py +0 -0
  93. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/snippet/__init__.py +0 -0
  94. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/snippet/assembler.py +0 -0
  95. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/materialization/snippet/loader.py +0 -0
  96. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/retrieval/__init__.py +0 -0
  97. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/retrieval/graph_walk.py +0 -0
  98. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/retrieval/hybrid.py +0 -0
  99. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/retrieval/rerank_worker.py +0 -0
  100. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/retrieval/reranker.py +0 -0
  101. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/watcher/__init__.py +0 -0
  102. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codepreproc_client/layer2_tooling/watcher/fs_watcher.py +0 -0
  103. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codrspot_processor_mcp.egg-info/dependency_links.txt +0 -0
  104. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codrspot_processor_mcp.egg-info/entry_points.txt +0 -0
  105. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codrspot_processor_mcp.egg-info/requires.txt +0 -0
  106. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/codrspot_processor_mcp.egg-info/top_level.txt +0 -0
  107. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/contracts/__init__.py +0 -0
  108. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/contracts/dtos.py +0 -0
  109. {codrspot_processor_mcp-0.1.0 → codrspot_processor_mcp-0.1.2}/src/contracts/ir.py +0 -0
@@ -7,10 +7,14 @@ without accompanying documentation, is permitted provided that:
7
7
 
8
8
  1. The software is redistributed unmodified and in its entirety (as-is),
9
9
  retaining this license and all copyright notices.
10
- 2. No person or entity may modify, create derivative works from, decompile,
11
- reverse-engineer, or otherwise alter the functionality of this software,
12
- in whole or in part, without prior written consent from the copyright
13
- holder.
10
+ 2. No person or entity may distribute, publish, sublicense, or otherwise
11
+ make available to any third party, in whole or in part, any modified
12
+ version or derivative work of this software (including but not limited
13
+ to versions that have been altered, decompiled, reverse-engineered, or
14
+ otherwise changed in functionality), without prior written consent from
15
+ the copyright holder. This restriction applies to distribution only;
16
+ it does not prohibit creating modifications for private, non-distributed
17
+ use.
14
18
  3. This license text is included, unaltered, with every copy or substantial
15
19
  portion of the software that is redistributed.
16
20
 
@@ -0,0 +1,266 @@
1
+ Metadata-Version: 2.4
2
+ Name: codrspot-processor-mcp
3
+ Version: 0.1.2
4
+ Summary: Local MCP server exposing codepreproc's code-context tools to Claude Code
5
+ Author-email: alexlqi <alexlqi@gmail.com>
6
+ License: Copyright (c) 2026 alexlqi (alexlqi@gmail.com)
7
+
8
+ All rights reserved.
9
+
10
+ Redistribution and use of this software, in source or binary form, with or
11
+ without accompanying documentation, is permitted provided that:
12
+
13
+ 1. The software is redistributed unmodified and in its entirety (as-is),
14
+ retaining this license and all copyright notices.
15
+ 2. No person or entity may distribute, publish, sublicense, or otherwise
16
+ make available to any third party, in whole or in part, any modified
17
+ version or derivative work of this software (including but not limited
18
+ to versions that have been altered, decompiled, reverse-engineered, or
19
+ otherwise changed in functionality), without prior written consent from
20
+ the copyright holder. This restriction applies to distribution only;
21
+ it does not prohibit creating modifications for private, non-distributed
22
+ use.
23
+ 3. This license text is included, unaltered, with every copy or substantial
24
+ portion of the software that is redistributed.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
32
+ IN THE SOFTWARE.
33
+
34
+ Classifier: Programming Language :: Python :: 3.12
35
+ Classifier: Operating System :: Microsoft :: Windows
36
+ Classifier: License :: Other/Proprietary License
37
+ Requires-Python: <3.13,>=3.12
38
+ Description-Content-Type: text/markdown
39
+ License-File: LICENSE
40
+ Requires-Dist: anyio
41
+ Requires-Dist: python-dotenv
42
+ Requires-Dist: bm25s
43
+ Requires-Dist: filelock
44
+ Requires-Dist: gitpython
45
+ Requires-Dist: httpx
46
+ Requires-Dist: mcp
47
+ Requires-Dist: numpy
48
+ Requires-Dist: openai
49
+ Requires-Dist: pydantic>=2
50
+ Requires-Dist: pyyaml
51
+ Requires-Dist: qdrant-client[fastembed]>=1.10.0
52
+ Requires-Dist: sentence-transformers
53
+ Requires-Dist: torch
54
+ Requires-Dist: tree-sitter
55
+ Requires-Dist: tree-sitter-languages
56
+ Requires-Dist: watchdog
57
+ Requires-Dist: xxhash
58
+ Requires-Dist: pyahocorasick
59
+ Requires-Dist: zstandard
60
+ Dynamic: license-file
61
+
62
+ # codrspot-processor-mcp
63
+
64
+ A local MCP (Model Context Protocol) client that connects Claude Code to your
65
+ indexed repositories, giving it code-context retrieval and patch-generation
66
+ tools for a project registered with a codrspot-processor server.
67
+
68
+ This package is the **client** only. It talks to a codrspot-processor server
69
+ over its HTTP API; it does not include or require running the server itself.
70
+
71
+ ## Requirements
72
+
73
+ - Python 3.12 (3.13 is not supported)
74
+ - A reachable codrspot-processor server instance and its base URL
75
+ - A `credentials.yaml` manifest issued by your server operator (used to mint
76
+ a JWT for each project you register)
77
+ - An OpenAI-compatible LLM endpoint (a local server or `OPENAI_API_KEY` for a
78
+ remote provider)
79
+
80
+ No local Qdrant install is needed — the client keeps its own embedded,
81
+ file-backed vector store for source chunks.
82
+
83
+ ## 1. Install
84
+
85
+ Pick a permanent install location — this becomes `CODEPREPROC_HOME`. Claude
86
+ Code's default expectation is `%USERPROFILE%\.codepreproc` on Windows, or
87
+ `$HOME/.codepreproc` on macOS/Linux:
88
+
89
+ **Windows (PowerShell)**
90
+
91
+ ```powershell
92
+ mkdir "$env:USERPROFILE\.codepreproc"
93
+ cd "$env:USERPROFILE\.codepreproc"
94
+ python -m venv .venv
95
+ .\.venv\Scripts\Activate.ps1
96
+ python -m pip install --upgrade pip
97
+ python -m pip install codrspot-processor-mcp
98
+ ```
99
+
100
+ This installs the `codepreproc` and `codepreproc-mcp` console scripts into
101
+ `.venv\Scripts\`. To upgrade later:
102
+
103
+ ```powershell
104
+ python -m pip install --upgrade codrspot-processor-mcp
105
+ ```
106
+
107
+ **macOS/Linux (bash/zsh)**
108
+
109
+ ```bash
110
+ mkdir -p "$HOME/.codepreproc"
111
+ cd "$HOME/.codepreproc"
112
+ python3 -m venv .venv
113
+ source .venv/bin/activate
114
+ python -m pip install --upgrade pip
115
+ python -m pip install codrspot-processor-mcp
116
+ ```
117
+
118
+ This installs the `codepreproc` and `codepreproc-mcp` console scripts into
119
+ `.venv/bin/`. To upgrade later:
120
+
121
+ ```bash
122
+ python -m pip install --upgrade codrspot-processor-mcp
123
+ ```
124
+
125
+ Then run `codepreproc setup` to scaffold `CODEPREPROC_HOME` (`indexes/`,
126
+ `logs/`, a starter `.env`) and print the Claude Code `mcp.json` snippet with
127
+ the exe path already resolved. Safe to re-run — it never overwrites an
128
+ existing `.env`.
129
+
130
+ ## 2. Configure the environment
131
+
132
+ Create a `.env` file in `%CODEPREPROC_HOME%` (`$CODEPREPROC_HOME` on
133
+ macOS/Linux) with at least:
134
+
135
+ ```dotenv
136
+ CODEPREPROC_SERVER_URL=https://your-codrspot-processor-server-host:8443
137
+ OPENAI_API_KEY=sk-... # if using a remote LLM policy
138
+ ```
139
+
140
+ Also place the `credentials.yaml` your server operator gave you at
141
+ `%CODEPREPROC_HOME%\credentials.yaml` (`$CODEPREPROC_HOME/credentials.yaml`
142
+ on macOS/Linux), or point `CODEPREPROC_CREDENTIALS` at a different path.
143
+
144
+ `.env` is loaded automatically from `%CODEPREPROC_HOME%` (defaults to
145
+ `%USERPROFILE%\.codepreproc` on Windows, `$HOME/.codepreproc` on
146
+ macOS/Linux, if unset).
147
+
148
+ ## 3. Register your project(s)
149
+
150
+ From inside each repo you want indexed:
151
+
152
+ **Windows (PowerShell)**
153
+
154
+ ```powershell
155
+ cd D:\path\to\your\repo
156
+ & "$env:USERPROFILE\.codepreproc\.venv\Scripts\codepreproc.exe" init
157
+ ```
158
+
159
+ **macOS/Linux (bash/zsh)**
160
+
161
+ ```bash
162
+ cd /path/to/your/repo
163
+ "$HOME/.codepreproc/.venv/bin/codepreproc" init
164
+ ```
165
+
166
+ This scans the repo, mints a JWT for it from `credentials.yaml`, and
167
+ registers it with your server over the API. Running it again on an
168
+ already-registered project is a no-op.
169
+
170
+ ## 4. Register the MCP server in Claude Code
171
+
172
+ Add this to your Claude Code MCP configuration (project `.mcp.json` or
173
+ global settings).
174
+
175
+ **Windows**
176
+
177
+ ```json
178
+ {
179
+ "mcpServers": {
180
+ "codepreproc": {
181
+ "command": "C:\\Users\\<username>\\.codepreproc\\.venv\\Scripts\\codepreproc-mcp.exe"
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ Replace `<username>` with your actual Windows username, and adjust the path
188
+ if you installed into a folder other than `%USERPROFILE%\.codepreproc`.
189
+
190
+ **macOS/Linux**
191
+
192
+ ```json
193
+ {
194
+ "mcpServers": {
195
+ "codepreproc": {
196
+ "command": "/home/<username>/.codepreproc/.venv/bin/codepreproc-mcp"
197
+ }
198
+ }
199
+ }
200
+ ```
201
+
202
+ Replace `<username>` with your actual username (on macOS this is typically
203
+ under `/Users/<username>`), and adjust the path if you installed into a
204
+ folder other than `$HOME/.codepreproc`.
205
+
206
+ ## 5. Restart Claude Code and verify
207
+
208
+ Restart Claude Code (or reload the MCP connection), then run:
209
+
210
+ - `list_projects` — should show the project(s) registered in step 3
211
+ - `reindex` with `{"project": "<your-project>", "full": true}` — builds the
212
+ index the first time
213
+ - `project_status` — confirms the index is healthy and up to date
214
+
215
+ If the connection fails before it finishes initializing, check
216
+ `%USERPROFILE%\.codepreproc\logs\mcp_server.log` (`$HOME/.codepreproc/logs/mcp_server.log`
217
+ on macOS/Linux) — set `CODEPREPROC_MCP_CONNECTION_VERBOSITY=verbose` in
218
+ `.env` for more detail.
219
+
220
+ ## Available tools
221
+
222
+ Once connected, Claude Code gets access to these MCP tools:
223
+
224
+ **Projects and index**
225
+ - `list_projects` — list registered projects and index status
226
+ - `switch_project` — set the active project for the session
227
+ - `reindex` — run a full or incremental reindex
228
+ - `project_status` — report index health and git sync state
229
+
230
+ **Code changes**
231
+ - `analyze_request` — turn a natural-language prompt into a validated patch
232
+ - `preview_semantic_plan` — inspect the cached edit plan for a task
233
+ - `preview_patch` — view the generated patch as a unified diff
234
+ - `validate_patch` — check a patch's structural validity
235
+ - `disambiguate_region` — resolve an ambiguous edit target
236
+ - `apply_patch` — apply a validated patch to the repo
237
+
238
+ **Filesystem reorganization**
239
+ - `analyze_filesystem_reorg` — plan file/directory moves and renames
240
+ - `preview_filesystem_plan` — inspect a cached reorg plan
241
+ - `apply_filesystem_plan` — apply a reorg plan
242
+
243
+ **Search and documentation**
244
+ - `search_context` — hybrid semantic search over the indexed repo
245
+ - `generate_document` — generate a Markdown document from retrieved context
246
+
247
+ **Snippets**
248
+ - `list_snippets` — list available code snippets/templates
249
+ - `assemble_from_snippets` — generate new code from templates for a target
250
+ framework
251
+
252
+ **LLM usage**
253
+ - `usage_report` — summarize accumulated LLM cost/usage
254
+ - `set_llm_policy` — override the LLM routing policy for the session
255
+
256
+ ## Useful environment variables
257
+
258
+ - `CODEPREPROC_HOME`
259
+ - `CODEPREPROC_SERVER_URL`
260
+ - `CODEPREPROC_CREDENTIALS`
261
+ - `CODEPREPROC_MCP_CONNECTION_VERBOSITY` (`off`, `basic`, `verbose`)
262
+ - `CODEPREPROC_DEBUG`
263
+
264
+ ## License
265
+
266
+ See [LICENSE](LICENSE).
@@ -0,0 +1,205 @@
1
+ # codrspot-processor-mcp
2
+
3
+ A local MCP (Model Context Protocol) client that connects Claude Code to your
4
+ indexed repositories, giving it code-context retrieval and patch-generation
5
+ tools for a project registered with a codrspot-processor server.
6
+
7
+ This package is the **client** only. It talks to a codrspot-processor server
8
+ over its HTTP API; it does not include or require running the server itself.
9
+
10
+ ## Requirements
11
+
12
+ - Python 3.12 (3.13 is not supported)
13
+ - A reachable codrspot-processor server instance and its base URL
14
+ - A `credentials.yaml` manifest issued by your server operator (used to mint
15
+ a JWT for each project you register)
16
+ - An OpenAI-compatible LLM endpoint (a local server or `OPENAI_API_KEY` for a
17
+ remote provider)
18
+
19
+ No local Qdrant install is needed — the client keeps its own embedded,
20
+ file-backed vector store for source chunks.
21
+
22
+ ## 1. Install
23
+
24
+ Pick a permanent install location — this becomes `CODEPREPROC_HOME`. Claude
25
+ Code's default expectation is `%USERPROFILE%\.codepreproc` on Windows, or
26
+ `$HOME/.codepreproc` on macOS/Linux:
27
+
28
+ **Windows (PowerShell)**
29
+
30
+ ```powershell
31
+ mkdir "$env:USERPROFILE\.codepreproc"
32
+ cd "$env:USERPROFILE\.codepreproc"
33
+ python -m venv .venv
34
+ .\.venv\Scripts\Activate.ps1
35
+ python -m pip install --upgrade pip
36
+ python -m pip install codrspot-processor-mcp
37
+ ```
38
+
39
+ This installs the `codepreproc` and `codepreproc-mcp` console scripts into
40
+ `.venv\Scripts\`. To upgrade later:
41
+
42
+ ```powershell
43
+ python -m pip install --upgrade codrspot-processor-mcp
44
+ ```
45
+
46
+ **macOS/Linux (bash/zsh)**
47
+
48
+ ```bash
49
+ mkdir -p "$HOME/.codepreproc"
50
+ cd "$HOME/.codepreproc"
51
+ python3 -m venv .venv
52
+ source .venv/bin/activate
53
+ python -m pip install --upgrade pip
54
+ python -m pip install codrspot-processor-mcp
55
+ ```
56
+
57
+ This installs the `codepreproc` and `codepreproc-mcp` console scripts into
58
+ `.venv/bin/`. To upgrade later:
59
+
60
+ ```bash
61
+ python -m pip install --upgrade codrspot-processor-mcp
62
+ ```
63
+
64
+ Then run `codepreproc setup` to scaffold `CODEPREPROC_HOME` (`indexes/`,
65
+ `logs/`, a starter `.env`) and print the Claude Code `mcp.json` snippet with
66
+ the exe path already resolved. Safe to re-run — it never overwrites an
67
+ existing `.env`.
68
+
69
+ ## 2. Configure the environment
70
+
71
+ Create a `.env` file in `%CODEPREPROC_HOME%` (`$CODEPREPROC_HOME` on
72
+ macOS/Linux) with at least:
73
+
74
+ ```dotenv
75
+ CODEPREPROC_SERVER_URL=https://your-codrspot-processor-server-host:8443
76
+ OPENAI_API_KEY=sk-... # if using a remote LLM policy
77
+ ```
78
+
79
+ Also place the `credentials.yaml` your server operator gave you at
80
+ `%CODEPREPROC_HOME%\credentials.yaml` (`$CODEPREPROC_HOME/credentials.yaml`
81
+ on macOS/Linux), or point `CODEPREPROC_CREDENTIALS` at a different path.
82
+
83
+ `.env` is loaded automatically from `%CODEPREPROC_HOME%` (defaults to
84
+ `%USERPROFILE%\.codepreproc` on Windows, `$HOME/.codepreproc` on
85
+ macOS/Linux, if unset).
86
+
87
+ ## 3. Register your project(s)
88
+
89
+ From inside each repo you want indexed:
90
+
91
+ **Windows (PowerShell)**
92
+
93
+ ```powershell
94
+ cd D:\path\to\your\repo
95
+ & "$env:USERPROFILE\.codepreproc\.venv\Scripts\codepreproc.exe" init
96
+ ```
97
+
98
+ **macOS/Linux (bash/zsh)**
99
+
100
+ ```bash
101
+ cd /path/to/your/repo
102
+ "$HOME/.codepreproc/.venv/bin/codepreproc" init
103
+ ```
104
+
105
+ This scans the repo, mints a JWT for it from `credentials.yaml`, and
106
+ registers it with your server over the API. Running it again on an
107
+ already-registered project is a no-op.
108
+
109
+ ## 4. Register the MCP server in Claude Code
110
+
111
+ Add this to your Claude Code MCP configuration (project `.mcp.json` or
112
+ global settings).
113
+
114
+ **Windows**
115
+
116
+ ```json
117
+ {
118
+ "mcpServers": {
119
+ "codepreproc": {
120
+ "command": "C:\\Users\\<username>\\.codepreproc\\.venv\\Scripts\\codepreproc-mcp.exe"
121
+ }
122
+ }
123
+ }
124
+ ```
125
+
126
+ Replace `<username>` with your actual Windows username, and adjust the path
127
+ if you installed into a folder other than `%USERPROFILE%\.codepreproc`.
128
+
129
+ **macOS/Linux**
130
+
131
+ ```json
132
+ {
133
+ "mcpServers": {
134
+ "codepreproc": {
135
+ "command": "/home/<username>/.codepreproc/.venv/bin/codepreproc-mcp"
136
+ }
137
+ }
138
+ }
139
+ ```
140
+
141
+ Replace `<username>` with your actual username (on macOS this is typically
142
+ under `/Users/<username>`), and adjust the path if you installed into a
143
+ folder other than `$HOME/.codepreproc`.
144
+
145
+ ## 5. Restart Claude Code and verify
146
+
147
+ Restart Claude Code (or reload the MCP connection), then run:
148
+
149
+ - `list_projects` — should show the project(s) registered in step 3
150
+ - `reindex` with `{"project": "<your-project>", "full": true}` — builds the
151
+ index the first time
152
+ - `project_status` — confirms the index is healthy and up to date
153
+
154
+ If the connection fails before it finishes initializing, check
155
+ `%USERPROFILE%\.codepreproc\logs\mcp_server.log` (`$HOME/.codepreproc/logs/mcp_server.log`
156
+ on macOS/Linux) — set `CODEPREPROC_MCP_CONNECTION_VERBOSITY=verbose` in
157
+ `.env` for more detail.
158
+
159
+ ## Available tools
160
+
161
+ Once connected, Claude Code gets access to these MCP tools:
162
+
163
+ **Projects and index**
164
+ - `list_projects` — list registered projects and index status
165
+ - `switch_project` — set the active project for the session
166
+ - `reindex` — run a full or incremental reindex
167
+ - `project_status` — report index health and git sync state
168
+
169
+ **Code changes**
170
+ - `analyze_request` — turn a natural-language prompt into a validated patch
171
+ - `preview_semantic_plan` — inspect the cached edit plan for a task
172
+ - `preview_patch` — view the generated patch as a unified diff
173
+ - `validate_patch` — check a patch's structural validity
174
+ - `disambiguate_region` — resolve an ambiguous edit target
175
+ - `apply_patch` — apply a validated patch to the repo
176
+
177
+ **Filesystem reorganization**
178
+ - `analyze_filesystem_reorg` — plan file/directory moves and renames
179
+ - `preview_filesystem_plan` — inspect a cached reorg plan
180
+ - `apply_filesystem_plan` — apply a reorg plan
181
+
182
+ **Search and documentation**
183
+ - `search_context` — hybrid semantic search over the indexed repo
184
+ - `generate_document` — generate a Markdown document from retrieved context
185
+
186
+ **Snippets**
187
+ - `list_snippets` — list available code snippets/templates
188
+ - `assemble_from_snippets` — generate new code from templates for a target
189
+ framework
190
+
191
+ **LLM usage**
192
+ - `usage_report` — summarize accumulated LLM cost/usage
193
+ - `set_llm_policy` — override the LLM routing policy for the session
194
+
195
+ ## Useful environment variables
196
+
197
+ - `CODEPREPROC_HOME`
198
+ - `CODEPREPROC_SERVER_URL`
199
+ - `CODEPREPROC_CREDENTIALS`
200
+ - `CODEPREPROC_MCP_CONNECTION_VERBOSITY` (`off`, `basic`, `verbose`)
201
+ - `CODEPREPROC_DEBUG`
202
+
203
+ ## License
204
+
205
+ See [LICENSE](LICENSE).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codrspot-processor-mcp"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "Local MCP server exposing codepreproc's code-context tools to Claude Code"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12,<3.13"
@@ -11,4 +11,4 @@ os.environ.setdefault("GIT_PYTHON_REFRESH", "warn")
11
11
 
12
12
  __all__ = ["__version__"]
13
13
 
14
- __version__ = "0.1.0"
14
+ __version__ = "0.1.2"
@@ -22,6 +22,9 @@ _USAGE = """\
22
22
  Usage: codepreproc <command> [options]
23
23
 
24
24
  Commands:
25
+ setup Scaffold CODEPREPROC_HOME (indexes/, logs/, .env) after a
26
+ fresh pip install, and print the Claude Code MCP config
27
+ snippet.
25
28
  init [PATH] Scan PATH (default: CWD), mint a JWT for it, and register it
26
29
  with codepreproc-server over the API.
27
30
  Requires credentials.yaml and CODEPREPROC_SERVER_URL to be set.
@@ -45,7 +48,12 @@ def run() -> None:
45
48
 
46
49
  command = args[0]
47
50
 
48
- if command == "init":
51
+ if command == "setup":
52
+ from codepreproc_client.layer1_business.cli.setup import setup_environment
53
+
54
+ sys.exit(setup_environment())
55
+
56
+ elif command == "init":
49
57
  from codepreproc_client.layer1_business.cli.init import init_project
50
58
 
51
59
  path: Path | None = None
@@ -0,0 +1,93 @@
1
+ """codepreproc setup: scaffold CODEPREPROC_HOME after a fresh pip install."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import shutil
6
+ import sys
7
+ from pathlib import Path
8
+
9
+ _MINIMAL_ENV = """\
10
+ CODEPREPROC_SERVER_URL=https://your-codepreproc-server-host:8443
11
+ OPENAI_API_KEY=
12
+ """
13
+
14
+
15
+ def _find_env_example() -> Path | None:
16
+ """Locate the packaged .env.example, if it shipped with this install."""
17
+ here = Path(__file__).resolve()
18
+ for parent in here.parents:
19
+ candidate = parent / ".env.example"
20
+ if candidate.exists():
21
+ return candidate
22
+ return None
23
+
24
+
25
+ def _mcp_json_snippet(mcp_exe: Path) -> str:
26
+ escaped = str(mcp_exe).replace("\\", "\\\\")
27
+ return (
28
+ "{\n"
29
+ ' "mcpServers": {\n'
30
+ ' "codepreproc": {\n'
31
+ f' "command": "{escaped}"\n'
32
+ " }\n"
33
+ " }\n"
34
+ "}"
35
+ )
36
+
37
+
38
+ def setup_environment(verbose: bool = True) -> int:
39
+ """Scaffold CODEPREPROC_HOME (dirs + .env) and print the Claude Code config snippet.
40
+
41
+ Returns an exit code (always 0 — this only creates missing local files).
42
+ """
43
+ from codepreproc_client.layer1_business.config import get_settings
44
+
45
+ settings = get_settings()
46
+ home_dir = settings.home_dir
47
+
48
+ created: list[str] = []
49
+ already_present: list[str] = []
50
+
51
+ for label, path in (("home", home_dir), ("indexes", settings.indexes_dir), ("logs", settings.logs_dir)):
52
+ if path.exists():
53
+ already_present.append(f"{label} ({path})")
54
+ else:
55
+ path.mkdir(parents=True, exist_ok=True)
56
+ created.append(f"{label} ({path})")
57
+
58
+ env_path = home_dir / ".env"
59
+ if env_path.exists():
60
+ already_present.append(f".env ({env_path})")
61
+ else:
62
+ example = _find_env_example()
63
+ if example is not None:
64
+ shutil.copyfile(example, env_path)
65
+ else:
66
+ env_path.write_text(_MINIMAL_ENV, encoding="utf-8")
67
+ created.append(f".env ({env_path})")
68
+
69
+ if verbose:
70
+ if created:
71
+ print("Created:")
72
+ for item in created:
73
+ print(f" {item}")
74
+ if already_present:
75
+ print("Already present (left untouched):")
76
+ for item in already_present:
77
+ print(f" {item}")
78
+
79
+ exe_suffix = ".exe" if sys.platform == "win32" else ""
80
+ mcp_exe = Path(sys.executable).parent / f"codepreproc-mcp{exe_suffix}"
81
+
82
+ print(
83
+ "\nNext steps:\n"
84
+ f" 1. Edit {env_path} — set CODEPREPROC_SERVER_URL (and OPENAI_API_KEY if using a remote LLM policy).\n"
85
+ f" 2. Place credentials.yaml at {home_dir / 'credentials.yaml'} "
86
+ "(or point CODEPREPROC_CREDENTIALS at a different path).\n"
87
+ " 3. From each repo you want indexed, run 'codepreproc init'.\n"
88
+ " 4. Add this to your Claude Code MCP configuration:\n"
89
+ )
90
+ print(_mcp_json_snippet(mcp_exe))
91
+ print(f"\n 5. Restart Claude Code, then run 'reindex' on your project.")
92
+
93
+ return 0
@@ -3,7 +3,6 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import asyncio
6
- import importlib.metadata
7
6
  import json
8
7
  import logging
9
8
  import os
@@ -633,7 +632,7 @@ async def main() -> None:
633
632
  finally:
634
633
  await monitor.close()
635
634
 
636
- version = importlib.metadata.version("codepreproc")
635
+ from codepreproc_client import __version__ as version
637
636
  try:
638
637
  async with stdio_server() as (read_stream, write_stream):
639
638
  await server.run(