mcpField
πŸš€
πŸš€ 0xGasless MCP Server

πŸš€ 0xGasless MCP Server

Local
github.com/achiitFinance2Updated 73w ago

About πŸš€ 0xGasless MCP Server

0xGasless is an MCP server that connects Claude to blockchain networks for gasless transactions, swaps, and transfers through natural-language requests. It uses ERC-4337 account abstraction and provides wallet and token tools across supported networks.

Key features

  1. 01Retrieve smart account address
  2. 02Check ERC20 token balances
  3. 03Transfer tokens without gas
  4. 04Swap tokens without gas
  5. 05Buy OpenRouter credits with USDC

Use cases

  1. 01Check wallet or token balances
  2. 02Send tokens to a wallet address
  3. 03Swap tokens on a supported network
  4. 04Purchase OpenRouter credits with USDC

MCP support

The server exposes tools to Claude for retrieving account addresses and balances, transferring and swapping tokens, and purchasing credits.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json Β· Universal config
{
"mcpServers": {
"0xgasless": {
"command": "npx",
"args": [
"-y",
"0xgasless-mcp"
],
"env": {
"PRIVATE_KEY": "<PRIVATE_KEY>",
"RPC_URL": "<RPC_URL>",
"API_KEY": "<API_KEY>",
"CHAIN_ID": "<CHAIN_ID>",
"OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
}
}
}
}
Run commandnpx -y 0xgasless-mcp
Environment variables to set
PRIVATE_KEYSecret
RPC_URL
API_KEYSecret
CHAIN_ID
OPENROUTER_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm0xgasless-mcp

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

πŸš€ 0xGasless MCP Server

πŸ”— Seamless Blockchain Integration for Claude AI

Execute gasless transactions, swaps, and transfers directly from your Claude conversations

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ πŸ› οΈ Development β€’ 🀝 Contributing


🌟 What is 0xGasless MCP Server?

The 0xGasless MCP Server is a powerful Model Context Protocol server that bridges Claude AI with blockchain networks. Built on ERC-4337 Account Abstraction, it enables gasless blockchain operations through natural language conversations.

✨ Key Highlights
  • πŸ†“ Zero Gas Fees - Execute transactions without holding native tokens
  • 🌐 Multi-Chain Support - 8+ blockchain networks supported
  • πŸ€– AI-Native - Natural language blockchain interactions
  • πŸ”’ Secure - Smart account abstraction with enhanced security
  • ⚑ Instant Setup - One-command Claude integration

πŸ› οΈ Available Tools

ToolDescriptionExample Usage
🏠 get-addressRetrieve your smart account address"What's my wallet address?"
πŸ’° get-balanceCheck token balances (ERC20 support)"Show my USDC balance"
πŸ“€ transfer-tokenSend tokens gaslessly"Send 10 USDT to alice.eth"
πŸ”„ swap-tokensExchange tokens without gas"Swap 100 USDT for USDC"
🎯 buy-openrouter-creditsPurchase AI credits with USDC"Buy $25 OpenRouter credits"

πŸš€ Quick Start

πŸ“¦ Installation

Choose your preferred installation method:

# Global installation (recommended)
npm install -g 0xgasless-mcp

# Or use directly with npx
npx 0xgasless-mcp
βš™οΈ Configuration
1️⃣ Automatic Setup (Easiest)
0xgasless-mcp configure

This interactive command will:

  • βœ… Collect your API keys and configuration
  • βœ… Detect your operating system
  • βœ… Configure Claude Desktop automatically
  • βœ… Validate all inputs
2️⃣ Manual Environment Setup

Create a .env file with your configuration:

# πŸ”‘ Required Configuration
PRIVATE_KEY=0x...                    # Your wallet private key
RPC_URL=https://...                  # Blockchain RPC endpoint
API_KEY=your_0xgasless_api_key      # From dashboard.0xgasless.com
CHAIN_ID=56                         # Target blockchain (see table below)

# 🎯 Optional Configuration  
OPENROUTER_API_KEY=your_key         # For AI credit purchases

🌐 Supported Networks

🌍 NetworkπŸ†” Chain IDπŸ’Ž Native TokenπŸ”— RPC Endpoint
🟑 BSC56BNBhttps://bsc-dataseed.binance.org/
πŸ”΅ Base8453ETHhttps://mainnet.base.org
⚫ Ethereum1ETHhttps://eth.llamarpc.com
🟣 Polygon137MATIChttps://polygon-rpc.com
πŸ”΄ Avalanche43114AVAXhttps://api.avax.network/ext/bc/C/rpc
πŸ”΅ Fantom250FTMhttps://rpc.ftm.tools
πŸŒ™ Moonbeam1284GLMRhttps://rpc.api.moonbeam.network
🟒 Metis1088METIShttps://andromeda.metis.io/?owner=1088

πŸ”— Claude Desktop Integration

🎯 Automatic Configuration

The easiest way to integrate with Claude Desktop:

0xgasless-mcp configure
πŸ“ Manual Configuration

Add to your Claude Desktop configuration file:

