claudepod 1.1.2 → 1.2.1

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 (75) hide show
  1. package/.devcontainer/.env +18 -0
  2. package/.devcontainer/CHANGELOG.md +68 -0
  3. package/.devcontainer/CLAUDE.md +100 -0
  4. package/.devcontainer/README.md +220 -0
  5. package/.devcontainer/config/main-system-prompt.md +118 -0
  6. package/.devcontainer/config/settings.json +41 -0
  7. package/.devcontainer/devcontainer.json +71 -113
  8. package/.devcontainer/features/README.md +113 -0
  9. package/.devcontainer/features/ast-grep/README.md +24 -0
  10. package/.devcontainer/features/ast-grep/devcontainer-feature.json +24 -0
  11. package/.devcontainer/features/ast-grep/install.sh +51 -0
  12. package/.devcontainer/features/ccstatusline/README.md +296 -0
  13. package/.devcontainer/features/ccstatusline/devcontainer-feature.json +19 -0
  14. package/.devcontainer/features/ccstatusline/install.sh +290 -0
  15. package/.devcontainer/features/ccusage/README.md +205 -0
  16. package/.devcontainer/features/ccusage/devcontainer-feature.json +38 -0
  17. package/.devcontainer/features/ccusage/install.sh +132 -0
  18. package/.devcontainer/features/claude-code/README.md +498 -0
  19. package/.devcontainer/features/claude-code/config/settings.json +36 -0
  20. package/.devcontainer/features/claude-code/config/system-prompt.md +118 -0
  21. package/.devcontainer/features/claude-code/config/world-building-sp.md +1432 -0
  22. package/.devcontainer/features/claude-code/devcontainer-feature.json +42 -0
  23. package/.devcontainer/features/claude-code/install.sh +466 -0
  24. package/.devcontainer/features/claude-monitor/README.md +74 -0
  25. package/.devcontainer/features/claude-monitor/devcontainer-feature.json +38 -0
  26. package/.devcontainer/features/claude-monitor/install.sh +99 -0
  27. package/.devcontainer/features/lsp-servers/README.md +85 -0
  28. package/.devcontainer/features/lsp-servers/devcontainer-feature.json +34 -0
  29. package/.devcontainer/features/lsp-servers/install.sh +92 -0
  30. package/.devcontainer/features/mcp-qdrant/CHANGES.md +399 -0
  31. package/.devcontainer/features/mcp-qdrant/README.md +474 -0
  32. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +57 -0
  33. package/.devcontainer/features/mcp-qdrant/install.sh +295 -0
  34. package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +129 -0
  35. package/.devcontainer/features/mcp-reasoner/README.md +177 -0
  36. package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +20 -0
  37. package/.devcontainer/features/mcp-reasoner/install.sh +177 -0
  38. package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +67 -0
  39. package/.devcontainer/features/splitrail/README.md +140 -0
  40. package/.devcontainer/features/splitrail/devcontainer-feature.json +34 -0
  41. package/.devcontainer/features/splitrail/install.sh +129 -0
  42. package/.devcontainer/features/tree-sitter/README.md +138 -0
  43. package/.devcontainer/features/tree-sitter/devcontainer-feature.json +52 -0
  44. package/.devcontainer/features/tree-sitter/install.sh +173 -0
  45. package/.devcontainer/scripts/setup-aliases.sh +52 -0
  46. package/.devcontainer/scripts/setup-config.sh +28 -0
  47. package/.devcontainer/scripts/setup-irie-claude.sh +32 -0
  48. package/.devcontainer/scripts/setup-lsp.sh +20 -0
  49. package/.devcontainer/scripts/setup-plugins.sh +31 -0
  50. package/.devcontainer/scripts/setup.sh +60 -0
  51. package/README.md +153 -187
  52. package/package.json +5 -9
  53. package/setup.js +2 -2
  54. package/.devcontainer/config/claude/mcp.json +0 -76
  55. package/.devcontainer/config/claude/mcp.json.template +0 -117
  56. package/.devcontainer/config/claude/output-styles/strict-development.md +0 -158
  57. package/.devcontainer/config/claude/settings.json +0 -10
  58. package/.devcontainer/config/claude/system-prompt.md +0 -3
  59. package/.devcontainer/config/searxng/ods_config.json +0 -22
  60. package/.devcontainer/config/searxng/searxng_env_template +0 -71
  61. package/.devcontainer/config/serena/serena_config.yml +0 -72
  62. package/.devcontainer/config/taskmaster/config.json +0 -37
  63. package/.devcontainer/ods_config.json +0 -21
  64. package/.devcontainer/post-create.sh +0 -1077
  65. package/.devcontainer/post-start.sh +0 -551
  66. package/.devcontainer/sanitize-system-prompt.sh +0 -31
  67. package/.devcontainer/scripts/config/claude-core.sh +0 -210
  68. package/.devcontainer/scripts/config/searxng.sh +0 -411
  69. package/.devcontainer/scripts/config/serena.sh +0 -47
  70. package/.devcontainer/scripts/config/taskmaster.sh +0 -41
  71. package/.devcontainer/scripts/generate-mcp-config.js +0 -205
  72. package/.devcontainer/scripts/install/claude-code.sh +0 -112
  73. package/.devcontainer/scripts/shell/zsh-config.sh +0 -271
  74. package/.devcontainer/scripts/utils.sh +0 -44
  75. package/.devcontainer/setup-zsh.sh +0 -234
