Configuration
Configure authentication, private keys, and environment variables
Configuration is resolved in priority order: CLI args > environment variables > defaults.
Options
| CLI Arg | Environment Variable | Default | Description |
|---|---|---|---|
--apiToken | TORQUE_API_TOKEN | — | Auth token (takes priority over wallet auth) |
--privateKey | WALLET_PRIVATE_KEY | — | Solana private key for wallet-based JWT auth |
--apiUrl | TORQUE_API_URL | https://server.torque.so | Torque API base URL |
--platformUrl | TORQUE_PLATFORM_URL | https://platform.torque.so | Torque platform URL |
--ingesterUrl | TORQUE_INGESTER_URL | https://ingest.torque.so | Event ingestion endpoint |
Most users only need --apiToken or --privateKey. The URL options are for advanced use cases like self-hosted or staging environments.
Authentication
The server supports two authentication methods. You can also skip config and authenticate at runtime.
Auth Token (Recommended)
The simplest method. Get a token from platform.torque.so/connect-mcp and provide it in your MCP config.
TORQUE_API_TOKEN=your-tokenWhen an auth token is configured, it is used automatically — no additional steps needed.
Wallet-Based Auth
If you have a Solana keypair, the server signs a login message and obtains a JWT from the Torque API automatically.
WALLET_PRIVATE_KEY=your-base58-private-keyWhen a private key is configured, call the authenticate tool without arguments — the server signs the login message and authenticates automatically.
If you provide both an auth token and a private key, the auth token takes priority. If these belong to different accounts, actions created via the CLI won't appear in your web dashboard under the wallet account.
Auth Tools
| Tool | Description |
|---|---|
authenticate | Authenticate with a token or wallet. Call with authToken for token auth, or call without arguments to use wallet auth. |
check_auth_status | Check if you are authenticated and verify the token is still valid. Call this at the start of a session. |
logout | Clear the stored authentication token from the session and local cache. |
Token Persistence
Authentication tokens are persisted within the package's local cache directory:
- Tokens survive server restarts within the same installation.
- If the MCP client restarts, the server reloads the persisted token automatically.
- Tokens expire after 24 hours and need to be refreshed.
- Running
logoutclears the persisted token.
CLI Flags
| Flag | Description |
|---|---|
--help, -h | Show usage information and exit |
--version, -v | Show the package version and exit |
npx @torque-labs/mcp --help
npx @torque-labs/mcp --version