Skip to main content

Quick Setup

1

Install httpcat-cli

Choose your preferred installation method:
2

Get your private key

You’ll need a Base-compatible private key with USDC for trading.
Never hardcode your private key in config files. Use environment variables or your MCP client’s secrets management.
3

Configure your MCP client

Follow the instructions below for your specific client.
4

Test the connection

Ask your AI assistant:
"Check my httpcat balance"
If it responds with your ETH and USDC balances, you’re all set!

Cursor Configuration

Cursor supports MCP natively. Configure in your MCP settings:

Location

  • macOS/Linux: ~/.cursor/mcp_settings.json
  • Windows: %APPDATA%\Cursor\mcp_settings.json
Or use Cursor’s UI: SettingsExtensionsMCP Servers

Configuration (npx)

{
  "mcpServers": {
    "httpcat": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x..."
      }
    }
  }
}
Using npx ensures you always get the latest version of httpcat-cli without manual updates.

Configuration (Global Install)

If you installed httpcat-cli globally:
{
  "mcpServers": {
    "httpcat": {
      "command": "httpcat",
      "args": ["mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Using Environment Variables

Instead of hardcoding the private key:
{
  "mcpServers": {
    "httpcat": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "${HTTPCAT_PRIVATE_KEY}"
      }
    }
  }
}
Then set in your shell:
export HTTPCAT_PRIVATE_KEY="0x..."

Restart Cursor

After saving the configuration, restart Cursor to load the MCP server.

Claude Desktop Configuration

Claude Desktop (Anthropic’s official app) supports MCP.

Location

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Configuration (npx)

{
  "mcpServers": {
    "httpcat": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Configuration (Global Install)

{
  "mcpServers": {
    "httpcat": {
      "command": "httpcat",
      "args": ["mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Restart Claude Desktop

Quit Claude Desktop completely and restart to load the MCP server.

Custom MCP Clients

For other MCP-compatible clients:

Standard MCP Configuration

{
  "servers": {
    "httpcat": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Programmatic Setup

If you’re building an MCP client:
import { MCPClient } from '@modelcontextprotocol/sdk';

const client = new MCPClient({
  command: 'npx',
  args: ['-y', 'httpcat-cli', 'mcp-server'],
  env: {
    HTTPCAT_PRIVATE_KEY: process.env.HTTPCAT_PRIVATE_KEY
  }
});

await client.connect();

Environment Configuration

Available Environment Variables

Configure httpcat behavior via environment variables:
{
  "mcpServers": {
    "httpcat": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x...",
        "HTTPCAT_NETWORK": "eip155:84532",
        "HTTPCAT_AGENT_URL": "https://agent.402.cat",
        "HTTPCAT_RPC_URL": "https://sepolia.base.org"
      }
    }
  }
}
VariableDescriptionDefault
HTTPCAT_PRIVATE_KEYYour private keyRequired
HTTPCAT_NETWORKNetwork: eip155:84532 (testnet) or eip155:8453 (mainnet)Auto-detected
HTTPCAT_AGENT_URLAgent endpointhttps://agent.402.cat
HTTPCAT_RPC_URLCustom RPC URLBase default

Network Selection

{
  "env": {
    "HTTPCAT_PRIVATE_KEY": "0x...",
    "HTTPCAT_NETWORK": "eip155:84532"
  }
}
Perfect for:
  • Testing and learning
  • Free testnet USDC
  • No financial risk
If you don’t specify HTTPCAT_NETWORK, it will be auto-detected from your wallet’s transactions.

Security Best Practices

DO:
  • Use environment variables
  • Use your MCP client’s secrets management
  • Use different keys for testnet and mainnet
  • Rotate keys regularly
DON’T:
  • Commit keys to version control
  • Hardcode keys in config files
  • Share keys in screenshots
  • Reuse keys across projects
Best approach:
  1. Create a .env file (add to .gitignore):
    HTTPCAT_PRIVATE_KEY=0x...
    
  2. Load in your shell:
    source .env
    
  3. Reference in MCP config:
    {
      "env": {
        "HTTPCAT_PRIVATE_KEY": "${HTTPCAT_PRIVATE_KEY}"
      }
    }
    
Always test with testnet first:
  1. Use Base Sepolia network
  2. Get free testnet tokens from faucets
  3. Verify tools work correctly
  4. Then switch to mainnet with real funds
  • Back up your seed phrase (not private key)
  • Store offline in secure location
  • Never share with anyone
  • Consider hardware wallet for mainnet

Verifying Setup

Test Connection

Ask your AI assistant to run a health check:
"Check if httpcat is working"
Expected response:
The httpcat agent is healthy and running on [network].

Test Balance

"What's my wallet balance?"
Expected response:
Your wallet has:
- ETH: 0.005
- USDC: 10.00

Test Token Info

"Get information about MOON token"
Expected response should include token details, price, and market cap.

Troubleshooting

Symptoms: AI assistant says httpcat tools are unavailableSolutions:
  1. Restart your MCP client completely
  2. Verify config file location
  3. Check command path:
    which httpcat  # For global install
    npx httpcat-cli --version  # For npx
    
  4. Check MCP client logs for errors
Symptoms: “Invalid private key” or “Authentication failed”Solutions:
  1. Verify key format starts with 0x
  2. Ensure key is 64 hex characters (+ 0x prefix)
  3. Check environment variable is set:
    echo $HTTPCAT_PRIVATE_KEY
    
  4. Try hardcoding temporarily to test
Symptoms: “Cannot connect to agent” or timeout errorsSolutions:
  1. Check internet connection
  2. Verify agent URL is reachable:
    curl https://agent.402.cat/health
    
  3. Check for firewall/proxy issues
  4. Try custom agent URL if needed
Symptoms: Tools return errors or unexpected resultsSolutions:
  1. Check wallet has USDC for operations
  2. Check wallet has ETH for gas fees
  3. Verify network matches your funds
  4. Try the same operation via CLI:
    httpcat balance
    httpcat health
    
  5. Check httpcat-cli logs
Symptoms: Tools behave differently than documentedSolutions:
  1. Update to latest version:
    npm update -g httpcat-cli
    
  2. For npx, it auto-updates on each run
  3. Check version:
    httpcat --version
    
  4. Clear npm cache if needed:
    npm cache clean --force
    

Advanced Configuration

Multiple Environments

Configure different environments for different use cases:
{
  "mcpServers": {
    "httpcat-testnet": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x...testnet_key",
        "HTTPCAT_NETWORK": "eip155:84532"
      }
    },
    "httpcat-mainnet": {
      "command": "npx",
      "args": ["-y", "httpcat-cli", "mcp-server"],
      "env": {
        "HTTPCAT_PRIVATE_KEY": "0x...mainnet_key",
        "HTTPCAT_NETWORK": "eip155:8453"
      }
    }
  }
}
Then specify which to use when talking to AI:
"Using httpcat-testnet, check my balance"
"Using httpcat-mainnet, create a token"

Custom RPC Endpoint

Use a custom RPC provider for better reliability:
{
  "env": {
    "HTTPCAT_PRIVATE_KEY": "0x...",
    "HTTPCAT_RPC_URL": "https://base-mainnet.g.alchemy.com/v2/YOUR_KEY"
  }
}
Recommended providers:

Next Steps

Once configured, try asking your AI: “Create a test token on httpcat” to verify everything works!