gainium-mcp
An MCP (Model Context Protocol) server for Gainium — the crypto trading bot platform. Lets AI assistants manage your bots, deals, balances, and more through a standard MCP interface.
Detailed setup and connection documentation is available in docs/using-gainium-mcp.md.
Quick Start
1. Get your API keys
Go to Gainium API Settings and create an API key pair.
2. Add to your MCP client
Add this to your MCP configuration (VS Code, Claude Desktop, etc.):
{
"gainium-mcp": {
"command": "npx",
"args": ["-y", "gainium-mcp"],
"env": {
"GAINIUM_API_KEY": "<your-api-key>",
"GAINIUM_API_SECRET": "<your-api-secret>"
}
}
}That's it. The server starts automatically when your AI assistant needs it.
This local stdio mode uses GAINIUM_API_KEY and GAINIUM_API_SECRET from the server process environment.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
GAINIUM_API_KEY |
Yes | — | Your Gainium API public key |
GAINIUM_API_SECRET |
Yes | — | Your Gainium API secret |
GAINIUM_API_BASE_URL |
No | https://api.gainium.io |
API base URL |
GAINIUM_MCP_TRANSPORT |
No | stdio |
Transport mode: stdio, http, streamable-http, sse, or http-sse |
GAINIUM_MCP_HOST |
No | 127.0.0.1 |
Bind host for HTTP mode |
GAINIUM_MCP_PORT |
No | 3000 |
Bind port for HTTP mode |
GAINIUM_MCP_HTTP_PATH |
No | /mcp |
Streamable HTTP endpoint path |
GAINIUM_MCP_SSE_PATH |
No | /sse |
Deprecated SSE GET endpoint path |
GAINIUM_MCP_MESSAGES_PATH |
No | /messages |
Deprecated SSE POST endpoint path |
GAINIUM_OAUTH_ISSUER |
No | — | Authorization-server base URL. Setting this (with MCP_INTROSPECTION_SECRET, in HTTP mode) enables OAuth protected-resource mode |
GAINIUM_INTROSPECTION_URL |
No | <issuer>/oauth/introspect |
Token introspection endpoint |
MCP_INTROSPECTION_SECRET |
No | — | Shared secret presented to the introspection endpoint (must match the auth server) |
GAINIUM_MCP_PUBLIC_URL |
No | derived from request | Public base URL used in the protected-resource metadata |
OPENAI_APPS_CHALLENGE_TOKEN |
No | — | When set, served as plain text at /.well-known/openai-apps-challenge for OpenAI Apps domain verification |






