fix(vscode): correct alpaca mcp workspace config

This commit is contained in:
Saravana Achu Mac 2026-05-06 09:30:29 -07:00
parent bff0a4d931
commit 4e8bc25b7d
2 changed files with 64 additions and 0 deletions

30
.vscode/mcp.json vendored Normal file
View File

@ -0,0 +1,30 @@
{
"inputs": [
{
"type": "promptString",
"id": "alpaca-api-key",
"description": "Alpaca API Key",
"password": true
},
{
"type": "promptString",
"id": "alpaca-secret-key",
"description": "Alpaca Secret Key",
"password": true
}
],
"servers": {
"alpaca": {
"type": "stdio",
"command": "zsh",
"args": [
"${workspaceFolder}/scripts/mcp/alpaca-mcp-server.sh"
],
"env": {
"ALPACA_API_KEY": "${input:alpaca-api-key}",
"ALPACA_SECRET_KEY": "${input:alpaca-secret-key}",
"MCP_CLIENT": "vscode"
}
}
}
}

View File

@ -0,0 +1,34 @@
#!/usr/bin/env zsh
set -euo pipefail
if [[ "${1:-}" == "--doctor" ]]; then
if command -v uvx >/dev/null 2>&1; then
echo "ok: uvx available ($(command -v uvx))"
exit 0
fi
if command -v uv >/dev/null 2>&1; then
echo "ok: uv available ($(command -v uv))"
exit 0
fi
if command -v pipx >/dev/null 2>&1; then
echo "ok: pipx fallback available ($(command -v pipx))"
exit 0
fi
echo "error: install uv or pipx before starting the Alpaca MCP server" >&2
exit 127
fi
if command -v uvx >/dev/null 2>&1; then
exec uvx alpaca-mcp-server "$@"
fi
if command -v uv >/dev/null 2>&1; then
exec uv tool run alpaca-mcp-server "$@"
fi
if command -v pipx >/dev/null 2>&1; then
exec pipx run alpaca-mcp-server "$@"
fi
echo "error: install uv or pipx before starting the Alpaca MCP server" >&2
exit 127