Error Reference
A complete reference for all error codes you may encounter when using Toknbase. IC host for all connections:https://icp-api.io
Tip
Auth Errors
Most commonUnable to authenticateMCP server returns authentication failureCause
The Authorization header is missing from your hosted MCP config, the token has the wrong scope, or the token is expired/revoked.
Fix
1. Confirm your config includes headers: { Authorization: 'Bearer YOUR_AGENT_TOKEN' }. 2. Ensure the token has full_access or MCP-enabled scope — limited scope tokens fail silently. 3. Check Dashboard → Tokens for token status.
401 UnauthorizedMissing or invalid Authorization headerCause
The request was made without an Authorization header, or with a malformed token value.
Fix
Every request must include: Authorization: Bearer YOUR_AGENT_TOKEN. Create tokens in Dashboard → Tokens → Service Identities.
403 ForbiddenToken exists but lacks permissionCause
Agent token exists but lacks the required scope for this operation, or the secret is in a folder the token cannot access.
Fix
Check the token's scope and folder restrictions in Dashboard → Tokens. Create a new token with the correct scope (read_write or full_access).
Common Errors
IC0536Canister has no update methodCause
The canister wasm is outdated or the method name is misspelled.
Fix
Check you're using the correct canister ID (4wj64-piaaa-aaaan-q5q7q-cai) and the latest MCP server version (@toknbase/mcp-server@1.7.0).
IC0502Canister trapped explicitlyCause
The canister rejected the call, usually due to invalid input or a business logic check.
Fix
Read the error message for details. Common causes: duplicate secret name, invalid token, missing required fields.
IC0503Canister out of cyclesCause
The canister has run out of compute cycles.
Fix
Contact support at support@toknbase.net immediately.
HTTP Errors
400Bad RequestCause
Missing required fields or malformed request body.
Fix
Check the request body matches the expected schema. Use the API Reference for the correct field names.
404Not FoundCause
Secret with that name does not exist.
Fix
Verify the secret name is correct. Use GET /api/secrets to list all available names.
429Too Many RequestsCause
Rate limit exceeded.
Fix
Back off and retry after a short delay. Implement exponential backoff for production pipelines.
500Internal Server ErrorCause
Canister error or network issue.
Fix
Check canister status at dashboard.internetcomputer.org searching for 4wj64-piaaa-aaaan-q5q7q-cai. Retry after a few seconds.
Agent Token Errors
token_revokedAgent token has been revokedCause
The token was manually revoked in the Toknbase dashboard.
Fix
Create a new agent token in Dashboard → Tokens → Service Identities.
token_expiredAgent token has passed its expiry dateCause
The token was created with an expiry and that date has passed.
Fix
Create a new agent token with a new expiry date in Dashboard → Tokens → Service Identities.
token_scope_exceededOperation requires higher scopeCause
Trying to write with a read_only token, or other scope mismatch.
Fix
Create a token with the appropriate scope: read_write or full_access.
folder_restrictedSecret is in a restricted folderCause
The token has folder restrictions and the secret is in a folder the token cannot access.
Fix
Update the token's folder restrictions or create a new token scoped to the correct folder.
MCP Errors
method_not_foundMCP server version mismatchCause
The installed MCP server version doesn't match the canister's deployed methods.
Fix
Update to @toknbase/mcp-server@1.7.0: npx @toknbase/mcp-server@1.7.0. Or use the hosted endpoint which is always up to date.
agent_not_configuredTOKNBASE_AGENT_TOKEN not setCause
The TOKNBASE_AGENT_TOKEN environment variable is missing from your MCP config (self-hosted mode only).
Fix
Add TOKNBASE_AGENT_TOKEN to the env section of your MCP server config. For the hosted endpoint, use the Authorization header instead.
canister_unreachableCannot reach the ICP canisterCause
Network issue, incorrect IC_HOST, or canister is temporarily unavailable.
Fix
Confirm IC host is https://icp-api.io (not ic0.app). Check your internet connection and retry after a few seconds.
Note