πŸ“ Configuration Locations:

  • 🍎 macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • πŸͺŸ Windows: %APPDATA%\Claude\claude_desktop_config.json
  • 🐧 Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "0xgasless": {
      "command": "npx",
      "args": ["0xgasless-mcp-server"],
      "env": {
        "PRIVATE_KEY": "0x...",
        "RPC_URL": "https://...",
        "API_KEY": "your_0xgasless_api_key",
        "CHAIN_ID": "56",
        "OPENROUTER_API_KEY": "your_openrouter_key"
      }
    }
  }
}

πŸ’¬ Usage Examples

Once configured, interact with blockchain using natural language:

πŸ’° Balance Inquiries
πŸ’¬ "What's my wallet balance?"
πŸ’¬ "Check my USDC balance on BSC"
πŸ’¬ "Show all my token balances"
πŸ“€ Token Transfers
πŸ’¬ "Send 10 USDT to 0x742d35Cc6634C0532925a3b8D4C9db96590b5c8e"
πŸ’¬ "Transfer 0.1 BNB to alice.eth"
πŸ’¬ "Send 50 USDC to my friend's wallet"
πŸ”„ Token Swaps
πŸ’¬ "Swap 100 USDT for USDC"
πŸ’¬ "Exchange 0.5 BNB to WETH"
πŸ’¬ "Convert 1000 BUSD to BNB"
🎯 AI Credit Purchases
πŸ’¬ "Buy $10 worth of OpenRouter credits"
πŸ’¬ "Purchase $25 OpenRouter credits with USDC"

πŸ”‘ API Keys Setup

🎯 0xGasless API Key
  1. 🌐 Visit 0xGasless Dashboard
  2. πŸ“ Create an account and new project
  3. πŸ”‘ Copy your API key
  4. πŸ’³ Add credits to your account
πŸ€– OpenRouter API Key (Optional)
  1. 🌐 Visit OpenRouter.ai
  2. πŸ“ Sign up and navigate to API Keys
  3. πŸ”‘ Generate a new API key
  4. πŸ’° Add credits for AI model access

πŸ› οΈ Development

πŸ—οΈ Local Development Setup
# Clone the repository
git clone https://github.com/achiit/0xgasless-mcp-server.git
cd 0xgasless-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Development mode with hot reload
npm run dev

# Start the server
npm start
πŸ“ Project Structure
src/
β”œβ”€β”€ 🎯 main.ts          # Core MCP server implementation
β”œβ”€β”€ πŸš€ index.ts         # CLI entry point & configuration
β”œβ”€β”€ πŸ“‹ version.ts       # Version management
└── πŸ“ types/           # TypeScript definitions

πŸ” Security & Best Practices

πŸ›‘οΈ Security Guidelines
  • πŸ”’ Private Keys: Store securely in environment variables, never in code
  • πŸ”‘ API Keys: Keep 0xGasless and OpenRouter keys confidential
  • 🏦 Smart Accounts: Enhanced security through account abstraction
  • β›½ Gasless Operations: No native tokens required for transactions
⚠️ Important Notes
  • 🚫 Never share your private key with anyone
  • πŸ’Ύ Use environment variables for sensitive data
  • πŸ”„ Regularly rotate your API keys
  • πŸ“Š Monitor your account usage and credits

πŸ†˜ Troubleshooting

πŸ› Common Issues & Solutions
πŸ”΄ "Chain ID not supported"

Solution:

  • βœ… Verify you're using a supported chain ID from the table above
  • βœ… Check the supported networks section
πŸ”΄ "API Key invalid"

Solution:

  • βœ… Verify your 0xGasless API key is correct
  • βœ… Ensure sufficient credits in your 0xGasless account
  • βœ… Check API key permissions and expiration
πŸ”΄ "Insufficient balance"

Solution:

  • βœ… Check token balance before operations
  • βœ… Ensure you have enough tokens for the transaction
  • βœ… Verify token contract address is correct
πŸ”΄ "Private key format error"

Solution:

  • βœ… Ensure private key starts with "0x"
  • βœ… Verify it's exactly 66 characters (64 + "0x")
  • βœ… Check for any extra spaces or characters
πŸ” Debug Mode

Enable detailed logging for troubleshooting:

DEBUG=1 0xgasless-mcp-server

🀝 Contributing

We welcome contributions! Here's how to get started:

πŸš€ Quick Contribution Guide
  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch: git checkout -b feature/amazing-feature
  3. πŸ’Ύ Commit your changes: git commit -m 'Add amazing feature'
  4. πŸ“€ Push to branch: git push origin feature/amazing-feature
  5. πŸ”„ Open a Pull Request
πŸ“‹ Development Guidelines
  • βœ… Follow TypeScript best practices
  • βœ… Add tests for new features
  • βœ… Update documentation as needed
  • βœ… Ensure all tests pass before submitting

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

Special thanks to the amazing teams and projects that make this possible:


πŸ“š Resources & Links

πŸ“– Documentation
πŸ”— Project Links

πŸš€ Made with ❀️ for the blockchain community

Empowering AI-driven blockchain interactions

Follow on GitHub Star this repo

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.