@@ -0,0 +1,295 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ # Import options from devcontainer-feature.json
5
+ # NOTE: DevContainer converts camelCase options to UPPERCASE without underscores
6
+ # Example: "qdrantUrl" becomes $QDRANTURL (not $QDRANT_URL)
7
+ QDRANT_URL="${QDRANTURL:-}"
8
+ QDRANT_API_KEY="${QDRANTAPIKEY:-}"
9
+ QDRANT_LOCAL_PATH="${QDRANTLOCALPATH:-/workspaces/.qdrant/storage}"
10
+ COLLECTION_NAME="${COLLECTIONNAME:-agent-memory}"
11
+ EMBEDDING_MODEL="${EMBEDDINGMODEL:-all-MiniLM-L6-v2}"
12
+ USERNAME="${USERNAME:-automatic}"
13
+
14
+ echo "[mcp-qdrant] Starting Qdrant MCP Server installation..."
15
+
16
+ # Validate input parameters
17
+ if [ -n "${QDRANT_URL}" ]; then
18
+ # Basic URL validation
19
+ if [[ ! "${QDRANT_URL}" =~ ^https?:// ]]; then
20
+ echo "[mcp-qdrant] ERROR: qdrantUrl must start with http:// or https://"
21
+ echo " Provided: ${QDRANT_URL}"
22
+ exit 1
23
+ fi
24
+ fi
25
+
26
+ if [ -n "${QDRANT_LOCAL_PATH}" ]; then
27
+ # Validate it's an absolute path
28
+ if [[ ! "${QDRANT_LOCAL_PATH}" =~ ^/ ]]; then
29
+ echo "[mcp-qdrant] ERROR: qdrantLocalPath must be an absolute path"
30
+ echo " Provided: ${QDRANT_LOCAL_PATH}"
31
+ exit 1
32
+ fi
33
+ fi
34
+
35
+ # Validate embedding model is one of the supported models
36
+ VALID_MODELS=("all-MiniLM-L6-v2" "BAAI/bge-small-en-v1.5" "sentence-transformers/all-mpnet-base-v2" "BAAI/bge-base-en-v1.5")
37
+ MODEL_VALID=false
38
+ for model in "${VALID_MODELS[@]}"; do
39
+ if [ "${EMBEDDING_MODEL}" = "${model}" ]; then
40
+ MODEL_VALID=true
41
+ break
42
+ fi
43
+ done
44
+ if [ "${MODEL_VALID}" = "false" ]; then
45
+ echo "[mcp-qdrant] WARNING: Embedding model '${EMBEDDING_MODEL}' is not in the recommended list."
46
+ echo " Continuing anyway, but this may cause issues."
47
+ fi
48
+
49
+ # Determine the user
50
+ if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
51
+ USERNAME=""
52
+ for CURRENT_USER in vscode node codespace; do
53
+ if id -u "${CURRENT_USER}" >/dev/null 2>&1; then
54
+ USERNAME=${CURRENT_USER}
55
+ break
56
+ fi
57
+ done
58
+ [ -z "${USERNAME}" ] && USERNAME=root
59
+ elif [ "${USERNAME}" = "none" ] || ! id -u "${USERNAME}" >/dev/null 2>&1; then
60
+ USERNAME=root
61
+ fi
62
+
63
+ echo "[mcp-qdrant] Installing for user: ${USERNAME}"
64
+
65
+ # Check if uvx is available
66
+ if ! command -v uvx &>/dev/null; then
67
+ echo "[mcp-qdrant] ERROR: uvx is not available. Please ensure Python feature is installed first."
68
+ exit 1
69
+ fi
70
+
71
+ # Remove hf-xet package which causes hangs in huggingface_hub downloads
72
+ # This is a known issue in containerized environments
73
+ echo "[mcp-qdrant] Removing hf-xet to prevent huggingface_hub download hangs..."
74
+ pip uninstall hf-xet -y 2>/dev/null || true
75
+
76
+ # Pre-download the embedding model from GCS (more reliable than HuggingFace Hub in containers)
77
+ # This is critical to avoid network timeouts from huggingface_hub
78
+ echo "[mcp-qdrant] Pre-downloading embedding model from GCS..."
79
+ FASTEMBED_CACHE="/tmp/fastembed_cache"
80
+ mkdir -p "${FASTEMBED_CACHE}"
81
+
82
+ # Map embedding model names to GCS URLs and legacy cache directory names
83
+ case "${EMBEDDING_MODEL}" in
84
+ "all-MiniLM-L6-v2"|"sentence-transformers/all-MiniLM-L6-v2")
85
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/sentence-transformers-all-MiniLM-L6-v2.tar.gz"
86
+ MODEL_DIR="fast-all-MiniLM-L6-v2"
87
+ HF_MODEL_NAME="sentence-transformers/all-MiniLM-L6-v2"
88
+ ;;
89
+ "BAAI/bge-small-en-v1.5")
90
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/fast-bge-small-en-v1.5.tar.gz"
91
+ MODEL_DIR="fast-bge-small-en-v1.5"
92
+ HF_MODEL_NAME="BAAI/bge-small-en-v1.5"
93
+ ;;
94
+ "BAAI/bge-base-en-v1.5")
95
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/fast-bge-base-en-v1.5.tar.gz"
96
+ MODEL_DIR="fast-bge-base-en-v1.5"
97
+ HF_MODEL_NAME="BAAI/bge-base-en-v1.5"
98
+ ;;
99
+ "sentence-transformers/all-mpnet-base-v2")
100
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/sentence-transformers-all-mpnet-base-v2.tar.gz"
101
+ MODEL_DIR="fast-all-mpnet-base-v2"
102
+ HF_MODEL_NAME="sentence-transformers/all-mpnet-base-v2"
103
+ ;;
104
+ *)
105
+ echo "[mcp-qdrant] WARNING: No GCS URL for model ${EMBEDDING_MODEL}"
106
+ MODEL_URL=""
107
+ HF_MODEL_NAME=""
108
+ ;;
109
+ esac
110
+
111
+ if [ -n "${MODEL_URL}" ]; then
112
+ if [ ! -d "${FASTEMBED_CACHE}/${MODEL_DIR}" ]; then
113
+ echo "[mcp-qdrant] Downloading ${EMBEDDING_MODEL} from GCS..."
114
+ TEMP_TAR=$(mktemp)
115
+ if curl -L "${MODEL_URL}" -o "${TEMP_TAR}" 2>/dev/null; then
116
+ tar -xzf "${TEMP_TAR}" -C "${FASTEMBED_CACHE}/" 2>/dev/null || true
117
+ # Remove macOS extended attribute files
118
+ find "${FASTEMBED_CACHE}" -name "._*" -delete 2>/dev/null || true
119
+ rm -f "${TEMP_TAR}"
120
+ # Make cache world-readable/writable since it's in /tmp
121
+ chmod -R 777 "${FASTEMBED_CACHE}" 2>/dev/null || true
122
+ echo "[mcp-qdrant] ✓ Embedding model pre-downloaded to ${FASTEMBED_CACHE}/${MODEL_DIR}"
123
+ else
124
+ echo "[mcp-qdrant] WARNING: Failed to download model from GCS"
125
+ rm -f "${TEMP_TAR}"
126
+ fi
127
+ else
128
+ echo "[mcp-qdrant] ✓ Embedding model already cached at ${FASTEMBED_CACHE}/${MODEL_DIR}"
129
+ fi
130
+ fi
131
+
132
+ # Check if mcp-server-qdrant is already available via uvx
133
+ # NOTE: Correct uvx syntax is: uvx COMMAND [ARGS], not uvx [FLAGS] COMMAND
134
+ # uvx auto-installs packages on first run, so we just verify it works
135
+ if sudo -u "${USERNAME}" bash -c 'uvx mcp-server-qdrant --help' &>/dev/null; then
136
+ echo "[mcp-qdrant] mcp-server-qdrant already available. Skipping..."
137
+ else
138
+ echo "[mcp-qdrant] mcp-server-qdrant will be cached on first use via uvx"
139
+ fi
140
+
141
+ # Prepare local storage directory if needed
142
+ if [ -z "${QDRANT_URL}" ]; then
143
+ mkdir -p "${QDRANT_LOCAL_PATH}"
144
+ if ! chown -R "${USERNAME}:${USERNAME}" "${QDRANT_LOCAL_PATH}"; then
145
+ echo "[mcp-qdrant] WARNING: Failed to set ownership on ${QDRANT_LOCAL_PATH}"
146
+ fi
147
+ fi
148
+
149
+ # Create MCP environment file for VS Code devcontainer mcpServers support
150
+ cat > /workspaces/.qdrant-mcp.env <<EOF
151
+ COLLECTION_NAME=${COLLECTION_NAME}
152
+ EMBEDDING_MODEL=${EMBEDDING_MODEL}
153
+ QDRANT_URL=${QDRANT_URL}
154
+ QDRANT_API_KEY=${QDRANT_API_KEY}
155
+ QDRANT_LOCAL_PATH=${QDRANT_LOCAL_PATH}
156
+ EOF
157
+
158
+ # Set proper permissions (secure API keys, readable by user)
159
+ chmod 600 /workspaces/.qdrant-mcp.env
160
+ echo "[mcp-qdrant] ✓ Environment file created at /workspaces/.qdrant-mcp.env"
161
+
162
+ # Create post-start hook for Claude Code registration
163
+ echo "[mcp-qdrant] Creating post-start hook for Claude Code registration..."
164
+ mkdir -p /usr/local/devcontainer-poststart.d
165
+
166
+ cat > /usr/local/devcontainer-poststart.d/50-mcp-qdrant.sh <<'HOOK_EOF'
167
+ #!/bin/bash
168
+ set -euo pipefail
169
+
170
+ echo "[mcp-qdrant] Registering Qdrant MCP server with Claude Code..."
171
+
172
+ # Load environment from .qdrant-mcp.env if it exists
173
+ if [ -f /workspaces/.qdrant-mcp.env ]; then
174
+ source /workspaces/.qdrant-mcp.env
175
+ else
176
+ echo "[mcp-qdrant] WARNING: /workspaces/.qdrant-mcp.env not found, using defaults"
177
+ COLLECTION_NAME="${COLLECTION_NAME:-agent-memory}"
178
+ EMBEDDING_MODEL="${EMBEDDING_MODEL:-all-MiniLM-L6-v2}"
179
+ QDRANT_URL="${QDRANT_URL:-}"
180
+ QDRANT_API_KEY="${QDRANT_API_KEY:-}"
181
+ QDRANT_LOCAL_PATH="${QDRANT_LOCAL_PATH:-/workspaces/.qdrant/storage}"
182
+ fi
183
+
184
+ # Ensure settings.json exists
185
+ SETTINGS_FILE="/workspaces/.claude/settings.json"
186
+ if [ ! -f "$SETTINGS_FILE" ]; then
187
+ echo "[mcp-qdrant] ERROR: $SETTINGS_FILE not found"
188
+ exit 1
189
+ fi
190
+
191
+ # Check if jq is available
192
+ if ! command -v jq &>/dev/null; then
193
+ echo "[mcp-qdrant] ERROR: jq not available"
194
+ exit 1
195
+ fi
196
+
197
+ # Build the server configuration
198
+ # HF_HUB_OFFLINE=1 prevents huggingface_hub from making network calls
199
+ # FASTEMBED_CACHE_PATH points to pre-downloaded models
200
+ if [ -n "$QDRANT_URL" ]; then
201
+ # Cloud mode with URL and API key
202
+ SERVER_CONFIG=$(jq -n \
203
+ --arg url "$QDRANT_URL" \
204
+ --arg key "$QDRANT_API_KEY" \
205
+ --arg collection "$COLLECTION_NAME" \
206
+ '{
207
+ command: "uvx",
208
+ args: ["mcp-server-qdrant"],
209
+ env: {
210
+ HF_HUB_OFFLINE: "1",
211
+ FASTEMBED_CACHE_PATH: "/tmp/fastembed_cache",
212
+ QDRANT_URL: $url,
213
+ QDRANT_API_KEY: $key,
214
+ COLLECTION_NAME: $collection
215
+ }
216
+ }')
217
+ else
218
+ # Local mode with local path
219
+ SERVER_CONFIG=$(jq -n \
220
+ --arg path "$QDRANT_LOCAL_PATH" \
221
+ --arg collection "$COLLECTION_NAME" \
222
+ '{
223
+ command: "uvx",
224
+ args: ["mcp-server-qdrant"],
225
+ env: {
226
+ HF_HUB_OFFLINE: "1",
227
+ FASTEMBED_CACHE_PATH: "/tmp/fastembed_cache",
228
+ QDRANT_LOCAL_PATH: $path,
229
+ COLLECTION_NAME: $collection
230
+ }
231
+ }')
232
+ fi
233
+
234
+ # Update settings.json - add or update qdrant server
235
+ # Create temporary file for atomic update
236
+ TEMP_FILE=$(mktemp)
237
+ jq --argjson server "$SERVER_CONFIG" \
238
+ '.mcpServers.qdrant = $server' \
239
+ "$SETTINGS_FILE" > "$TEMP_FILE"
240
+
241
+ # Verify the JSON is valid
242
+ if jq empty "$TEMP_FILE" 2>/dev/null; then
243
+ mv "$TEMP_FILE" "$SETTINGS_FILE"
244
+ echo "[mcp-qdrant] ✓ Qdrant MCP server registered in Claude Code settings"
245
+ else
246
+ echo "[mcp-qdrant] ERROR: Generated invalid JSON"
247
+ rm -f "$TEMP_FILE"
248
+ exit 1
249
+ fi
250
+
251
+ # Set proper permissions
252
+ chmod 644 "$SETTINGS_FILE"
253
+ chown vscode:vscode "$SETTINGS_FILE" 2>/dev/null || true
254
+
255
+ echo "[mcp-qdrant] ✓ Configuration complete"
256
+ HOOK_EOF
257
+
258
+ chmod +x /usr/local/devcontainer-poststart.d/50-mcp-qdrant.sh
259
+ echo "[mcp-qdrant] ✓ Post-start hook created at /usr/local/devcontainer-poststart.d/50-mcp-qdrant.sh"
260
+
261
+ echo ""
262
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
263
+ echo " Qdrant MCP Server Installation Complete"
264
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
265
+ echo ""
266
+ echo "Configuration:"
267
+ if [ -n "${QDRANT_URL}" ]; then
268
+ echo " • Mode: Qdrant Cloud"
269
+ echo " • URL: ${QDRANT_URL}"
270
+ if [ -n "${QDRANT_API_KEY}" ]; then
271
+ echo " • API Key: [set]"
272
+ else
273
+ echo " • API Key: [not set]"
274
+ fi
275
+ else
276
+ echo " • Mode: Local Storage"
277
+ echo " • Path: ${QDRANT_LOCAL_PATH}"
278
+ fi
279
+ echo " • Collection: ${COLLECTION_NAME}"
280
+ echo " • Embedding Model: ${EMBEDDING_MODEL}"
281
+ echo " • User: ${USERNAME}"
282
+ echo ""
283
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
284
+ echo " Next Steps"
285
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
286
+ echo ""
287
+ echo "1. Verify installation:"
288
+ echo " uvx mcp-server-qdrant --help"
289
+ echo ""
290
+ echo "2. MCP server will auto-register with Claude Code on container start"
291
+ echo ""
292
+ echo "3. Test with your AI agent:"
293
+ echo " 'Store this in my Qdrant collection: Hello World'"
294
+ echo ""
295
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@@ -0,0 +1,129 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ echo "[mcp-qdrant] Registering Qdrant MCP server with Claude Code..."
5
+
6
+ # Ensure embedding model is cached (may be lost after container restart if /tmp is cleared)
7
+ FASTEMBED_CACHE="/tmp/fastembed_cache"
8
+ EMBEDDING_MODEL="${EMBEDDING_MODEL:-all-MiniLM-L6-v2}"
9
+
10
+ # Map embedding model to GCS URL and directory name
11
+ case "${EMBEDDING_MODEL}" in
12
+ "all-MiniLM-L6-v2"|"sentence-transformers/all-MiniLM-L6-v2")
13
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/sentence-transformers-all-MiniLM-L6-v2.tar.gz"
14
+ MODEL_DIR="fast-all-MiniLM-L6-v2"
15
+ ;;
16
+ "BAAI/bge-small-en-v1.5")
17
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/fast-bge-small-en-v1.5.tar.gz"
18
+ MODEL_DIR="fast-bge-small-en-v1.5"
19
+ ;;
20
+ "BAAI/bge-base-en-v1.5")
21
+ MODEL_URL="https://storage.googleapis.com/qdrant-fastembed/fast-bge-base-en-v1.5.tar.gz"
22
+ MODEL_DIR="fast-bge-base-en-v1.5"
23
+ ;;
24
+ *)
25
+ MODEL_URL=""
26
+ MODEL_DIR=""
27
+ ;;
28
+ esac
29
+
30
+ if [ -n "${MODEL_URL}" ] && [ ! -d "${FASTEMBED_CACHE}/${MODEL_DIR}" ]; then
31
+ echo "[mcp-qdrant] Embedding model cache not found, downloading from GCS..."
32
+ mkdir -p "${FASTEMBED_CACHE}"
33
+ TEMP_TAR=$(mktemp)
34
+ if curl -sL "${MODEL_URL}" -o "${TEMP_TAR}"; then
35
+ tar -xzf "${TEMP_TAR}" -C "${FASTEMBED_CACHE}/" 2>/dev/null || true
36
+ find "${FASTEMBED_CACHE}" -name "._*" -delete 2>/dev/null || true
37
+ rm -f "${TEMP_TAR}"
38
+ chmod -R 777 "${FASTEMBED_CACHE}" 2>/dev/null || true
39
+ echo "[mcp-qdrant] ✓ Embedding model downloaded to ${FASTEMBED_CACHE}/${MODEL_DIR}"
40
+ else
41
+ echo "[mcp-qdrant] WARNING: Failed to download embedding model"
42
+ rm -f "${TEMP_TAR}"
43
+ fi
44
+ fi
45
+
46
+ # Load environment from .qdrant-mcp.env if it exists
47
+ if [ -f /workspaces/.qdrant-mcp.env ]; then
48
+ source /workspaces/.qdrant-mcp.env
49
+ else
50
+ echo "[mcp-qdrant] WARNING: /workspaces/.qdrant-mcp.env not found, using defaults"
51
+ COLLECTION_NAME="${COLLECTION_NAME:-agent-memory}"
52
+ EMBEDDING_MODEL="${EMBEDDING_MODEL:-all-MiniLM-L6-v2}"
53
+ QDRANT_URL="${QDRANT_URL:-}"
54
+ QDRANT_API_KEY="${QDRANT_API_KEY:-}"
55
+ QDRANT_LOCAL_PATH="${QDRANT_LOCAL_PATH:-/workspaces/.qdrant/storage}"
56
+ fi
57
+
58
+ # Ensure settings.json exists
59
+ SETTINGS_FILE="/workspaces/.claude/settings.json"
60
+ if [ ! -f "$SETTINGS_FILE" ]; then
61
+ echo "[mcp-qdrant] ERROR: $SETTINGS_FILE not found"
62
+ exit 1
63
+ fi
64
+
65
+ # Check if jq is available
66
+ if ! command -v jq &>/dev/null; then
67
+ echo "[mcp-qdrant] ERROR: jq not available"
68
+ exit 1
69
+ fi
70
+
71
+ # Build the server configuration
72
+ # HF_HUB_OFFLINE=1 prevents huggingface_hub from making network calls
73
+ # FASTEMBED_CACHE_PATH points to pre-downloaded models
74
+ if [ -n "$QDRANT_URL" ]; then
75
+ # Cloud mode with URL and API key
76
+ SERVER_CONFIG=$(jq -n \
77
+ --arg url "$QDRANT_URL" \
78
+ --arg key "$QDRANT_API_KEY" \
79
+ --arg collection "$COLLECTION_NAME" \
80
+ '{
81
+ command: "uvx",
82
+ args: ["mcp-server-qdrant"],
83
+ env: {
84
+ HF_HUB_OFFLINE: "1",
85
+ FASTEMBED_CACHE_PATH: "/tmp/fastembed_cache",
86
+ QDRANT_URL: $url,
87
+ QDRANT_API_KEY: $key,
88
+ COLLECTION_NAME: $collection
89
+ }
90
+ }')
91
+ else
92
+ # Local mode with local path
93
+ SERVER_CONFIG=$(jq -n \
94
+ --arg path "$QDRANT_LOCAL_PATH" \
95
+ --arg collection "$COLLECTION_NAME" \
96
+ '{
97
+ command: "uvx",
98
+ args: ["mcp-server-qdrant"],
99
+ env: {
100
+ HF_HUB_OFFLINE: "1",
101
+ FASTEMBED_CACHE_PATH: "/tmp/fastembed_cache",
102
+ QDRANT_LOCAL_PATH: $path,
103
+ COLLECTION_NAME: $collection
104
+ }
105
+ }')
106
+ fi
107
+
108
+ # Update settings.json - add or update qdrant server
109
+ # Create temporary file for atomic update
110
+ TEMP_FILE=$(mktemp)
111
+ jq --argjson server "$SERVER_CONFIG" \
112
+ '.mcpServers.qdrant = $server' \
113
+ "$SETTINGS_FILE" > "$TEMP_FILE"
114
+
115
+ # Verify the JSON is valid
116
+ if jq empty "$TEMP_FILE" 2>/dev/null; then
117
+ mv "$TEMP_FILE" "$SETTINGS_FILE"
118
+ echo "[mcp-qdrant] ✓ Qdrant MCP server registered in Claude Code settings"
119
+ else
120
+ echo "[mcp-qdrant] ERROR: Generated invalid JSON"
121
+ rm -f "$TEMP_FILE"
122
+ exit 1
123
+ fi
124
+
125
+ # Set proper permissions
126
+ chmod 644 "$SETTINGS_FILE"
127
+ chown vscode:vscode "$SETTINGS_FILE" 2>/dev/null || true
128
+
129
+ echo "[mcp-qdrant] ✓ Configuration complete"
@@ -0,0 +1,177 @@
1
+ # MCP Reasoner Server Feature
2
+
3
+ A DevContainer Feature that installs and configures the MCP Reasoner server for enhanced AI reasoning capabilities.
4
+
5
+ ## Quick Start
6
+
7
+ ```json
8
+ {
9
+ "features": {
10
+ "ghcr.io/devcontainers/features/node:1": {},
11
+ "ghcr.io/devcontainers/features/common-utils:2": {},
12
+ "./features/mcp-reasoner": {}
13
+ }
14
+ }
15
+ ```
16
+
17
+ **Note:** This feature requires Node.js and common-utils features to be installed first.
18
+
19
+ ## Options
20
+
21
+ | Option | Type | Default | Description |
22
+ |--------|------|---------|-------------|
23
+ | `username` | string | `automatic` | User to install for (auto-detects: vscode, node, codespace, or root) |
24
+
25
+ ## What This Feature Installs
26
+
27
+ - **mcp-reasoner**: Cloned from GitHub and built locally
28
+ - **Native MCP Support**: Uses devcontainer native `mcpServers` configuration (declarative)
29
+ - **Install Location**: `/home/{username}/mcp-reasoner`
30
+
31
+ ## Requirements
32
+
33
+ This feature has explicit dependencies that **must** be installed first:
34
+
35
+ ```json
36
+ {
37
+ "features": {
38
+ "ghcr.io/devcontainers/features/node:1": {},
39
+ "ghcr.io/devcontainers/features/common-utils:2": {},
40
+ "./features/mcp-reasoner": {}
41
+ }
42
+ }
43
+ ```
44
+
45
+ **Required by this feature:**
46
+ - **Node.js + npm**: For building mcp-reasoner
47
+ - **jq**: For safe JSON generation (from common-utils)
48
+
49
+ The feature will validate these are present and exit with an error if missing.
50
+
51
+ ## Features
52
+
53
+ - ✅ **Automatic Installation**: Clones and builds mcp-reasoner
54
+ - ✅ **Idempotent**: Safe to run multiple times
55
+ - ✅ **Multi-user**: Automatically detects container user
56
+ - ✅ **Native DevContainer Support**: Uses native `mcpServers` configuration for declarative setup
57
+
58
+ ## Configuration
59
+
60
+ ### Native DevContainer MCP Support
61
+
62
+ This feature uses the native devcontainer `mcpServers` configuration pattern, which means the MCP server is declared in the `devcontainer.json` settings automatically. The configuration is applied when the devcontainer is created:
63
+
64
+ ```json
65
+ {
66
+ "customizations": {
67
+ "vscode": {
68
+ "settings": {
69
+ "mcp": {
70
+ "servers": {
71
+ "reasoner": {
72
+ "type": "stdio",
73
+ "command": "node",
74
+ "args": ["${userHome}/mcp-reasoner/dist/index.js"]
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ **No manual steps required!** The MCP server is automatically available to your AI agent once the devcontainer starts.
85
+
86
+ ### Verify It Worked
87
+
88
+ **1. Start your AI agent** (Claude Code or other MCP-compatible agent)
89
+
90
+ **2. Verify the server is available:**
91
+
92
+ Ask your AI agent:
93
+ ```
94
+ "Show me what MCP servers you have available"
95
+ ```
96
+
97
+ You should see `reasoner` listed among the available MCP servers.
98
+
99
+ **3. Test directly (optional):**
100
+ ```bash
101
+ node ~/mcp-reasoner/dist/index.js
102
+ ```
103
+
104
+ ## Usage with AI Agents
105
+
106
+ ### Claude Code
107
+
108
+ The MCP Reasoner server provides enhanced reasoning capabilities for your AI agent.
109
+
110
+ ## Architecture
111
+
112
+ ```
113
+ AI Agent (Claude Code, etc.)
114
+
115
+ Model Context Protocol
116
+
117
+ mcp-reasoner (Node.js)
118
+
119
+ Reasoning capabilities
120
+ ```
121
+
122
+ ## Troubleshooting
123
+
124
+ ### Server Not Appearing in AI Agent
125
+
126
+ **Symptom:** Installation succeeds but agent doesn't see MCP Reasoner server
127
+
128
+ **Solution:**
129
+ 1. Ensure the devcontainer is running the latest image (rebuild if needed)
130
+ 2. Restart your AI agent to reload MCP server configurations
131
+ 3. Check that the dist file exists: `ls -la ~/mcp-reasoner/dist/index.js`
132
+
133
+ ### Installation Fails: "node is not available"
134
+
135
+ **Cause:** Node feature not installed first
136
+
137
+ **Solution:** Add Node feature before mcp-reasoner:
138
+ ```json
139
+ {
140
+ "features": {
141
+ "ghcr.io/devcontainers/features/node:1": {},
142
+ "./features/mcp-reasoner": {}
143
+ }
144
+ }
145
+ ```
146
+
147
+ ### Installation Fails: "jq is not available"
148
+
149
+ **Cause:** common-utils feature not installed
150
+
151
+ **Solution:** Add common-utils feature:
152
+ ```json
153
+ {
154
+ "features": {
155
+ "ghcr.io/devcontainers/features/common-utils:2": {},
156
+ "./features/mcp-reasoner": {}
157
+ }
158
+ }
159
+ ```
160
+
161
+ ### Build Fails
162
+
163
+ **Symptom:** npm build errors during installation
164
+
165
+ **Checks:**
166
+ - Verify Node.js version is compatible: `node --version`
167
+ - Check npm is available: `npm --version`
168
+ - Review build output for specific errors
169
+
170
+ ## Resources
171
+
172
+ - [MCP Reasoner GitHub](https://github.com/Jacck/mcp-reasoner)
173
+ - [Model Context Protocol](https://modelcontextprotocol.io)
174
+
175
+ ## License
176
+
177
+ MIT License - See repository for details.
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "mcp-reasoner",
3
+ "version": "1.0.3",
4
+ "name": "MCP Reasoner Server",
5
+ "description": "Installs MCP Reasoner server for enhanced AI reasoning capabilities",
6
+ "maintainer": "AnExiledDev",
7
+ "documentationURL": "https://github.com/Jacck/mcp-reasoner",
8
+ "options": {
9
+ "username": {
10
+ "type": "string",
11
+ "description": "Container user to install for",
12
+ "default": "automatic"
13
+ }
14
+ },
15
+ "installsAfter": [
16
+ "ghcr.io/devcontainers/features/node:1",
17
+ "ghcr.io/devcontainers/features/common-utils:2",
18
+ "./features/claude-code"
19
+ ]
20
+ }