fix: add mcp package.json and dep auto-install in install.sh

The MCP server requires @modelcontextprotocol/sdk and zod which are not
globally installed. Added .agents/mcp/package.json and updated install.sh
to run 'npm install --prefix' on first setup.
This commit is contained in:
Brydon DeWitt 2026-05-22 16:19:16 -04:00
parent 6b07e4ccb2
commit 690178da96
2 changed files with 20 additions and 0 deletions

View File

@ -121,6 +121,16 @@ for VSCODE_PROMPTS_DIR in \
fi fi
done done
# ── 7. MCP server dependencies ───────────────────────────────────────────────
MCP_DIR="$DOTFILES_AGENTS/mcp"
if [[ ! -d "$MCP_DIR/node_modules/@modelcontextprotocol" ]]; then
log "Installing MCP server dependencies (npm install in $MCP_DIR)..."
npm install --prefix "$MCP_DIR" --silent
log "MCP server dependencies installed"
else
skip "MCP server node_modules already present"
fi
# ── Done ───────────────────────────────────────────────────────────────────── # ── Done ─────────────────────────────────────────────────────────────────────
printf '\n\033[0;32minstall.sh complete.\033[0m\n' printf '\n\033[0;32minstall.sh complete.\033[0m\n'
printf 'Next steps:\n' printf 'Next steps:\n'

10
.agents/mcp/package.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "@dotfiles/all-agents-mcp",
"version": "1.0.0",
"private": true,
"type": "module",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.29.0",
"zod": "^4.1.12"
}
}