contextlayer-mcp-server 0.1.3__tar.gz → 0.1.4__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.
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/PKG-INFO +1 -1
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer/server.py +3 -23
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer_mcp_server.egg-info/PKG-INFO +1 -1
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/pyproject.toml +1 -1
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer/__init__.py +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer/detection.py +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer/wrapper.py +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer_mcp_server.egg-info/SOURCES.txt +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer_mcp_server.egg-info/dependency_links.txt +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer_mcp_server.egg-info/entry_points.txt +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer_mcp_server.egg-info/requires.txt +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/contextlayer_mcp_server.egg-info/top_level.txt +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/setup.cfg +0 -0
- {contextlayer_mcp_server-0.1.3 → contextlayer_mcp_server-0.1.4}/tests/test_detection.py +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""MCP server entry point. Run with: python -m contextlayer.server"""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
import sys
|
|
4
5
|
from mcp.server.mcpserver import MCPServer
|
|
5
6
|
|
|
6
7
|
from contextlayer.detection import build_project_context
|
|
@@ -18,26 +19,6 @@ def analyze_and_wrap_prompt(user_prompt: str, current_working_dir: str) -> str:
|
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
def main() -> None:
|
|
21
|
-
import anyio
|
|
22
|
-
anyio.run(mcp.run_stdio_async)
|
|
23
|
-
"""MCP server entry point. Run with: python -m contextlayer.server"""
|
|
24
|
-
from __future__ import annotations
|
|
25
|
-
import sys
|
|
26
|
-
from mcp.server.mcpserver import MCPServer
|
|
27
|
-
from contextlayer.detection import build_project_context
|
|
28
|
-
from contextlayer.wrapper import build_expert_prompt
|
|
29
|
-
|
|
30
|
-
mcp = MCPServer("ContextLayer-SE")
|
|
31
|
-
|
|
32
|
-
@mcp.tool()
|
|
33
|
-
def analyze_and_wrap_prompt(user_prompt: str, current_working_dir: str) -> str:
|
|
34
|
-
"""Detect the project's tech stack, then wrap `user_prompt` in a
|
|
35
|
-
strict senior-engineer schema before the model ever sees it."""
|
|
36
|
-
ctx = build_project_context(current_working_dir)
|
|
37
|
-
return build_expert_prompt(user_prompt, ctx)
|
|
38
|
-
|
|
39
|
-
def main() -> None:
|
|
40
|
-
# --- ONBOARDING BANNER START ---
|
|
41
22
|
banner = """
|
|
42
23
|
=======================================================
|
|
43
24
|
🚀 ContextLayer is running!
|
|
@@ -49,11 +30,10 @@ def main() -> None:
|
|
|
49
30
|
=======================================================
|
|
50
31
|
"""
|
|
51
32
|
print(banner, file=sys.stderr)
|
|
52
|
-
# --- ONBOARDING BANNER END ---
|
|
53
33
|
|
|
54
34
|
import anyio
|
|
55
35
|
anyio.run(mcp.run_stdio_async)
|
|
56
36
|
|
|
57
|
-
if __name__ == "__main__":
|
|
58
|
-
main()
|
|
59
37
|
|
|
38
|
+
if __name__ == "__main__":
|
|
39
|
+
main()
|
|
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
|