Home · Blog · How to create a chatbot with AI: Claude builds the flow through CHBT MCP

How to create a chatbot with AI: Claude builds the flow through CHBT MCP

· CHBT team · AI, Integrations

We tested what “creating a chatbot with AI” really means: we connected Claude Code to CHBT over MCP, described the task in three paragraphs, and got a working appointment flow for a dental clinic. We switched it on, checked it on a web page and ran thirty test conversations through it. Below is the whole path: what we wrote, what the AI did on its own, where we had to step in and what MCP cannot do. The screenshots are real, taken in our demo account.

What the AI does and what you do

First, the limits, so the expectations stay realistic. Through CHBT MCP an AI assistant can create a flow from a description, edit it, and look at the funnel and conversations. It does not connect channels (you create Telegram, VK, MAX and website chat in the cabinet) and it does not turn a flow on by itself: you confirm that with a button in the cabinet.

That is a safeguard, not a flaw: a bot that silently starts answering your customers is the worst case. More about protection in the article on safely editing a flow with AI.

In short, the work splits like this:

  • You: the account and the bot, connecting the AI with the “Allow” button, the channel, texts and prices, confirming the launch.
  • The AI: flow structure, step texts, buttons, branches, tags and the owner notification, block layout, edits based on your comments.

What you need

  • A CHBT account and a bot (project). The free plan is enough: 1 bot and 30 conversations a month; MCP works on every plan.
  • An AI client that supports MCP over HTTP: Claude (including Claude Code), ChatGPT or Cursor. We worked in Claude Code, but the scheme is the same.
  • A clear idea of what the bot should do. In our example: book appointments, give prices and the address, call an administrator. The more specific the task, the fewer the edits.

Step 1. Connect the AI to CHBT with the “Allow” button

The CHBT MCP server address is https://app.chbt.io/mcp. In Claude Code the connection looks like this: claude mcp add --transport http chbt https://app.chbt.io/mcp. In Claude on the web and in the app, add this address as a custom connector; in ChatGPT and Cursor, as an MCP server.

On first use a CHBT page opens. Sign in, tick the projects you are opening to the AI and press “Allow”. There is no token to copy.

The “Connect AI to CHBT” page: a project list with a checkbox, an actions toggle and the “Allow” button
The CHBT consent page. The “Claude Code” app asks for access; the text at the bottom says access can be revoked at any time.

Note the second checkbox: “Allow actions: prepare replies to customers, edit flows, close and hand off conversations”. Without it the AI only reads — it looks at statistics, leads, flows and conversations. For the assistant to build a flow, the checkbox is needed. You will still confirm sending a reply to a customer and turning a flow on yourself.

The “Connected AI” section of the profile: Claude Code, project, “read and actions” rights, a “Withdraw” button
After connecting, the assistant is visible in your profile: “Account” → “Connected AI”. The “Withdraw” button closes access immediately.

Step 2. Describe the task — how we set it

We did not write “make a bot”. We described the business and the rules, the way you would brief an administrator. Here is our request, almost verbatim:

In the project “Stomatologiya «Ulybka» (demo)” create an appointment flow for website chat. A greeting with four buttons: “Book an appointment”, “Prices”, “Address and opening hours”, “Call an administrator”. Booking: ask for the name, the phone (validate the number) and a convenient time. Then tag the customer “booking”, notify the owner and say thanks. Prices: the consultation is free, caries treatment from 3,500 ₽ — add a “Book an appointment” button. Address: 12 Sadovaya St., daily 9:00–21:00 — also with a booking button. “Call an administrator” — a message to the customer and handing the conversation to an operator. Leave the flow switched off, I will check it.

The request has everything any contractor needs: the channel, the menu, the fields to collect and how to validate them, what to do after a lead, the reply texts and the final state. The last phrase about “switched off” is a habit: a flow is created switched off anyway, but it is better to say so explicitly.

If you are unsure about the wording, ask the assistant to propose the structure as text first and create the flow only after that.

Step 3. What the AI did inside CHBT

The assistant does not draw a picture or send a text saying “paste this into the builder”. It works with the cabinet itself through MCP tools. A typical sequence looks like this (ours was the same):

  1. list_projects and list_flows — it found out which project is open to it and whether it has any flows.
  2. create_flow — it created the whole flow: a trigger, messages, three data-collection steps, a “tag and notify the owner” action and a handoff to an operator. The flow appeared switched off.
  3. update_flow — at our request it added the “Address and opening hours” branch and fixed the block layout so the connections no longer overlap.
  4. get_flow — it re-read the result and checked that the graph was saved as intended.

Every edit of an existing flow first saves its previous version labelled “before AI edit”. Keep in mind: if the flow is already on, an edit reaches customers immediately. The result opens in the regular CHBT editor, so everything it built can be edited by hand, like any flow:

The CHBT editor: the “Appointment booking” flow with greeting, name, phone and time blocks, and price, address and operator branches
The “Appointment booking” flow in the editor: 10 steps. Claude built the blocks through MCP; we only checked them by eye.

Step 4. Check the flow before switching it on

Before switching it on, walk through the flow as a customer: in the editor press “Check flow” — a test chat opens where you write to the bot as a customer. What to look at:

  • Every button in the greeting: where it leads and whether the branch dead-ends.
  • Phone validation: send a clearly wrong number and see how the bot reacts.
  • The tone of the texts. The AI writes neatly, but only you know your prices, address and turns of phrase. This is where we edit most often.
  • The ending: the customer should understand what happens next — in our case “The administrator will contact you to confirm the time”.

