Installation
Prerequisites
- Node.js 18.0 or higher
- npm, yarn, pnpm, or bun package manager
- Access to 0G Galileo testnet
Package Installation
Clone the repository and install dependencies:Building the Server
Compile the TypeScript source code:dist/
directory.
Environment Configuration
Create a.env
file in the project root:
.env
file with your configuration:
Environment Variables
Variable | Description | Default |
---|---|---|
ZEROQ_RPC_URL | 0G EVM RPC endpoint | https://evmrpc-testnet.0g.ai |
RATE_LIMIT_REQUESTS | Maximum requests per window | 100 |
RATE_LIMIT_WINDOW | Rate limit window in milliseconds | 60000 |
Running the Server
Development Mode
For development with auto-reload:Production Mode
For production deployment:Integration with Claude Desktop
To use this MCP server with Claude Desktop, you need to configure it in Claude’s settings.Configuration File Locations
macOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Configuration Setup
Add the following to yourclaude_desktop_config.json
:
/path/to/your/mcp-0g
with the actual path to your project directory.
Alternative: Using npx
If you prefer to use npx (after publishing to npm):Node.js Version Compatibility
Ensure you’re using Node.js v18+ for compatibility. You can create a wrapper script if needed:Verification
After setup, restart Claude Desktop and verify the integration:- Look for the 🔌 icon in the Claude chat interface
- You should see “0g-chain” in the list of available MCP servers
- Test the connection by asking Claude to interact with the 0G testnet
Test Commands
Try these commands in Claude to verify functionality:Troubleshooting
Common Issues
- Server not starting: Check Node.js version and dependencies
- Claude not connecting: Verify configuration file path and syntax
- Permission errors: Ensure proper file permissions for the server executable