MAIN MCP
MAIN MCP Server
MCP (Model Context Protocol) Server für die MAIN DEX auf Base. Bietet KI-Agenten (Claude, Cursor, etc.) Werkzeuge zur Interaktion mit dem Protokoll: Token tauschen, Liquidität verwalten, ALM-Strategien beitreten/verlassen und mehr.
Verbindung zu Claude
Claude Code:
claude mcp add main-mcp --transport http https://api.main.exchange/mcpRelated MCP server: paean-dex-mcp
MCP-Protokoll
Der Server implementiert die MCP-Spezifikation 2025-03-26 über Streamable HTTP-Transport.
# Initialize
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'
# List tools
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
| jq '.result.tools[] | {name, description}'
# Health
curl https://api.main.exchange/mcp/healthx402-Zahlungen
Einige Werkzeuge erfordern eine USDC-Zahlung über das x402-Protokoll. Wenn ein kostenpflichtiges Werkzeug ohne Zahlung aufgerufen wird, antwortet der Server mit einem JSON-RPC-Fehler, der die Zahlungsanforderungen (Betrag, Empfänger, Netzwerk) enthält. x402-kompatible Clients handhaben dies automatisch.
Kostenpflichtige Werkzeuge: createPool, launchToken, getPoolsTerminal, getPoolTerminal, getTokenTerminal, getTokenHolders, getTokenSentiment, getForecastSummary
Werkzeuge
Token
getTokens — Alle Token im Protokoll abrufen, sortiert nach Handelsvolumen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getTokens","arguments":{}}}' \
| jq '.result.content[0].text | fromjson'approveTokens — Eine ERC20-Genehmigungstransaktion vorbereiten.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"approveTokens","arguments":{"tokenAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","spenderAddress":"0x002E67c3F7BF96eB3aA4066073923e415581d385"}}}' \
| jq '.result.content[0].text | fromjson'getTokenTerminal (kostenpflichtig via x402) — Detaillierte Token-Informationen vom api-terminal abrufen: Preis, Marktkapitalisierung, Angebot, Liquidität, Volumen, Transaktionen, Preisänderungen und soziale Links.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getTokenTerminal","arguments":{"tokenAddress":"0x4200000000000000000000000000000000000006"}}}' \
| jq '.result.content[0].text | fromjson'getTokenHolders (kostenpflichtig via x402) — Die Top 100 Halter eines Tokens vom api-terminal abrufen: Adresse, Label, Betrag, Prozentsatz und USD-Wert.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getTokenHolders","arguments":{"tokenAddress":"0x4200000000000000000000000000000000000006"}}}' \
| jq '.result.content[0].text | fromjson'getTokenSentiment (kostenpflichtig via x402) — Stimmungsanalyse für Token vom api-terminal abrufen: Narrativ (Zusammenfassung, Katalysatoren, Risiken) und Community-Erwähnungen (Stimmung, Stimmungsaufschlüsselung, Beiträge von X/Twitter).
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getTokenSentiment","arguments":{"symbol":"WETH"}}}' \
| jq '.result.content[0].text | fromjson'getForecastSummary (kostenpflichtig via x402) — Zusammenfassung der Preisprognose für einen Vermögenswert (BTC, ETH, SOL) vom api-terminal abrufen: Ausblick, vorhergesagter Preis, Unterstützungs-/Widerstandsniveaus und Wahrscheinlichkeitsverteilung.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getForecastSummary","arguments":{"asset":"BTC","horizon":"24h"}}}' \
| jq '.result.content[0].text | fromjson'launchToken (kostenpflichtig via x402) — Einen neuen ERC-20-Token auf MAIN starten. Gibt Calldata für TokenFactory.createToken zurück. Logo und Banner müssen zuvor auf IPFS hochgeladen werden (siehe IPFS-Upload-Endpunkt in der Werkzeugbeschreibung). Alle Token-Daten sind nach der Erstellung unveränderlich.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"launchToken","arguments":{"name":"My Token","symbol":"MTK","totalSupply":"10000000","logo":"bafkreibgxsqxrkrha3oqoatypp4gpuemft47ablrgxkfucqn2rvhsdwaka","description":"A cool token","website":"https://example.com"}}}' \
| jq '.result.content[0].text | fromjson'Handel
getPrice — Ein Tauschangebot abrufen: wie viel tokenOut für einen bestimmten Betrag von tokenIn.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getPrice","arguments":{"amount":"1000000000000000000","tokenIn":"0x4200000000000000000000000000000000000006","tokenOut":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}}' \
| jq '.result.content[0].text | fromjson'quoteSwap — Ein vollständiges Tauschangebot mit Calldata für die Ausführung über SwapRouter abrufen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"quoteSwap","arguments":{"amountIn":"1000000","tokenIn":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","tokenOut":"0x4200000000000000000000000000000000000006","recipient":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'Pools
getPoolsTerminal (kostenpflichtig via x402) — Die Liste der Pools auf Base vom api-terminal mit Marktdaten abrufen: TVL, 24h-Volumen, Token-Preise und Preisänderungen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getPoolsTerminal","arguments":{}}}' \
| jq '.result.content[0].text | fromjson'getPoolTerminal (kostenpflichtig via x402) — Detaillierte Informationen über einen bestimmten Pool vom api-terminal abrufen, einschließlich Token-Metadaten (Symbol, Name, Bild).
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getPoolTerminal","arguments":{"poolAddress":"0x70acdf2ad0bf2402c957154f944c19ef4e1cbae1"}}}' \
| jq '.result.content[0].text | fromjson'getPools — Liquiditätspools mit TVL, Volumen und Gebühren abrufen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getPools","arguments":{}}}' \
| jq '.result.content[0].text | fromjson'getPoolAPR — Pool-APR abrufen (alle Pools oder ein spezifischer).
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getPoolAPR","arguments":{}}}' \
| jq '.result.content[0].text | fromjson'addLiquidityToPool — Eine Transaktion vorbereiten, um Liquidität zu einem Algebra-Pool hinzuzufügen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"addLiquidityToPool","arguments":{"poolAddress":"0xPOOL","amount0":"1000000000000000000","amount1":"1000000","userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'removeLiquidityFromPool — Eine Transaktion vorbereiten, um Liquidität zu entfernen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"removeLiquidityFromPool","arguments":{"tokenId":"123","percentage":100,"userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'createPool (kostenpflichtig via x402) — Einen neuen CLMM-Pool auf MAIN erstellen und initialisieren. Akzeptiert Token in beliebiger Reihenfolge und einen menschenlesbaren Preis. Das Werkzeug ruft Token-Dezimalstellen on-chain ab, sortiert Token, berechnet sqrtPriceX96 und prüft, ob der Pool noch nicht existiert.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"createPool","arguments":{"tokenA":"0xTOKEN_A","tokenB":"0xTOKEN_B","price":"0.1"}}}' \
| jq '.result.content[0].text | fromjson'Positionen
getPositions — Alle offenen Liquiditätspositionen für eine Adresse abrufen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getPositions","arguments":{"userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'Smart Wallet
ALM-Strategien werden über ein Smart Wallet ausgeführt — einen deterministischen Proxy-Vertrag, der pro Benutzer bereitgestellt wird. Das Smart Wallet muss on-chain existieren, bevor eine Strategie eingegangen wird.
deploySmartWallet — Ein Smart Wallet für den Benutzer bereitstellen. Muss einmal aufgerufen werden, bevor Strategie-Werkzeuge verwendet werden. Die Transaktion muss direkt vom EOA des Benutzers gesendet werden (die Factory verwendet msg.sender als Deployment-Salt).
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"deploySmartWallet","arguments":{"userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'Strategien
getStrategies — Verfügbare ALM-Strategien mit Metriken abrufen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getStrategies","arguments":{}}}' \
| jq '.result.content[0].text | fromjson'getStrategyPositions — Benutzerpositionen in ALM-Strategien abrufen.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getStrategyPositions","arguments":{"userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'enterToStrategy — Einer ALM-Strategie beitreten. Gibt Calldata für das Smart Wallet zurück. Erfordert ein bereitgestelltes Smart Wallet (zuerst deploySmartWallet verwenden).
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"enterToStrategy","arguments":{"strategyId":"alm-v1","amount0":"500000","amount1":"0","userAddress":"0xYOUR_ADDRESS","duration":86400,"stopLoss":10,"takeProfit":25}}}' \
| jq '.result.content[0].text | fromjson'exitFromStrategy — Eine ALM-Strategie verlassen. Erfordert ein bereitgestelltes Smart Wallet.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"exitFromStrategy","arguments":{"strategyId":"alm-v1","positionId":"5","percentage":10000,"userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'increaseStrategy — Eine Position in einer ALM-Strategie erhöhen. Erfordert ein bereitgestelltes Smart Wallet.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"increaseStrategy","arguments":{"strategyId":"alm-v1","positionId":"5","amount0":"500000","amount1":"0","userAddress":"0xYOUR_ADDRESS"}}}' \
| jq '.result.content[0].text | fromjson'Broadcast
broadcastTx — Eine signierte Transaktion an die Blockchain senden.
curl -s -X POST https://api.main.exchange/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"broadcastTx","arguments":{"signedTxHex":"0xSIGNED_TX"}}}' \
| jq '.result.content[0].text | fromjson'This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityCmaintenanceMCP server bringing 100+ x402-paid APIs to AI agents (Claude, Cursor, MCP-aware clients). Auto-discovers tools from CDP Bazaar; handles USDC micropayments on Base.100521MIT

paean-dex-mcpofficial
AlicenseNot gradedqualityDmaintenanceDEX trading MCP server enabling autonomous token swaps on Base (Uniswap v3) and Solana (Jupiter) for AI agents, with privacy-first design and read-only mode.185MIT- AlicenseNot gradedqualityFmaintenanceMCP server for spread-only options execution on Base L2, enabling AI agents to trade options via a defined tool loop.1MIT
- AlicenseAqualityCmaintenanceMCP server for ThryxProtocol on Base, enabling AI agents to launch ERC-20 tokens, trade on bonding curves or Uniswap V4 pools, claim fees, and discover tokens through 21 native tools with gasless transactions.21622MIT
Related MCP Connectors
Multi-aggregator swap router for AI agents on Base. 10 bps fee. MCP-native, non-custodial.
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
HiveCapital MCP Server — autonomous investment layer for AI agents
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/asdener123/MAIN-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server