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

Two options. Use whichever fits your agent runtime.

Option A — Static API key (simplest)

Generate a key from the Kifly seller dashboard → Settings → API Keys. Keys start with kfa_live_.

Pass it as a Bearer token on every request:

Authorization: Bearer kfa_live_xxxxxxxxxxxxxxxx

Works in any HTTP client or MCP host that lets you set custom headers.

Option B — OAuth 2.1 (required for claude.ai)

Kifly runs a full OAuth 2.1 server. claude.ai and other agents that require OAuth use this flow automatically.

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.


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):

Authorization: Bearer kfa_live_xxxxxxxxxxxxxxxx

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 (18)

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:writeRegister a new buyer by email + name. Returns a kfb_live_... token — store it and reuse on every future order. If the email already exists, returns BUYER_EXISTS — recover via the code flow below.
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.
verify_buyerbuyer:writeVerify the 6-digit 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.

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 (new buyer, returns 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.