# Gainium/gainium-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/Gainium/gainium-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 284  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gainium-gainium-mcp

## Description
MCP server for Gainium DCA/Combo/Grid trading bots — manage bots, deals, balances, backtests, the crypto screener, and curated strategy presets via AI assistants.

## Tools
Capabilities this server exposes over MCP:

- **list_bots** — List bots by type (`dca`, `combo`, `grid`) with filters and field selection
- **get_bot** — Get a single bot by id and type
- **create_bot** — Create a bot (`dca`, `combo`, or `grid`)
- **update_bot** — Update bot settings
- **clone_bot** — Clone a bot with optional overrides
- **manage_bot** — Lifecycle action: `start`, `stop`, `archive`, `restore`, `changePairs
- **list_deals** — List deals by type (`dca`, `combo`, `terminal`) with filters
- **get_deal** — Get a single deal by id and type
- **create_deal** — Create a deal
- **update_deal** — Update an active deal
- **manage_deal** — Deal action: `close`, `addFunds`, `reduceFunds
- **run_backtest** — Run a backtest: `validate`, `estimate`, async, or sync (`request`/`requestSync` submit a job — not read-only)
- **backtest_info** — List backtest requests or get one by ID
- **discover** — Schema discovery for bot types and indicators
- **get_account** — Balances, connected exchanges, supported exchanges, and global variables
- **get_screener** — Cryptocurrency screener with market metrics
- **manage_global_variable** — Global variable action: `create`, `update`, `delete

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gainium-mcp": {
    "command": "npx",
    "args": ["-y","gainium-mcp"],
    "env": {
      "GAINIUM_API_KEY": "",
      "GAINIUM_API_SECRET": ""
    }
  }
}
```

**Requires environment variables:** `GAINIUM_API_KEY`, `GAINIUM_API_SECRET` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Gainium/gainium-mcp does

Gainium/gainium-mcp exposes Gainium's crypto trading operations through the Model Context Protocol. It lets an MCP-compatible assistant inspect and manage DCA, Combo, and Grid bots, including creating, updating, cloning, starting, stopping, archiving, restoring, and changing bot pairs.

The server also handles deal operations for DCA, Combo, and terminal deals. Assistants can list or retrieve deals, create new ones, update active deals, close them, or add and reduce funds. Account and market tools provide balances, connected and supported exchanges, global variables, and cryptocurrency market metrics through the screener.

Backtesting is included, with tools for validation, estimation, synchronous requests, asynchronous requests, and inspecting submitted backtest jobs. The `discover` tool provides schema information for bot types and indicators, which can help an assistant construct requests that match Gainium's available configuration.

## How it works

The default deployment uses stdio: an MCP client starts the process with `npx -y gainium-mcp`, and the process reads Gainium credentials from its environment. API requests use `GAINIUM_API_KEY` and `GAINIUM_API_SECRET`. In header-based stdio or hosted deployments, request headers can provide credentials and take precedence over environment values.

HTTP mode is enabled with `GAINIUM_MCP_TRANSPORT=http`. The process then serves the current Streamable HTTP transport at the configured MCP path and also provides the older SSE endpoints for clients that still use them. OAuth 2.1 protected-resource mode is available for hosted deployments. In that mode, clients send Bearer tokens, which are checked through a token-introspection endpoint and resolved to the user's Gainium credentials and restrictions.

Read and write operations are separated through API permissions and MCP safety annotations. Read-only keys can use inspection, discovery, screener, and backtest-information operations. Write keys are needed for bot, deal, global-variable, and backtest submission actions.

## Setup and configuration

Create a Gainium API key pair in Gainium API Settings, then add the server to the MCP client's configuration. A local stdio configuration uses:

```json
{
  "gainium-mcp": {
    "command": "npx",
    "args": ["-y", "gainium-mcp"],
    "env": {
      "GAINIUM_API_KEY": "<your-api-key>",
      "GAINIUM_API_SECRET": "<your-api-secret>"
    }
  }
}
```

The default API base URL is `https://api.gainium.io`. HTTP deployments can set the bind host, port, MCP path, SSE paths, and allowed hosts with environment variables. Hosted OAuth deployments additionally configure an issuer, introspection secret, and public URL. The server supports `stdio`, `http`, `streamable-http`, `sse`, and `http-sse` transport values.

## Tools and capabilities

The toolset contains these operation groups:

- **Bots:** `list_bots`, `get_bot`, `create_bot`, `update_bot`, `clone_bot`, and `manage_bot`.
- **Deals:** `list_deals`, `get_deal`, `create_deal`, `update_deal`, and `manage_deal`.
- **Backtests:** `run_backtest` and `backtest_info`.
- **Discovery and account data:** `discover`, `get_account`, `get_screener`, and `manage_global_variable`.

List and get operations support field selection. Presets include `minimal`, `standard`, `extended`, and `full`; custom comma-separated dot-notation fields are also supported. The minimal preset can substantially reduce response payload size.

## Limitations and notes

Write-capable tools can change bots, deals, global variables, and backtest jobs, so credentials and client permissions should be selected carefully. Read-only keys cannot perform those actions. HTTP deployments require appropriate host protection, and OAuth mode applies token audience checks when a public URL is configured. The SSE endpoints are retained for compatibility but are described as deprecated in favor of Streamable HTTP.

_Full upstream README: https://allmcps.com/mcp/gainium-gainium-mcp/readme_

