K
KiflyDeveloper Docs
Sign up →
Agent Integration

Connect to Claude

One-click install the Kifly MCP server into Claude Desktop or Claude.ai.

You'll be prompted for your Kifly agent key. Generate one at /dashboard/api-keys.

Kifly MCP Integration Guide

Connect any MCP-compatible agent to Kifly's live product catalog using the Model Context Protocol over HTTP.


Endpoint

https://kifly.ai/api/mcp

Stateless StreamableHTTP transport. Every request is independent — no session state is held server-side between calls.


Authentication

Pick the credential by what you're building, not by what's simplest. The three paths return different data, and getting this wrong is silent — the wrong key doesn't error, it just quietly shows you less than the whole network.

You're buildingUseSees
An integration against your own storeA seller API key (kfa_live_)That store only. Cannot be upgraded to network scope.
A buyer agent that shops on a person's behalfOAuth 2.1 (below)The whole network. No Kifly account required to register.
A headless agent with no human present at connect timeA network key (kfn_live_)The whole network. See "Network keys" below.

Seller API key (kfa_live_) — your own store only

Generate one from the Kifly seller dashboard → Developer → API Keys. It authenticates as your store and only ever returns your catalog — search, list_sellers, and every other read are scoped to seller_id, by design (this is the boundary that keeps one seller's key from ever reading another seller's data). Requesting network scope on this key type is rejected at creation. If your agent needs to discover products across multiple sellers, this is the wrong key — use OAuth or a network key instead.

Authorization: Bearer kfa_live_xxxxxxxxxxxxxxxx

OAuth 2.1 — cross-network, per-user consent

Kifly runs a full OAuth 2.1 server with open dynamic client registration — no Kifly seller account needed to register a client, and no storefront of your own. This is the right choice for a buyer agent acting on behalf of a person who is present to consent.

EndpointURL
Authorization server metadatahttps://kifly.ai/.well-known/oauth-authorization-server
Dynamic client registrationhttps://kifly.ai/oauth/register
Authorizationhttps://kifly.ai/oauth/authorize
Tokenhttps://kifly.ai/oauth/token

PKCE S256 required. Refresh tokens rotate on each use. This is what claude.ai and other OAuth-requiring hosts negotiate automatically.

Network keys (kfn_live_) — headless agents, no human at connect time

If your agent runs unattended — no human in the loop to complete an OAuth consent screen — mint a network key instead:

POST /api/developer/network-keys
Authorization: <your Kifly session>
Content-Type: application/json

{ "name": "my-agent", "scopes": ["catalog:read:network", "cart:write", "checkout:write", "order:read", "buyer:write"] }

Returns a kfn_live_ token (seller_id is always null — this is a network-wide key, not tied to any one store) valid for one year. List and revoke your keys at GET/DELETE on the same path.

Minting is capped at 5 keys per hour and 10 active keys at a time per account — see Platform Limits. Revoke unused keys to stay under the ceiling.

No storefront required. Sign up at kifly.ai/dashboard/onboarding and choose "Building an agent instead of a store?" — a developer account registers with just a name and handle, is minting-ready immediately (no review, no waiting), and can never publish a product or take payouts. If you'd rather build against your own store, use a seller account with Developer Mode enabled instead (Dashboard → Developer → API Keys → "Enable developer mode") — either path lands here.

Authorization: Bearer kfn_live_xxxxxxxxxxxxxxxx

Connecting to your agent runtime

Each MCP host has its own process for registering an external MCP server, and these interfaces change frequently. Rather than walk you through steps that may already be out of date, we give you everything Kifly requires and link to each platform's official docs.

Server URL:

https://kifly.ai/api/mcp

Transport: StreamableHTTP (remote)

Authentication header (for hosts that let you set custom headers) — use whichever key type fits from the table above:

Authorization: Bearer kfa_live_xxxxxxxxxxxxxxxx   # your own store only
Authorization: Bearer kfn_live_xxxxxxxxxxxxxxxx   # whole network, headless

Hosts that require OAuth 2.1 (like claude.ai) negotiate it automatically — no header needed.


Claude — claude.ai web app

Use the one-click install button at the top of this page, or follow Anthropic's official guide:

Get started with custom connectors using remote MCP

Claude Desktop

Getting started with local MCP servers on Claude Desktop

Gemini / Google AI Studio

MCP support in Gemini is available at the API/SDK level. See Google's official documentation:

Gemini API — Deep Research & remote MCP tools

Other MCP-compatible runtimes

Use the server URL and auth header above. Most MCP hosts follow the same pattern — consult your runtime's official documentation for the exact steps.


Platform limits resource

At session start, read the kifly://platform/limits resource to know the current cart constraints before you begin a purchase flow:

{
  "max_item_quantity": 20,
  "max_cart_total_cents": 100000,
  "max_cart_total_usd": "1000.00"
}

