Comprehensive MCP server management with kubectl-style CLI. Key features in this release: - Declarative YAML apply/get round-trip with project cloning support - Gated sessions with prompt intelligence for Claude - Interactive MCP console with traffic inspector - Persistent STDIO connections for containerized servers - RBAC with name-scoped bindings - Shell completions (fish + bash) auto-generated - Rate-limit retry with exponential backoff in apply - Project-scoped prompt management - Credential scrubbing from git history Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
cd "$PROJECT_ROOT"
|
|
|
|
# Load .env if present
|
|
if [ -f .env ]; then
|
|
set -a; source .env; set +a
|
|
fi
|
|
|
|
# Ensure tools are on PATH
|
|
export PATH="$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.local/bin:$PATH"
|
|
|
|
echo "==> Building TypeScript..."
|
|
pnpm build
|
|
|
|
echo "==> Generating shell completions..."
|
|
pnpm completions:generate
|
|
|
|
echo "==> Bundling standalone binaries..."
|
|
mkdir -p dist
|
|
rm -f dist/mcpctl dist/mcpctl-local dist/mcpctl-*.rpm
|
|
|
|
# Ink optionally imports react-devtools-core which isn't installed.
|
|
# Provide a no-op stub so bun can bundle it (it's only invoked when DEV=true).
|
|
if [ ! -e node_modules/react-devtools-core ]; then
|
|
ln -s ../src/cli/stubs/react-devtools-core node_modules/react-devtools-core
|
|
fi
|
|
|
|
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl
|
|
bun build src/mcplocal/src/main.ts --compile --outfile dist/mcpctl-local
|
|
|
|
echo "==> Packaging RPM..."
|
|
nfpm pkg --packager rpm --target dist/
|
|
|
|
RPM_FILE=$(ls dist/mcpctl-*.rpm 2>/dev/null | head -1)
|
|
echo "==> Built: $RPM_FILE"
|
|
echo " Size: $(du -h "$RPM_FILE" | cut -f1)"
|
|
rpm -qpi "$RPM_FILE"
|