Which keys you provide determines the mode the server runs in.
Environment Variables
Modes
The server picks a mode from the keys you provide:- Read-only: set only
ADDRESS. All read (GET) tools work; write (POST) tools return a clear “read-only mode” error. - Agent-key (recommended): set
ADDRESS+AGENT_PRIVATE_KEY. Full trading without ever putting your main wallet’s private key in the config. - Main-key: set
ADDRESS+PRIVATE_KEY. Full trading, signing with the main wallet key (legacy behavior).
[pacifica-mcp] account=<address> mode=agent-key.
On-Chain Funding Tools
Two tools -mintUsdp and depositUsdp - sign and send Solana transactions directly instead of calling the REST API, so they have their own requirements:
- They require
PRIVATE_KEY. An agent key signs API requests only and cannot sign on-chain transactions, so it does not work for these tools - this is the one case where the main key is required. - They use
SOLANA_RPC_URLfor the Solana connection. It defaults to public devnet; set a dedicated RPC to avoid rate limits. mintUsdpis testnet only and is registered only whenPACIFICA_BASE_URLtargets testnet.depositUsdpworks on both networks; on mainnet it moves real USDC.
mintUsdp to credit your wallet, then depositUsdp to move those funds into your exchange balance. See Tools for the tool list.
Recommended: Agent Key
An agent key is a revocable key bound to your account: it can trade, but it cannot move funds the way your main wallet can, and you can revoke it at any time.Generate and bind one once at app.pacifica.fi/apikey. You sign the binding in-browser, so your main secret never leaves your wallet.
Then configure the MCP with only your account address and the agent key:
Security
Important: Never commit or paste yourPRIVATE_KEYorAGENT_PRIVATE_KEYanywhere public. Treat any key that has been exposed as compromised and rotate it.
- Prefer an agent key over your main key: it is revocable and limited in scope.
- The config file holds your key in plaintext, so protect it like any other secret.