MoonGate MCP Server
Provides tools for interacting with Solana through a MoonGate wallet: signing and broadcasting transactions, sending SOL/SPL tokens, querying portfolios, searching tokens, and swapping tokens via Jupiter.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MoonGate MCP Server
Model Context Protocol (MCP) server for MoonGate - the Solana wallet with zero-friction authentication.
This server enables AI assistants and tools like Claude (via API or Desktop), OpenClaw, and Cursor to interact with your MoonGate wallet:
π Sign transactions and messages
πΈ Send tokens (SOL and SPL tokens)
π View portfolio and balances
π Swap tokens
π OAuth-based authentication (Google/Apple)
Quick Start
Installation
npm install -g moongate-mcp-serverConfiguration
For Claude Desktop
Add to your ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"moongate": {
"command": "npx",
"args": ["-y", "moongate-mcp-server"],
"env": {
"MOONGATE_API_URL": "https://wallet.moongate.one"
}
}
}
}For Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"moongate": {
"command": "npx",
"args": ["-y", "moongate-mcp-server"]
}
}
}For OpenClaw or Custom Integrations
Use the MCP SDK to connect to the server programmatically. See the MCP documentation for details on client implementation.
Authentication
π See AUTH-GUIDE.md for detailed instructions with screenshots.
TL;DR: Use a token from your browser session (recommended):
Log into wallet.moongate.one
Open DevTools β Application β Local Storage
Copy the
tokenvalueAdd it to your MCP config as
MOONGATE_TOKEN
For Claude Desktop:
{
"mcpServers": {
"moongate": {
"command": "npx",
"args": ["-y", "moongate-mcp-server"],
"env": {
"MOONGATE_TOKEN": "eyJhbGciOiJSUzI1NiIsInR5cCI6..."
}
}
}
}Tokens expire after 7 days - just grab a fresh one from your browser when needed.
Related MCP server: Solana MCP Server
Available Tools
get_wallet_address
Get your MoonGate wallet's public key (address).
// No parameters requiredReturns:
{
"publicKey": "5xGj3..."
}sign_message
Sign a message with your wallet.
Parameters:
message(string | number[]): The message to sign
Returns:
{
"signature": "4vJ5a..."
}sign_transaction
Sign a Solana transaction (optionally broadcast it).
Parameters:
serializedTransaction(number[]): Serialized transaction bytestype(string): Transaction type - "legacy" or "versioned" (default: "versioned")broadcast(boolean): Whether to broadcast after signing (default: false)includePayerSignature(boolean): Include payer signature (default: true)
Returns:
{
"signatures": ["..."],
"signedTransaction": [/* bytes */],
"txSignature": "3nZ4..." // if broadcast=true
}send_token
Send SOL or SPL tokens to another address. Fetches your portfolio to resolve the token, verify balance, and use correct decimals.
Parameters:
tokenMint(string): Token mint address (optional if tokenName/tokenSymbol provided)tokenName(string): Token name to search in portfolio (e.g. "Wrapped SOL")tokenSymbol(string): Token symbol to search in portfolio (e.g. "SOL", "USDC")toAddress(string): Recipient wallet addressamount(number): Amount to senddecimals(number): Token decimals (optional; auto-fetched from portfolio)userWallet(string): Optional - sender address (auto-detected if omitted)
Note: Provide at least one of tokenMint, tokenName, or tokenSymbol. The token must exist in your portfolio.
Returns:
{
"success": true,
"signature": "2wE3..."
}get_portfolio
Get wallet portfolio (tokens, balances, NFTs).
Parameters:
walletAddress(string): Optional - wallet to query (defaults to your wallet)
Returns:
{
"tokens": [...],
"totalValue": 1234.56,
"nfts": [...]
}search_token
Search for Solana tokens by name, symbol, or mint address. Returns top results sorted by market cap.
Parameters:
query(string): Token name (e.g. "Solana"), symbol (e.g. "SOL"), or mint addresslimit(number): Maximum results to return (default: 10, max: 100)
Returns:
{
"success": true,
"results": [
{
"mint": "So11111111111111111111111111111111111111112",
"name": "Wrapped SOL",
"symbol": "SOL",
"decimals": 9,
"price": "$86.46",
"marketCap": "52474839784",
"volume24h": "139815210",
"holders": 2877594,
"image": "https://..."
}
],
"count": 1
}swap_token
Swap tokens via MoonGate DEX integration (Jupiter). Supports searching by name/symbol or mint address.
Parameters:
inputMint(string): Input token mint address (optional if inputToken provided)inputToken(string): Input token name/symbol (e.g. "SOL", "USDC") - searches for mintoutputMint(string): Output token mint address (optional if outputToken provided)outputToken(string): Output token name/symbol (e.g. "SOL", "USDC") - searches for mintinputAmount(number): Amount of input token to swapslippagePercentage(number): Slippage tolerance in basis points (default: 100 = 1%)transactionSpeed(string): Priority - "slow", "normal", or "fast" (default: "normal")
Note: Provide either mint address OR name/symbol for each token. Name/symbol search returns the top result by market cap.
Returns:
{
"success": true,
"signature": "4xK2...",
"transactionCount": 1,
"inputToken": "USDC",
"outputToken": "SOL",
"inputAmount": 100
}get_token_info
Get detailed token information including security analysis and rugpull risk indicators.
Parameters:
tokenMint(string): Token mint address (optional if tokenName provided)tokenName(string): Token name or symbol to search for
Returns:
{
"token": {
"mint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
"name": "Bonk",
"symbol": "BONK",
"decimals": 5,
"supply": 87995151415980.58,
"createdAt": 1670531612
},
"price": {
"usd": 0.00000646,
"marketCap": 568745265,
"circulatingMarketCap": 531283669
},
"security": {
"mintable": false,
"freezable": false,
"lockedLiquidityPercent": 75,
"topHoldersPercent": 33.56,
"devHoldersPercent": 0.000000166,
"snipersPercent": 0
},
"market": {
"liquidity": 178311,
"holders": 987817,
"buyCount24h": 5165,
"sellCount24h": 5630,
"buyerSentimentPercent": 47.85
},
"socialLinks": {
"website": "https://www.bonkcoin.com",
"twitter": "https://twitter.com/bonk_inu",
"telegram": "https://t.me/Official_Bonk_Inu"
},
"riskAssessment": {
"overallRisk": "LOW",
"riskIndicators": ["No major red flags detected"],
"safetyIndicators": [
"Good liquidity ($178.3K)",
"987,817 holders",
"Good distribution (top holders: 33.6%)",
"β Not mintable or freezable",
"75% liquidity locked",
"Has social media presence"
],
"recommendation": "β Appears relatively safe, but always DYOR (Do Your Own Research)"
}
}Risk Indicators:
Liquidity: Low liquidity (<$10K) flags high rugpull risk
Holder Distribution: Top holders >50% indicates concentration risk
Security: Mintable/freezable tokens can be manipulated
Locked Liquidity: <50% locked is risky
Age: Very new tokens (<7 days) are higher risk
Social Presence: No social links is suspicious
Sentiment: Low buyer percentage (<30%) indicates bearish market
Risk Levels:
LOW: 0-1 risk indicatorsMODERATE: 2-4 risk indicatorsHIGH: 5+ risk indicators
Environment Variables
Variable | Description | Default |
| MoonGate API base URL |
|
| OAuth callback port |
|
| Debug logging (verbose) |
|
| Manual token (for testing) | - |
Development
Local Setup
git clone https://github.com/invictusdhahri/moongate-mcp-server.git
cd moongate-mcp-server
npm install
npm run buildTesting
For quick testing without OAuth flow, set a manual token:
export MOONGATE_TOKEN="your-jwt-token"
npm run devBuilding
npm run buildThe built files will be in dist/.
Authentication Flow
sequenceDiagram
participant User
participant MCP as MCP Server
participant Browser
participant MG as MoonGate API
MCP->>MCP: Check ~/.moongate-mcp/session.json
alt Session exists & valid
MCP->>MG: GET /api2/auth (refresh if needed)
MG-->>MCP: Fresh token
else No session or expired
MCP->>Browser: Open localhost:8787
Browser->>Browser: User clicks Google/Apple
Browser->>MG: OAuth verification
MG-->>Browser: JWT token
Browser->>MCP: Redirect with token
MCP->>MCP: Save session.json
end
MCP-->>User: Ready for tool callsSecurity
Session Storage: Tokens stored in
~/.moongate-mcp/session.jsonwith0o600permissions (user read/write only)Auto-Refresh: Tokens automatically refresh when within 1 hour of expiry
Password-less Signing: All signing operations use empty password per MoonGate OAuth design
Local OAuth: Authentication happens via localhost callback, not exposing credentials
Roadmap
Phase 1: Core tools (get address, sign message/tx)
Phase 2: OAuth browser flow, send tokens
Phase 3: Portfolio & swap tools
Phase 4: Token search and rugpull analysis
Phase 5: npm publish as
moongate-mcp-serverPhase 6: NFT operations (list, transfer, mint)
Phase 7: Token metadata updates
Phase 8: Multi-wallet support
Troubleshooting
"Not authenticated" or "Invalid token" error
Your token has expired (7-day lifetime). Get a fresh one:
Go to wallet.moongate.one and log in
Open DevTools β Application β Local Storage β
https://wallet.moongate.oneCopy the
tokenvalueUpdate
MOONGATE_TOKENin your MCP configRestart Claude Desktop / your MCP client
OAuth callback times out or "localhost:8787" won't load
Solution: Use the manual token method instead (see Authentication section above). The local OAuth server requires port 8787 to be available and may not work in sandboxed environments.
If you need OAuth: set MOONGATE_CALLBACK_PORT to another port and ensure it's accessible.
Debug logging
Debug logging is enabled by default. To disable it:
export MOONGATE_MCP_DEBUG=falseTesting with MCP Inspector
The MCP Inspector provides a web UI to test your server:
npx @modelcontextprotocol/inspector node dist/cli.jsThis will open a browser where you can:
View all available tools
Test tool calls with a form UI
See request/response logs in real-time
Debug without needing Claude Desktop
Contributing
Contributions welcome! Please open an issue or PR.
License
MIT
Links
Built with β€οΈ for the Solana ecosystem
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Run all your Solana wallets from your AI: send, swap, split, consolidate and clean up.
Non-custodial DeFi tools for AI agents on Solana: swaps, perps, lending, staking, equities.
Solana onchain intelligence for AI agents: wallet risk, due-diligence, perps funding, smart money.
Solana wallet & token checks for agents, pay per call in USDC via x402 (Solana or Base).
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI agents to interact with cryptocurrency ecosystems through wallet management, trading operations (swaps, DCA, limit orders), staking, and multi-chain support starting with Solana.37GPL 3.0
- AlicenseAqualityDmaintenanceEnables AI agents to read chain data, execute transactions, swap tokens, and manage wallets on Solana through 38 tools across 7 modules. Supports write operations with a private key and includes built-in prompts for common workflows.381MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with the Solana blockchain, manage accounts and tokens, and develop and deploy smart contracts end-to-end.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Solana blockchain through MCP, supporting wallet queries, token swaps via Jupiter, token transfers, and market data.MIT