Topics

DocsBuild with AI

MCP server

Connect Claude, ChatGPT or another AI assistant to your Kling account with the hosted Kling MCP server at api.kling.is/mcp, then ask it about your payments, revenue and subscriptions in Iceland.

Fastest: let your AI tool do the work

Copy the prompt and paste it into ChatGPT, Claude, Cursor, Lovable or any other AI tool. It reads our quickstart, asks about your business and picks the right setup.

The Kling MCP server connects an AI assistant such as Claude or ChatGPT to your Kling account, so you can ask it about your payments in Iceland and have it create payment links and checkouts for you, in Icelandic krónur. MCP (Model Context Protocol) is the open standard these assistants use to connect to other services. Kling hosts the server at https://api.kling.is/mcp, so there is nothing to install.

Connect your assistant

The connector lives at https://api.kling.is/mcp, and a Kling API key decides which account the assistant sees and what it may do there. Claude, ChatGPT and other assistants that add a connector from a link take your personal connector link: that address followed by your API key. You don't need to put it together yourself. The Connect AI assistants card on the API Keys & Docs page in the dashboard has the link for your test account ready to copy. If you have created a read-only test key, the card uses that one, so the assistant can only read. In Claude, for example, you open the connector settings, add a custom connector and paste the link.

Tools for developers, such as Claude Code and Cursor, can instead connect to https://api.kling.is/mcp and send the API key as a bearer token, which keeps the key out of the link.

Treat the link like a password: anyone who has it can use your key. If it leaks, revoke the key in the dashboard and the link stops working.

What you can ask

Once the assistant is connected, ask in your own words. "What was my revenue last month?", "How has subscription revenue developed this year?", "Who are my biggest customers?" and "How many payments failed this week?" are all answered from your account's data. The assistant can also look up a single payment or subscription, and list your customers, products and webhooks.

It can create things too: "Create a payment link for 4.990 kr." gives you a link to send, and it can create checkouts, products, customers and webhook endpoints the same way. Payment links it creates are in krónur, with 24% VAT. For developers, it can fetch a short Kling API quick-start, which points to the full API reference, the OpenAPI spec at https://api.kling.is/docs/json.

Test or live, full or read-only

The key you connect with sets the limits. A test key only reaches test data, so it is the place to start. Once you take real payments you can connect a live key in the same way. If you only want answers, create a read-only key on the API keys page: through the hosted connector the assistant then gets only the tools that read, and the API refuses any change it tries to make.

The tools

The read tools are get_checkout_session, get_payment_intent, list_payment_intents, search_catalog, lookup_catalog, list_products, list_customers, list_subscriptions, get_subscription, list_webhooks, the reports revenue_report, mrr_report, subscription_breakdown, subscription_movement_report, cohort_retention_report, payment_outcomes_report and top_customers_report, and get_api_docs, a short Kling API quick-start. search_catalog searches the catalogue by free text and filters (price, type, in stock) with paging, and lookup_catalog fetches up to 10 products by id or code; list_products stays for older connectors and returns the first 50 active products. With a key that can write, the assistant also gets create_checkout_session, create_payment_link, create_product, create_customer and create_webhook.

Buying through an agent

Four tools carry a sale, with a key and on the public catalogue alike. get_product fetches one product with its variants, images, subscription terms, availability and delivery options. check_availability answers whether the product can be bought in a quantity, on a day, to a postcode, and delivery_options lists how you deliver and at what price. The answers come from your availability service when you have registered one under Agents on the settings page (Kling calls the address and waits at most four seconds; with no answer the tool says merchant_unavailable instead of guessing), else from the Lager app, else unknown. create_checkout creates a checkout for the products the customer chose, with their name, email and phone, the delivery details and a card text, and returns a link the customer opens on their phone to pay. The payment is marked with the agent (name, profile, session and what the customer asked for), so you see in the dashboard which payments came that way. On the public catalogue, create_checkout only exists once you have switched on Allow agents to create a checkout; each address may create 10 checkouts a minute and every request is logged.

Public catalogue for agents

Your catalogue can also be read without a key. When you choose a handle under Agents on the settings page, your business gets the address https://api.kling.is/mcp/@handle, and any AI agent can connect there and search what you sell, the way it reads a website. The tools there are search_catalog, lookup_catalog, list_products, merchant_info (your business name, description, website and reply-to address), get_product, check_availability and delivery_options, plus create_checkout when you allow it. Customers, payments, reports and every other change still need a key. Each address may make 30 requests a minute, or 120 when the agent says who it is with meta.agent (a name and an https profile URL) in the request. Every call is logged with the name the agent gave, so you can see in the dashboard who is reading. An empty handle closes the catalogue again.

On your own machine

The same server is also published as the npm package @klingis/mcp, for apps that run MCP servers on your own computer. It takes the same API key and offers the same tools, except that a read-only key still sees the write tools there (the API refuses them). Most people don't need it: the hosted connector does the same with nothing to install.

To have an AI tool build Kling payments into your website or app, copy the prompt at the top of this page.

View as markdown