Authentication & Scopes
Krafto implements granular, least-privilege permission scoping to give developers and users complete control over what autonomous AI agents and external applications can access.
Authentication Methods
Standard for MCP clients and user sessions. Issued via PKCE authorization or personal token generation in the MCP dashboard. Transmitted in the Authorization: Bearer <token> header.
Standard for backend microservices and static pipelines. Generated under approved developer apps and transmitted in the X-Api-Key: kr_live_... header.
# 1. Authenticate with an MCP Personal Access Token
curl -X POST https://api.trykrafto.xyz/mcp \
-H "Authorization: Bearer mcp_live_981a7cf..." \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_account_info", "arguments": {}}}'
# 2. Authenticate REST API with Developer API Key
curl https://api.trykrafto.xyz/api/v1/assets \
-H "X-Api-Key: kr_live_4128f9..."Permission Scopes Catalog
Every MCP tool and REST endpoint enforces an explicit scope requirement.
catalog:readCatalog ReadBrowse active categories, search assets, read metadata, and fetch structured AI manifests.
library:readLibrary ReadView assets already owned by the authenticated user and verify license entitlements.
library:claimLibrary ClaimClaim free assets or redeem subscription tier quota allocations at zero wallet charge.
library:downloadLibrary DownloadGenerate signed, time-limited download URLs (S3/Cloudflare R2) for owned assets.
account:readAccount ReadInspect basic account profile, tier status (Free, Go, Pro, VIP), and remaining monthly quota.
wallet:spendWallet SpendExecute autonomous purchases using the user's preloaded Krafto Wallet balance.
wishlist:manageWishlist ManagementAdd or remove assets from the user's personal bookmarks and favorites list.
reviews:writeReviews & RatingsSubmit feedback, ratings (1-5 stars), and written reviews for purchased assets.
bundles:manageCustom BundlesCompose, package, and publish customized multi-asset packs with combined pricing.
When granting the wallet:spend scope to an AI coding agent, tools like purchase_asset_with_wallet accept a required confirmMaxPriceINR safety ceiling argument. If the live asset price exceeds this threshold, the transaction is immediately rejected with error code PRICE_CEILING_EXCEEDED without deducting funds.