0xGasless MCP Server

0xGasless MCP Server

A Model Context Protocol server that enables gasless blockchain transactions directly from Claude conversations, allowing users to execute transfers, swaps, and other operations without holding native tokens.

Category
访问服务器

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

</div>


🌟 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

Tool Description Example Usage
🏠 get-address Retrieve your smart account address "What's my wallet address?"
💰 get-balance Check token balances (ERC20 support) "Show my USDC balance"
📤 transfer-token Send tokens gaslessly "Send 10 USDT to alice.eth"
🔄 swap-tokens Exchange tokens without gas "Swap 100 USDT for USDC"
🎯 buy-openrouter-credits Purchase 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
🟡 BSC 56 BNB https://bsc-dataseed.binance.org/
🔵 Base 8453 ETH https://mainnet.base.org
Ethereum 1 ETH https://eth.llamarpc.com
🟣 Polygon 137 MATIC https://polygon-rpc.com
🔴 Avalanche 43114 AVAX https://api.avax.network/ext/bc/C/rpc
🔵 Fantom 250 FTM https://rpc.ftm.tools
🌙 Moonbeam 1284 GLMR https://rpc.api.moonbeam.network
🟢 Metis 1088 METIS https://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

<details> <summary>🔴 "Chain ID not supported"</summary>

Solution:

  • ✅ Verify you're using a supported chain ID from the table above
  • ✅ Check the supported networks section </details>

<details> <summary>🔴 "API Key invalid"</summary>

Solution:

  • ✅ Verify your 0xGasless API key is correct
  • ✅ Ensure sufficient credits in your 0xGasless account
  • ✅ Check API key permissions and expiration </details>

<details> <summary>🔴 "Insufficient balance"</summary>

Solution:

  • ✅ Check token balance before operations
  • ✅ Ensure you have enough tokens for the transaction
  • ✅ Verify token contract address is correct </details>

<details> <summary>🔴 "Private key format error"</summary>

Solution:

  • ✅ Ensure private key starts with "0x"
  • ✅ Verify it's exactly 66 characters (64 + "0x")
  • ✅ Check for any extra spaces or characters </details>

🔍 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


<div align="center">

🚀 Made with ❤️ for the blockchain community

Empowering AI-driven blockchain interactions

Follow on GitHub Star this repo

</div>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选