Date: February 8, 2026
Component: Treasury MCP (The Almoner)
SDK: @coinbase/agentkit v0.10.4
The agent is unable to authenticate with the Coinbase Developer Platform (CDP) using the provided API Key. The Treasury module is currently PAUSED due to this blocker.
- Key Name/ID:
47d7ced5-c1f6-4cb2-bc9f-77a81c36f4d8 - Key Type: Ed25519 (assumed from base64 length)
- Permissions: Unknown (User needs to verify "AgentKit" or "Wallets" access)
- Network:
base-mainnet(andbase-sepolia)
We attempted to pass the key secret exactly as copied from the file.
- Input Format:
aQF1Q/E4Bj...(88 chars) - Result:
❌ FAILED: Unauthorized. - Interpretation: The server received the request but rejected the credentials. This usually implies the Key ID and Secret do not match, or the Key lacks permissions for the requested scope.
We attempted to programmatically wrap the key in standard OpenSSL headers.
- Input Format:
-----BEGIN PRIVATE KEY----- aQF1Q/E4Bj... -----END PRIVATE KEY----- - Result:
❌ FAILED: Invalid key format - must be either PEM EC key or base64 Ed25519 key - Interpretation: The SDK parser rejected this manual wrapping, confirming that the raw key is likely the correct format but the authentication is failing upstream.
We verified the import paths for CdpEvmWalletProvider.
- Finding: We are using
@coinbase/agentkitcorrectly. The issue is not the import path.
We used the following script (scripts/diagnose_cdp.ts) to isolate the issue:
import { CdpEvmWalletProvider } from "@coinbase/agentkit";
const config = {
apiKeyId: process.env.CDP_API_KEY_NAME,
apiKeySecret: process.env.CDP_API_KEY_PRIVATE_KEY, // Tried both Raw and PEM
networkId: 'base-sepolia'
};
try {
const provider = await CdpEvmWalletProvider.configureWithWallet(config);
console.log("Success");
} catch (e) {
console.log(e.message); // Returns "Unauthorized"
}The error Unauthorized (401) combined with a syntactically correct key strongly suggests the key itself is:
- Revoked/Deleted in the CDP Portal.
- Scope Restricted (e.g., does not have Wallet/Trade permissions).
- Mismatched: The
apiKeyId(47d...) does not belong to theapiKeySecret(aQF...).
Next Step: Generate a brand new API Key in CDP Portal > Settings > API Keys. Ensure "AgentKit" is selected if available, or grant full "Trading" permissions.