Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ deploy/eks-cdk/
ctx_config.json
/deploy/eks-cdk
/deploy/eks-cdk-PATHFUL
.env
15 changes: 15 additions & 0 deletions .indexignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,18 @@ cosqa*.json
# dev-workspace contains uploaded client workspaces - they get indexed
# separately via upload service, not as part of the main Context-Engine repo
dev-workspace/

# CDK/deploy build artifacts - duplicates of source files
deploy/eks-cdk-*/cdk.out/
**/cdk.out/

# Build/dist artifacts
dist/
build/
*.egg-info/

# IDE/editor artifacts
.idea/
.vscode/
*.swp
*.swo
2 changes: 1 addition & 1 deletion ctx-mcp-bridge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@context-engine-bridge/context-engine-mcp-bridge",
"version": "0.0.16",
"version": "0.0.17",
"description": "Context Engine MCP bridge (http/stdio proxy combining indexer + memory servers)",
"bin": {
"ctxce": "bin/ctxce.js",
Expand Down
3 changes: 2 additions & 1 deletion ctx-mcp-bridge/src/mcpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ function selectClientForTool(name, indexerClient, memoryClient) {
return indexerClient;
}
const lowered = name.toLowerCase();
if (memoryClient && (lowered.startsWith("memory.") || lowered.startsWith("mcp_memory_"))) {
// Route to memory server for any memory-prefixed tool
if (memoryClient && lowered.startsWith("memory")) {
return memoryClient;
}
return indexerClient;
Expand Down
5 changes: 5 additions & 0 deletions deploy/helm/context-engine/templates/mcp-memory-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ spec:
- name: work-volume
mountPath: /work
readOnly: true
- name: codebase-volume
mountPath: /work/.codebase
- name: metadata-volume
mountPath: /tmp/rerank_weights
subPath: rerank_weights
Expand All @@ -117,6 +119,9 @@ spec:
- name: work-volume
persistentVolumeClaim:
claimName: {{ .Values.persistence.codeRepos.name }}
- name: codebase-volume
persistentVolumeClaim:
claimName: {{ .Values.persistence.codeMetadata.name }}
- name: metadata-volume
persistentVolumeClaim:
claimName: {{ .Values.persistence.codeMetadata.name }}
Expand Down
37 changes: 22 additions & 15 deletions deploy/helm/context-engine/values-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,61 +52,68 @@ mcpIndexerHttp:
replicas: 1
resources:
requests:
cpu: 250m
cpu: 500m
memory: 8Gi
limits:
cpu: "1"
cpu: "2"
memory: 16Gi
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 4
maxReplicas: 2

# MCP Memory HTTP
mcpMemoryHttp:
enabled: true
replicas: 1
resources:
requests:
cpu: 250m
memory: 512Mi
cpu: 500m
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
cpu: "1500m"
memory: 3Gi
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
maxReplicas: 1

# Upload Service
uploadService:
enabled: true
replicas: 1
resources:
requests:
cpu: 250m
memory: 1Gi
limits:
cpu: "1500m"
memory: 3Gi
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
maxReplicas: 2

# Watcher
watcher:
enabled: true
replicas: 1
replicas: 2
resources:
requests:
cpu: 500m
memory: 2Gi
memory: 3Gi
limits:
cpu: "2"
memory: 8Gi
cpu: "2500m"
memory: 10Gi

# Learning Reranker Worker
# Learning Reranker Worker (singleton - only 1 can run due to leader election)
learningRerankerWorker:
enabled: true
replicas: 1
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
maxReplicas: 1

# Persistence - shared PVCs
persistence:
Expand Down
38 changes: 19 additions & 19 deletions deploy/helm/context-engine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ mcpIndexerHttp:
# -- Resource requests and limits
resources:
requests:
cpu: 250m
cpu: 500m
memory: 8Gi
limits:
cpu: "1"
cpu: "2"
memory: 16Gi
# -- Liveness probe
livenessProbe:
Expand All @@ -167,7 +167,7 @@ mcpIndexerHttp:
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 4
maxReplicas: 2
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
# -- Topology spread constraints
Expand Down Expand Up @@ -207,11 +207,11 @@ mcpMemoryHttp:
# -- Resource requests and limits
resources:
requests:
cpu: 250m
memory: 512Mi
cpu: 500m
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
cpu: "1500m"
memory: 3Gi
# -- Liveness probe
livenessProbe:
httpGet:
Expand All @@ -230,7 +230,7 @@ mcpMemoryHttp:
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
maxReplicas: 1
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
# -- Topology spread constraints
Expand Down Expand Up @@ -273,10 +273,10 @@ uploadService:
resources:
requests:
cpu: 250m
memory: 512Mi
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
cpu: "1500m"
memory: 3Gi
# -- Environment variables
env:
UPLOAD_SERVICE_HOST: "0.0.0.0"
Expand All @@ -288,7 +288,7 @@ uploadService:
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
maxReplicas: 2
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
# -- Topology spread constraints
Expand All @@ -305,7 +305,7 @@ watcher:
# -- Enable Watcher
enabled: true
# -- Number of replicas
replicas: 1
replicas: 2
# -- Command to run
command:
- python
Expand All @@ -316,10 +316,10 @@ watcher:
resources:
requests:
cpu: 500m
memory: 2Gi
memory: 3Gi
limits:
cpu: "2"
memory: 8Gi
cpu: "2500m"
memory: 10Gi
# -- Environment variables (in addition to configmap)
env:
WATCH_ROOT: /work
Expand All @@ -343,7 +343,7 @@ watcher:
learningRerankerWorker:
# -- Enable Learning Reranker Worker
enabled: true
# -- Number of replicas
# -- Number of replicas (singleton worker with leader election - only 1 can run)
replicas: 1
# -- Command to run
command:
Expand All @@ -358,11 +358,11 @@ learningRerankerWorker:
limits:
cpu: "1"
memory: 2Gi
# -- HPA configuration
# -- HPA configuration (capped at 1 - singleton worker)
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
maxReplicas: 1
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 80
# -- Topology spread constraints
Expand Down
14 changes: 8 additions & 6 deletions deploy/kubernetes/mcp-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ spec:
command:
- sh
- -c
- mkdir -p /mnt/rerank_weights /mnt/rerank_events && chmod 777 /mnt/rerank_weights /mnt/rerank_events
- mkdir -p /work/.codebase/rerank_weights /work/.codebase/rerank_events && chmod 777 /work/.codebase/rerank_weights /work/.codebase/rerank_events
volumeMounts:
- name: metadata-volume
mountPath: /mnt
- name: codebase-volume
mountPath: /work/.codebase
containers:
- name: mcp-memory-http
image: context-engine-memory
Expand Down Expand Up @@ -108,10 +108,12 @@ spec:
- name: work-volume
mountPath: /work
readOnly: true
- name: metadata-volume
- name: codebase-volume
mountPath: /work/.codebase
- name: codebase-volume
mountPath: /tmp/rerank_weights
subPath: rerank_weights
- name: metadata-volume
- name: codebase-volume
mountPath: /tmp/rerank_events
subPath: rerank_events
livenessProbe:
Expand All @@ -133,7 +135,7 @@ spec:
- name: work-volume
persistentVolumeClaim:
claimName: code-repos-pvc
- name: metadata-volume
- name: codebase-volume
persistentVolumeClaim:
claimName: code-metadata-pvc
---
Expand Down
11 changes: 8 additions & 3 deletions deploy/kubernetes/mcp-memory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ spec:
command:
- sh
- -c
- mkdir -p /mnt/rerank_weights /mnt/rerank_events && chmod 777 /mnt/rerank_weights /mnt/rerank_events
- mkdir -p /work/.codebase/rerank_weights /work/.codebase/rerank_events && chmod 777 /work/.codebase/rerank_weights /work/.codebase/rerank_events
volumeMounts:
- name: metadata-volume
mountPath: /mnt
- name: codebase-volume
mountPath: /work/.codebase
containers:
- name: mcp-memory
image: context-engine-memory
Expand Down Expand Up @@ -85,6 +85,8 @@ spec:
- name: work-volume
mountPath: /work
readOnly: true
- name: codebase-volume
mountPath: /work/.codebase
- name: metadata-volume
mountPath: /tmp/rerank_weights
subPath: rerank_weights
Expand All @@ -110,6 +112,9 @@ spec:
- name: work-volume
persistentVolumeClaim:
claimName: code-repos-pvc
- name: codebase-volume
persistentVolumeClaim:
claimName: code-metadata-pvc
- name: metadata-volume
persistentVolumeClaim:
claimName: code-metadata-pvc
Expand Down
Loading