Show HN: MCP Server for Non-Custodial Crypto Swaps – Xgram MCP

Hey HN,
I'm excited to share xgram-mcp-server — an open-source Model Context Protocol (MCP) server that turns any compatible LLM (Claude Code, Claude Desktop, Cursor, or custom agents) into a powerful non-custodial crypto swap operator.
The Problem
AI agents in 2026 are incredibly capable at reasoning, but they still struggle with secure, real-world financial actions like cryptocurrency swaps. Most existing solutions require custom API wrappers, proxies, web UIs, or — worse — custodial services that hold user funds. Developers waste time on brittle integrations, and users lose control over their assets.
We wanted something better: a clean, standardized way for AI agents to quote live rates, validate addresses, create swaps, and track transactions while keeping everything non-custodial.
The Solution: Xgram MCP Server
Xgram MCP connects directly to Xgram — a fast, non-custodial cryptocurrency exchange supporting 590+ coins and thousands of trading pairs across 100+ networks.
The server exposes Xgram’s REST API (https://xgram.io/api/v1) as native MCP tools. No proxies, no front-end, no extra hops. The LLM calls tools over stdio, and the server handles authentication and communication securely using your own API key.
Why non-custodial matters: Funds move wallet-to-wallet. Xgram never holds your assets longer than necessary for the swap. You retain full control and privacy.
Key Features
Live Rate Quoting — Floating and fixed-rate quotes with limits and expected output
Address Validation — Structural checks before any transaction
Swap Creation — Float/fixed rate swaps or fixed-receive payments
Status Tracking — Normalized exchange status polling
Discovery Tools — List all pairs and currencies with min/max amounts and networks
Multi-swap Support — Advanced routing for complex operations
Zero Proxy Architecture — Direct HTTPS calls for maximum speed and privacy
Client-Agnostic — Works with any MCP-compatible AI client
Average swaps complete in 5–12 minutes, with smart liquidity aggregation and volatility hedging for better reliability.
Technical Implementation
The server is built in TypeScript/Node.js using the official @modelcontextprotocol/sdk and Zod for schema validation. It’s lightweight, easy to self-host, and runs locally or on a VPS.
Installation (one minute):
git clone https://github.com/xgramexchange-ai/xgram-mcp-server.git
cd xgram-mcp-server
npm install
npm run build
Configuration for Claude Code (or similar):
{
"mcpServers": {
"xgram": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"XGRAM_API_KEY": "your_api_key_here"
}
}
}
}
Get your free API key from the Xgram Partner Dashboard. You can override the base URL with XGRAM_API_BASE for testing.
How It Works in Practice
Once connected, you can talk to your AI naturally:
“Quote me the best rate for 0.5 ETH to BTC right now.”
“Validate this Monero address and create a floating swap for 2 XMR if the rate is good.”
“Check the status of exchange ID abc123 and tell me when it completes.”
The agent intelligently chains tools: it discovers pairs if needed, fetches real-time rates, validates the destination address, creates the exchange after confirmation, and monitors progress. All while explaining every step.
Why We Built It This Way
Security First — Non-custodial by design. Private keys never leave your wallets.
Simplicity — No custom SDKs or complex OAuth flows for basic use.
Performance — Direct API access means low latency.
Extensibility — Easy to combine with other MCP servers (market data, wallets, oracles, notifications) for full autonomous DeFi agents.
Open Source — MIT licensed. Community contributions welcome.
We’ve normalized Xgram’s status fields and error handling so agents get clean, predictable responses.
Real-World Use Cases in 2026
Personal Finance Agents — Rebalance portfolios via natural language
DeFi Yield Optimizers — Swap into better opportunities automatically
Payment & Invoice Agents — Generate fixed-receive links for clients
Arbitrage & Research Agents — Compare rates across providers and execute
Enterprise Treasury Tools — Controlled swaps with audit trails
Comparison with Other Solutions
While there are excellent MCP servers for specific chains (Solana Jupiter, deBridge cross-chain, etc.), Xgram MCP stands out for general-purpose, multi-chain, non-custodial swaps with broad asset support and minimal setup. It’s particularly strong for users who want privacy-focused pairs (like BTC/XMR or USDT/XMR) and reliable execution without managing smart contracts.
Roadmap & Future Plans
Enhanced multi-swap orchestration
Better error recovery and retry logic
Integration examples with popular agent frameworks
Optional rate-comparison tools (combining multiple exchanges)
Docker & one-click deployment options
We’d love feedback from the HN community — especially on security, tool schemas, and additional features that would make AI crypto agents even more powerful.
Getting Started
GitHub: https://github.com/xgramexchange-ai/xgram-mcp-server
Live Exchange: https://xgram.io
API Keys: Xgram Business Dashboard
Try it with a small test swap first. The non-custodial nature makes experimentation safe and educational.
Private crypto swaps
Best rates. Secure. Wallet to wallet
