# Xgram Mcp Server

> Open-source Model Context Protocol (MCP) server for the Xgram cryptocurrency exchange — quote rates, create crypto swaps, validate addresses, and track exchange status from Claude Code or any AI agent.

- **Type:** MCP server
- **Install:** `agentstack add mcp-xgramexchange-ai-xgram-mcp-server`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [xgramexchange-ai](https://agentstack.voostack.com/s/xgramexchange-ai)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [xgramexchange-ai](https://github.com/xgramexchange-ai)
- **Source:** https://github.com/xgramexchange-ai/xgram-mcp-server
- **Website:** https://xgram.io

## Install

```sh
agentstack add mcp-xgramexchange-ai-xgram-mcp-server
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# xgram-mcp-server

**xgram-mcp-server is an open-source [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that exposes the [Xgram](https://xgram.io) cryptocurrency exchange API as tools for Claude and other AI agents.** It lets an AI assistant quote rates, validate addresses, create crypto exchanges, and poll their status — directly, with no proxy hop and no web app running.

[](LICENSE)
[](https://modelcontextprotocol.io)
[](https://nodejs.org)
[](https://claude.com/claude-code)

---

## What is this?

The **Model Context Protocol (MCP)** is an open standard that lets AI assistants call external tools. **xgram-mcp-server** implements that standard for [Xgram](https://xgram.io), a non-custodial cryptocurrency exchange. Once connected, any MCP client — Claude Code, Claude Desktop, or your own agent — can operate an Xgram account through plain language:

> "Quote me BTC → XMR for 0.05 BTC, then create the exchange to this address."

It talks to `https://xgram.io/api/v1` directly over HTTPS using your `XGRAM_API_KEY`. No Next.js, no proxy, no browser.

## Features

- 🔁 **Quote crypto swaps** — live floating rates and limits for any supported pair
- 💱 **Create exchanges & payments** — float or fixed-rate, swap or fixed-receive invoice
- 📡 **Track status** — normalized exchange status by ID
- ✅ **Validate addresses** — structural check before sending funds
- 🪙 **Discover currencies & pairs** — full list with min/max amounts and networks
- 🧩 **Client-agnostic** — works with any MCP client over stdio
- 📦 **Zero proxy** — calls the Xgram REST API directly; only `@modelcontextprotocol/sdk` + `zod`

## Install

```bash
git clone https://github.com/xgramexchange-ai/xgram-mcp-server.git
cd xgram-mcp-server
npm install
npm run build
```

This produces `dist/index.js`.

## Configure (Claude Code)

Add this to your Claude Code config (typically `~/.claude.json`):

```jsonc
{
  "mcpServers": {
    "xgram": {
      "command": "node",
      "args": ["/absolute/path/to/xgram-mcp-server/dist/index.js"],
      "env": {
        "XGRAM_API_KEY": "your-key-here"
      }
    }
  }
}
```

Restart Claude Code. The `xgram_*` tools become available. The same `command`/`args`/`env`
block works in any other MCP client (Claude Desktop, custom agents, etc.).

> Get an `XGRAM_API_KEY` from the [Xgram partner dashboard](https://xgram.io/business).

## Tools

| Tool | Purpose |
|---|---|
| `xgram_list_pairs` | All available `[fromCcy, toCcy]` trading pairs |
| `xgram_list_currencies` | All currencies with `minFrom` / `maxFrom` / `network` metadata |
| `xgram_get_rate` | Live floating rate and limits for a pair + amount |
| `xgram_validate_address` | Check whether an address is structurally valid for a coin |
| `xgram_create_exchange` | Initiate an exchange (`float`/`fixed`) or fixed-receive payment |
| `xgram_get_status` | Normalized status of an exchange by ID |

All tools call `https://xgram.io/api/v1` using the `XGRAM_API_KEY` env var. Override the
base URL with `XGRAM_API_BASE` if you need to point at a staging environment.

## Environment variables

| Variable | Required | Default | Description |
|---|---|---|---|
| `XGRAM_API_KEY` | Yes | — | Your Xgram API key, sent as the `x-api-key` header |
| `XGRAM_API_BASE` | No | `https://xgram.io/api/v1` | Override the API base URL |

## FAQ

**What is an MCP server?**
An MCP (Model Context Protocol) server exposes tools that an AI assistant can call. This one
wraps the Xgram cryptocurrency exchange API so Claude and other agents can quote rates and
create swaps without a custom integration.

**Which AI clients does it work with?**
Any MCP-compatible client. It is tested with Claude Code and works the same way with Claude
Desktop or your own agent, since it speaks MCP over stdio.

**Do I need to run the Xgram web app?**
No. The server calls the Xgram REST API directly — there is no proxy and no front-end required.

**Is it free and open source?**
Yes. It is released under the MIT license. You provide your own Xgram API key.

**How are Xgram's `x-` status fields handled?**
The status tool normalizes Xgram's `x-` prefixed status keys (e.g. `x-completed` → `completed`)
so callers don't have to special-case them. Xgram errors (`{result: false, ...}`) are surfaced
as MCP errors with the original message rather than as a successful response.

## Related

- [Xgram](https://xgram.io) — the cryptocurrency exchange this server connects to
- [Xgram partner dashboard](https://xgram.io/business) — register and get an API key
- [Model Context Protocol](https://modelcontextprotocol.io) — the open standard this implements
- [Claude Code](https://claude.com/claude-code) — Anthropic's CLI for Claude

## License

[MIT](LICENSE)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [xgramexchange-ai](https://github.com/xgramexchange-ai)
- **Source:** [xgramexchange-ai/xgram-mcp-server](https://github.com/xgramexchange-ai/xgram-mcp-server)
- **License:** MIT
- **Homepage:** https://xgram.io

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-xgramexchange-ai-xgram-mcp-server
- Seller: https://agentstack.voostack.com/s/xgramexchange-ai
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