For examples of typical checks see the article “How to test a chatbot before launch”. Just write your comments to the assistant, for example: “Ask for the phone before the name” or “In the prices, add that the first examination is free”.

Step 5. Connect the channel and switch the flow on

You create the channel. For our example we opened “Channels” → “Widget for the site” → “Connect”, then “Create widget”, and pasted the code onto the page. How this is done and how to set up the look is in the article about an online chat for a website.

There are two ways to switch a flow on: the toggle in the editor or a command to the assistant. In the second case the assistant calls set_flow_active and returns a confirmation link. You open it, see exactly what will be done (“Turn on the flow “Appointment booking”… From now on customers will see it”) and press “Run”:

The “Confirm the action” page in CHBT: the text “Turn on the flow “Appointment booking”” with “Run” and “Cancel” buttons
The confirmation page: nothing happens until you press “Run”. The link is single-use and valid for 30 minutes.

Step 6. Test the bot where customers will see it

The test chat in the editor is not the same as the widget on a page. Open the site and write to the bot yourself. That is how we found our first real mistake.

The flow’s first trigger is the /start command. In Telegram it is sent by the “Start” button, while a website visitor writes “Hello” — and the bot stays silent. We asked the assistant: “Make the bot answer any first message” — it added a second trigger “any message” (catch_all) to the flow, and the flow began to answer the greeting:

The chat widget on the dental demo page: the visitor’s message “Hello” and the bot’s reply with four menu buttons
The widget on the demo page: to “Hello” the bot replies with a greeting and buttons. Before the second trigger was added it stayed silent.

The lesson for any flow: the trigger must match how a person starts a conversation in this channel. Trigger types are covered in the article “Chatbot triggers”.

The chat widget: the customer enters a phone and a preferred time, the bot replies “Thank you! The administrator will contact you to confirm the time”
A complete booking: name, phone, time — and the final message. In the cabinet this creates a lead tagged “booking”.

What we got in the end

We ran thirty test visitors through the widget: some booked to the end, some dropped off midway, some asked for prices or an administrator. This is test traffic we created ourselves for the article, not real patients; the demo project got no real customers.

In the cabinet the result looked like this:

  • 30 conversations in a day, all from website chat;
  • 10 leads with a phone — they landed in the leads list;
  • 3 conversations handed to the administrator — they wait for an operator reply;
  • everyone who booked has the “booking” tag, and the owner got a notification.
The bot’s home page in CHBT, “Stomatologiya «Ulybka» (demo)”: 30 conversations, 30 new contacts, 3 waiting for a reply, the “Appointment booking” flow switched on
The bot page after the run: conversation numbers, those awaiting a reply and the active flow.

How to read such numbers and find the weak spot in a funnel is in the neighbouring article: “Where the bot loses customers: analysing a funnel with AI”.

How long it took and what not to expect

The assistant built the flow itself in minutes. Most of the time went on wording the task, reading the result, two edits and setting up the widget. If you already have the texts and know what you need, it will be faster.

What not to expect:

  • A ready bot “from one phrase”. A five-word request gives a generic flow you will have to redo. Specifics save time.
  • Knowledge of your business. Prices, addresses and terms are yours. The AI will insert what you wrote, and may invent something plausible if you did not say.
  • An independent launch. A person switches it on.
  • Connecting channels and broadcasts. Broadcasts are not started through MCP, and running a flow for a specific customer is not supported either.

What to ask the assistant next

  • “Show the funnel of the “Appointment booking” flow and tell me at which step the most people drop off”.
  • “Add a question about the service before the booking time and save it in the customer card”.
  • “Make a copy of the flow for the branch on Lesnaya St., 4, and change the address and opening hours”.
  • “Roll the flow back to the version before the last edit” — if you do not like the new edit.

If you need an AI that answers customers itself from your knowledge base, that is another part of CHBT — the AI agent. Its tone and rules are covered in the article “How to set up the AI agent”. What MCP is and how security works is in the overview “MCP server for a chatbot”.

FAQ

Can you create a chatbot with AI without programming?

Yes. You connect an AI assistant to CHBT over MCP, describe the task in plain words, and the assistant creates a flow in your cabinet. The result opens in the editor, where you can edit it by hand. You connect the channel yourself and confirm the launch with a button.

Which AIs work for creating a bot through CHBT MCP?

Any client that supports MCP over HTTP: Claude (including Claude Code), ChatGPT, Cursor. The server address is https://app.chbt.io/mcp, sign-in with the “Allow” button.

Can the AI switch the bot on for customers by itself?

No. The assistant prepares the launch and sends you a confirmation link. Until you press “Run” in the cabinet, the flow stays switched off.

Will the AI connect Telegram, VK or website chat?

No, MCP has no tool for connecting channels. You create the channel in the “Channels” section; after that the assistant builds and edits flows, and it can view statistics for any connected channel.

Is it free?

MCP is available on every CHBT plan, including the free one. The AI client itself (Claude, ChatGPT, Cursor) is paid for under its own plans; check the provider for their terms.

What if the AI built something different from what I need?

Write your comment — the assistant will fix it. Before every edit CHBT saves the previous flow version, so you can go back in the editor (“History”) or by asking “restore the version before the last edit”.

More on the blog