These values are live — they may change without a code deploy. Exceeding max_item_quantity returns 400 quantity_exceeds_limit; exceeding the cart total returns 400 cart_total_exceeds_limit at checkout.


Available Tools (21)

Discovery

ToolScopesDescription
search_productscatalog:readSemantic vector search. Multilingual (100+ languages). Supports filters: limit, sort_by, min_price_cents, max_price_cents, in_stock_only, category. Omit q to browse recent listings.
get_sellercatalog:readSeller profile: name, location, delivery_coverage (states + cities), delivery_fee_cents, catalog_size. Call before create_cart to pre-screen delivery eligibility.
list_sellerscatalog:readEnumerate sellers across the network — handle, name, city, region, delivery coverage, catalog_size. Cursor-paginated. Available to network (kfn_live_) tokens for cross-seller discovery.

Cart lifecycle

ToolScopesDescription
create_cartcart:writeCreate a cart. Pass seller_handle for network tokens. Returns cart_id.
add_to_cartcart:writeAdd a variant by variant_id and quantity. Returns updated cart state including item_ids.
get_cartcart:writeInspect the cart: line items, quantities, price snapshots, subtotal, shipping address.
update_cart_itemcart:writeChange a line item's quantity. Pass quantity: 0 to remove the item.
set_shipping_addresscart:writeRequired before checkout. Validates delivery, returns delivery_eligible, delivery_coverage (on failure), and cart_total_with_delivery_cents (on success).
checkoutcheckout:writeGenerate a Stripe Payment Link. Returns payment_url, session_id, and the full cost breakdown.
order_statuscheckout:writePoll session status: pending → paid → shipped. When shipped: tracking_number, carrier, shipped_at.

Buyer identity

ToolScopesDescription
register_buyerbuyer:writeStart registering a buyer by email + name. Always emails a 6-digit code — response is { verification_required: true } whether the email is new or already has an account (never reveals which). Follow with verify_buyer to get the kfb_live_... token.
request_buyer_codebuyer:writeEmail a returning buyer a 6-digit code so they can recover their saved profile on a new connection without pasting a token or re-entering their name.
verify_buyerbuyer:writeVerify the 6-digit code from either register_buyer or request_buyer_code; returns a fresh kfb_live_... buyer_token bound to the buyer's global profile.
get_buyer_profileorder:readRetrieve a repeat buyer's name, email, and default shipping address from their kfb_live_... token.
save_buyer_addresscart:writeSave the order's shipping address to the buyer's profile so it auto-fills next time.

Platform & support

ToolScopesDescription
get_platform_limits(any)Read the current cart constraints (max_item_quantity, max_cart_total_cents) so the agent can pace itself before building a cart. Same values as the kifly://platform/limits resource.
get_help(any)Inline integration guidance — the recommended flow, common errors, and next steps — so an agent can self-correct without leaving the session.
submit_feedback(any)Structured feedback to the Kifly team. Fire-and-forget (202). Rate-limited to 10/min.
request_feature(any) + buyer tokenA buyer's structured product/feature request (problem / impact / proposed fix). Requires the buyer's kfb_live_ token. Fire-and-forget (202). Rate-limited to 5/min.

Recommended purchase flow

[1] read kifly://platform/limits (know the quantity + total caps)
[2] get_seller (optional — validate delivery coverage early)
[3] get_buyer_profile (returning buyer who already has a kfb_live_ token)
    OR request_buyer_code + verify_buyer (returning buyer — recover by email, no token)
    OR register_buyer + verify_buyer (new buyer — both end with a token to store)
[4] search_products
[5] create_cart
[6] add_to_cart (repeat for each item)
[7] get_cart (optional — review before asking for address)
[8] set_shipping_address → confirms delivery + returns total with delivery fee
[9] checkout → returns payment_url
[10] buyer pays at payment_url
[11] order_status (poll every 5s until paid or shipped)
[12] save_buyer_address (if get_buyer_profile returned null default_shipping_address)

set_shipping_address

{
  "cart_id": "cart_…",
  "shipping_address": {
    "name": "Ada Lovelace",
    "line1": "123 Market St",
    "city": "San Francisco",
    "region": "CA",
    "postal_code": "94103",
    "country": "US"
  }
}

Returns delivery_eligible, cart_total_with_delivery_cents, and (when ineligible) the seller's delivery_coverage so you can tell the buyer which states and cities are covered.


Rate Limits

SurfaceLimit
/api/mcp120 requests / 60 seconds per token
/api/agent/*60 requests / 60 seconds per token
/api/agent/feedback10 requests / 60 seconds per token

Responses include x-ratelimit-limit, x-ratelimit-remaining, and x-ratelimit-reset headers. Limit breaches return 429 with a retry-after header.