Ink-based TUI that shows exactly what an LLM sees through MCP. Browse tools/resources/prompts, execute them, and see raw JSON-RPC traffic in a protocol log. Supports gated session flow with begin_session, raw JSON-RPC input, and session reconnect. - McpSession class wrapping HTTP transport with typed methods - 12 React/Ink components (header, protocol-log, menu, tool/resource/prompt views, etc.) - 21 unit tests for McpSession against a mock MCP server - Fish + Bash completions with project name argument - bun compile with --external react-devtools-core Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
849 B
Bash
Executable File
32 lines
849 B
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 "==> Bundling standalone binaries..."
|
|
mkdir -p dist
|
|
rm -f dist/mcpctl dist/mcpctl-local dist/mcpctl-*.rpm
|
|
bun build src/cli/src/index.ts --compile --outfile dist/mcpctl --external react-devtools-core
|
|
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"
|