#!/bin/bash
set -e
# Rebuild Binance-US-MCP with individual commits for each file
REPO_DIR="/workspaces/universal-crypto-mcp/binance-us-mcp-server"
WORK_DIR="/tmp/binance-us-mcp-individual"
echo "π Rebuilding Binance-US-MCP with individual file commits..."
rm -rf "$WORK_DIR"
mkdir -p "$WORK_DIR"
cd "$WORK_DIR"
git init
git config user.email "nirholas@users.noreply.github.com"
git config user.name "nirholas"
commit_file() {
local file="$1"
local message="$2"
if [ -e "$REPO_DIR/$file" ]; then
mkdir -p "$(dirname "$file")"
cp "$REPO_DIR/$file" "$file"
git add "$file"
git commit -m "$message" 2>/dev/null || true
fi
}
echo "π¦ Creating individual commits..."
# Root config files
commit_file "package.json" "π― Initialize package.json with Binance.US MCP server dependencies"
commit_file "package-lock.json" "π Lock dependency versions for reproducible builds"
commit_file "tsconfig.json" "βοΈ Configure TypeScript for ES2022 and NodeNext modules"
commit_file "config.json" "π§ Add server configuration with API endpoint settings"
commit_file "README.md" "π Add comprehensive README with setup and usage instructions"
# Core source files
commit_file "src/index.ts" "π Create MCP server entry point with tool registration"
commit_file "src/config/binanceUsClient.ts" "π Implement Binance.US API client with HMAC authentication"
commit_file "src/config/types.ts" "π Define TypeScript interfaces for API responses"
# Tool modules
commit_file "src/tools/general/index.ts" "π Add general API tools - ping, time, exchange info"
commit_file "src/tools/market/index.ts" "π Implement market data tools - prices, orderbook, trades, klines"
commit_file "src/tools/account/index.ts" "π€ Add account tools - balances, trade history, status"
commit_file "src/tools/trade/index.ts" "πΉ Implement core trading tools - orders, status, cancel"
commit_file "src/tools/trade/orders.ts" "β¨ Add order placement with limit, market, and stop orders"
commit_file "src/tools/trade/oco.ts" "βοΈ Implement OCO (One-Cancels-Other) order management"
commit_file "src/tools/wallet/index.ts" "π Add wallet tools - deposits, withdrawals, transfers"
commit_file "src/tools/staking/index.ts" "π° Implement staking tools for earning rewards"
commit_file "src/tools/otc/index.ts" "π¦ Add OTC trading tools for large block trades"
commit_file "src/tools/subaccount/index.ts" "π₯ Implement sub-account management tools"
commit_file "src/tools/userdata-stream/index.ts" "π‘ Add WebSocket user data stream management"
commit_file "src/tools/credit-line/index.ts" "π³ Implement credit line tools for institutional trading"
commit_file "src/tools/creditline/index.ts" "π³ Add alternative credit line module structure"
commit_file "src/tools/custodial-solution/index.ts" "π Implement custodial solution for enterprise clients"
commit_file "src/tools/custodial/index.ts" "π Add alternative custodial module structure"
# Documentation
commit_file "docs/README.md" "π Create documentation index and overview"
commit_file "docs/API.md" "π Document complete Binance.US REST API reference"
commit_file "docs/API_CLIENT.md" "π Explain API client configuration and authentication"
commit_file "docs/API_REFERENCE.md" "π Add detailed endpoint reference with parameters"
commit_file "docs/CONFIGURATION.md" "βοΈ Document server configuration options"
commit_file "docs/SECURITY.md" "π Add security best practices and API key management"
commit_file "docs/ERROR_CODES.md" "β οΈ Document API error codes and troubleshooting"
commit_file "docs/TOOLS.md" "π οΈ List all available MCP tools with descriptions"
commit_file "docs/TOOLS_REFERENCE.md" "π Add comprehensive tool parameter reference"
commit_file "docs/TRADING.md" "π Document trading operations and order types"
commit_file "docs/TRADING_QUICK_REF.md" "β‘ Add quick reference for common trading tasks"
commit_file "docs/QUICK_REFERENCE.md" "π Create cheat sheet for frequent operations"
commit_file "docs/EXAMPLES.md" "π‘ Add code examples and usage patterns"
commit_file "docs/PROMPT_EXAMPLES.md" "π¬ Provide example prompts for Claude integration"
commit_file "docs/IMPLEMENTATION_GUIDE.md" "ποΈ Document implementation details and architecture"
commit_file "docs/CHANGELOG.md" "π Track version history and changes"
commit_file "docs/OTC_TRADING.md" "ποΈ Document OTC trading features for institutions"
commit_file "docs/CREDIT_LINE.md" "π³ Explain credit line features and requirements"
commit_file "docs/CUSTODIAL_SOLUTION.md" "π Document custodial services for enterprises"
echo ""
echo "β
All commits created!"
COMMIT_COUNT=$(git log --oneline | wc -l)
echo "π Total commits: $COMMIT_COUNT"
echo ""
git log --oneline | head -20
echo ""
echo "π Ready to push!"