Skip to main content
Glama

ValueRouter MCP Server

quick-start.shโ€ข6.85 kB
#!/bin/bash # ValueRouter MCP Server Quick Start Script # This script helps you quickly deploy and test the ValueRouter MCP server set -e echo "๐Ÿš€ ValueRouter MCP Server Quick Start" echo "====================================" # Check if Node.js is installed if ! command -v node &> /dev/null; then echo "โŒ Node.js is not installed. Please install Node.js 18 or higher." exit 1 fi # Check Node.js version NODE_VERSION=$(node --version | cut -d'v' -f2) REQUIRED_VERSION="18.0.0" if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$NODE_VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then echo "โŒ Node.js version $NODE_VERSION is too old. Please install Node.js 18 or higher." exit 1 fi echo "โœ… Node.js version $NODE_VERSION detected" # Check if npm is installed if ! command -v npm &> /dev/null; then echo "โŒ npm is not installed. Please install npm." exit 1 fi echo "โœ… npm is available" # Create environment file if it doesn't exist if [ ! -f ".env" ]; then echo "๐Ÿ”ง Creating environment configuration..." cat > .env << EOF # ValueRouter MCP Server Configuration # Replace these with your actual RPC URLs # Ethereum Mainnet ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY # Layer 2 Networks ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc OPTIMISM_RPC_URL=https://mainnet.optimism.io POLYGON_RPC_URL=https://polygon-rpc.com AVALANCHE_RPC_URL=https://api.avax.network/ext/bc/C/rpc BASE_RPC_URL=https://mainnet.base.org # Non-EVM Networks SOLANA_RPC_URL=https://api.mainnet-beta.solana.com SUI_RPC_URL=https://fullnode.mainnet.sui.io:443 # Cosmos Networks NOBLE_RPC_URL=https://noble-rpc.polkachu.com OSMOSIS_RPC_URL=https://rpc.osmosis.zone # Optional: Set to 'development' for testing NODE_ENV=production # Optional: Custom port (default: 3000) PORT=3000 EOF echo "โœ… Created .env file with default configuration" echo "โš ๏ธ Please edit .env file and add your RPC URLs before starting" fi # Function to install the package install_package() { echo "๐Ÿ“ฆ Installing ValueRouter MCP Server..." if [ "$1" = "global" ]; then npm install -g @valuerouter/mcp-server echo "โœ… Installed globally. You can now run: valuerouter-mcp" else npm install @valuerouter/mcp-server echo "โœ… Installed locally. You can now run: npx @valuerouter/mcp-server" fi } # Function to build from source build_from_source() { echo "๐Ÿ”จ Building from source..." if [ ! -f "package.json" ]; then echo "โŒ package.json not found. Please run this script from the mcp-server directory." exit 1 fi npm install npm run build echo "โœ… Built successfully" } # Function to test the server test_server() { echo "๐Ÿงช Testing MCP server..." # Start server in background if command -v valuerouter-mcp &> /dev/null; then valuerouter-mcp & else npx @valuerouter/mcp-server & fi SERVER_PID=$! sleep 3 # Test basic functionality echo "Testing server response..." # Create a test request cat > test_request.json << EOF { "jsonrpc": "2.0", "id": 1, "method": "tools/list" } EOF # Send test request (if server supports HTTP) if curl -s -H "Content-Type: application/json" -d @test_request.json http://localhost:3000 > /dev/null; then echo "โœ… Server is responding correctly" else echo "โ„น๏ธ Server started successfully (stdio mode)" fi # Clean up kill $SERVER_PID 2>/dev/null || true rm -f test_request.json } # Function to create Claude Desktop configuration create_claude_config() { echo "๐Ÿค– Creating Claude Desktop configuration..." CLAUDE_CONFIG_DIR="$HOME/.config/claude-desktop" mkdir -p "$CLAUDE_CONFIG_DIR" cat > "$CLAUDE_CONFIG_DIR/claude_desktop_config.json" << EOF { "mcpServers": { "valuerouter": { "command": "npx", "args": ["@valuerouter/mcp-server"], "env": { "ETHEREUM_RPC_URL": "https://mainnet.infura.io/v3/YOUR_INFURA_KEY", "ARBITRUM_RPC_URL": "https://arb1.arbitrum.io/rpc", "OPTIMISM_RPC_URL": "https://mainnet.optimism.io", "POLYGON_RPC_URL": "https://polygon-rpc.com", "AVALANCHE_RPC_URL": "https://api.avax.network/ext/bc/C/rpc", "BASE_RPC_URL": "https://mainnet.base.org", "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com", "SUI_RPC_URL": "https://fullnode.mainnet.sui.io:443" } } } } EOF echo "โœ… Claude Desktop configuration created at $CLAUDE_CONFIG_DIR/claude_desktop_config.json" echo "โš ๏ธ Please update the RPC URLs in the configuration file" } # Function to show usage examples show_examples() { echo "๐Ÿ“š Usage Examples:" echo "==================" echo "" echo "1. Direct Usage:" echo " npx @valuerouter/mcp-server" echo "" echo "2. With Environment Variables:" echo " ETHEREUM_RPC_URL=https://mainnet.infura.io/v3/YOUR_KEY npx @valuerouter/mcp-server" echo "" echo "3. Claude Desktop Integration:" echo " - Configuration already created in ~/.config/claude-desktop/" echo " - Update RPC URLs and restart Claude Desktop" echo "" echo "4. Testing Bridge Quote:" echo " - Use get_bridge_quote tool" echo " - From: Ethereum (1) To: Arbitrum (42161)" echo " - Amount: 1000000 (1 USDC)" echo "" echo "5. Check Supported Chains:" echo " - Use get_supported_chains tool" echo " - Include testnets: true/false" } # Main menu echo "" echo "What would you like to do?" echo "1. Install from NPM (recommended)" echo "2. Install globally" echo "3. Build from source" echo "4. Test server" echo "5. Create Claude Desktop config" echo "6. Show usage examples" echo "7. Exit" echo "" read -p "Enter your choice (1-7): " choice case $choice in 1) install_package "local" ;; 2) install_package "global" ;; 3) build_from_source ;; 4) test_server ;; 5) create_claude_config ;; 6) show_examples ;; 7) echo "๐Ÿ‘‹ Goodbye!" exit 0 ;; *) echo "โŒ Invalid choice. Please run the script again." exit 1 ;; esac echo "" echo "๐ŸŽ‰ Quick start completed!" echo "" echo "Next steps:" echo "1. Configure your RPC URLs in .env file" echo "2. Test the server with: npx @valuerouter/mcp-server" echo "3. Integrate with your AI agent (Claude Desktop, OpenAI, etc.)" echo "" echo "๐Ÿ“– For more information, visit:" echo " - Documentation: https://github.com/valuerouter/mcp-server" echo " - Examples: https://github.com/valuerouter/mcp-server/tree/main/examples" echo " - Support: https://discord.gg/valuerouter"

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RWAValueRouter/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server