MCP Server
Let AI agents interact with AutoLoop via the Model Context Protocol.
Overview
The AutoLoop MCP server allows AI agents (Claude, GPT, Cursor, etc.) to query and interact with the AutoLoop protocol programmatically. It exposes a set of read-only tools for free and operational/analysis tools behind x402 micropayments.
Endpoint: https://mcp.tryautoloop.com
SSE: https://mcp.tryautoloop.com/sse
Free Tools (Read-Only)
These tools require no payment and return live protocol data:
| Tool | Description |
|---|---|
get_deployments | Get contract addresses for a given network |
get_loop_status | Check a specific contract's loop status, balance, and execution count |
detect_contract_type | Identify if a contract is Standard, Hybrid VRF, or Full VRF |
get_registered_loops | List all registered contracts on a network |
get_gas_prices | Current gas prices and cost-per-tick estimates |
get_controller_info | Check if an address is a registered controller |
get_contract_balance | Get a contract's deposited ETH balance |
get_protocol_stats | Aggregate stats (total contracts, total executions, etc.) |
Example: Check a Contract
Ask any MCP-compatible AI agent:
"Check the status of contract 0x1234... on Sepolia using AutoLoop"
The agent will call get_loop_status and return registration status, balance, last execution time, and whether the loop is currently ready.
Paid Tools
Operational and analysis tools use x402 micropayments. Payment is gasless — your agent signs an EIP-3009 authorization for USDC on Base.
Operational Tools ($0.10 USDC base)
| Tool | Description |
|---|---|
generate_registration_tx | Generate a ready-to-sign registration transaction |
estimate_session_cost | Estimate total cost for a game session (duration, tick rate, mode) |
generate_integration_guide | Get a customized integration guide based on your use case |
Analysis Tools ($0.25 USDC base)
| Tool | Description |
|---|---|
audit_loop_config | Analyze a registered contract's configuration for issues |
analyze_loop_history | Review execution history, gas trends, and failure patterns |
analyze_vrf_frequency | For Hybrid VRF contracts, analyze VRF usage patterns and cost optimization |
Prices scale dynamically with ETH/USD to keep real costs stable.
Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"autoloop": {
"url": "https://mcp.tryautoloop.com/sse"
}
}
}Cursor
Add to your .cursor/mcp.json:
{
"mcpServers": {
"autoloop": {
"url": "https://mcp.tryautoloop.com/sse"
}
}
}Claude Code
Add to your .claude/settings.json or project settings:
{
"mcpServers": {
"autoloop": {
"url": "https://mcp.tryautoloop.com/sse"
}
}
}Payment Flow
For paid tools, the x402 flow works automatically:
- Agent calls a paid tool
- Server returns a 402 Payment Required response with a payment request
- Agent's x402 client signs an EIP-3009 USDC authorization (gasless)
- Agent retries the request with the signed payment header
- Server verifies payment and returns the result
This requires the agent to have access to a Coinbase CDP wallet or compatible x402 payment facilitator with USDC on Base.
Self-Hosting
The MCP server is open-source. To run your own:
git clone https://github.com/LuckyMachines/autoloop-mcp.git
cd autoloop-mcp
npm install
cp .env-example .env
# Edit .env with your RPC URLs and optional CDP credentials
npm startRequired environment variables:
| Variable | Required | Description |
|---|---|---|
RPC_URL_MAINNET | Yes | Ethereum mainnet RPC |
RPC_URL_SEPOLIA | Yes | Sepolia testnet RPC |
PORT | No | Server port (default: 3001) |
CDP_API_KEY | For paid tools | Coinbase CDP API key |
CDP_API_SECRET | For paid tools | Coinbase CDP API secret |
Use Cases
- AI game designers can query cost estimates and generate integration code
- Monitoring bots can check contract health and balance alerts
- Developer assistants can audit configurations and suggest optimizations
- Automated pipelines can register and fund contracts programmatically