MCP use case: chat app

Build a chat app from Claude or ChatGPT with MCP

Describe the chat app you want and let the assistant create the account, the app, its rooms, an AI agent and the website widget through tool calls. No install, no admin panel.

First app in one session Agents register themselves Widget snippet at the end
Ethora MCP server

In 30 seconds

Building a chat app with AI over MCP means an assistant such as Claude, ChatGPT, Cursor or Claude Code calls the Ethora MCP server’s tools in order: register or log in, create an app (an isolated tenant with its own users, rooms, files and agents), add rooms, create an AI agent, put it in a room, then generate the script tag for the website widget. About seven calls in all.

Use this if

  • you want a support or team chat running today and would rather describe it than configure it
  • you are an autonomous agent that needs a chat backend and can register itself
  • you want to prototype rooms and an agent before writing SDK code

Best for: small teams, clinics and agencies standing up a first chat app, and agents provisioning chat for themselves.

Step by step

1

Connect and identify

A person pastes the personal connector URL from Account, AI Assistants. An agent with no account connects to the open endpoint and calls ethora-user-register { email, firstName, lastName }, receiving a generated password, an API key and a connectorUrl once. ethora-status should report authMode: user.

claude mcp add --transport http ethora https://mcp.chat.ethora.com/mcp/k/<your API key>
claude mcp list
2

Create the app and make it current

ethora-app-create { displayName } allocates a 24-character appId, sets you as owner and counts against your plan limit. Follow with ethora-app-select { appId } so the room and agent tools can omit appId.

3

Add rooms

ethora-app-create-chat { title, pinned } creates a group room and returns its JID, appId_chatId. With pinned: true every new user auto-joins it (existing users are not added); the default keeps it opt-in. ethora-app-get-default-rooms lists the selected app’s rooms.

4

Create an agent and put it in a room

ethora-agents-create-v2 { name, prompt, greetingMessage } defines the persona. ethora-agent-invite-to-chat { agentIdOrAddress, chatJid } spawns its bot instance live in the room. Test it with ethora-chats-message-v2 { text, roomJid, waitForReplySec: 45 }; the answer comes back in replies.

5

Activate it and embed the widget

ethora-agents-activate-v2 { agentId, chatJid } makes the agent the app’s default responder; on an API-created app the widget stays silent until then. ethora-widget-embed-snippet { botName, primaryColor, greeting } returns the <script> tag for your site.

You: Activate Desk Assistant for the widget and give me the embed code in navy.

Assistant: ethora-agents-activate-v2 { agentId, chatJid } ... botStatus on.
ethora-widget-embed-snippet { botName: "Desk Assistant", primaryColor: "#1F3A5F" } ...
<script id="chat-content-assistant" src="https://widget.<your domain>/assistant.js" data-app-id="<appId>" data-bot-name="Desk Assistant" defer></script>

The tools this uses

Names and descriptions come from the server’s own tool list. Read-only tools are safe to auto-approve; destructive ones make your client ask first. Full reference.

ToolNameWhat it doesAccess
Register Accountethora-user-registerCreate a new Ethora user account by email + first/last name, then log in and bind the session.write
Log Inethora-user-loginAuthenticate as an existing Ethora user with email + password.write
Create Appethora-app-createCreate a new Ethora app (tenant) owned by the currently logged-in user.write
Select Appethora-app-selectSet the current app context for this session so app-scoped tools can omit their appId argument.write
Create Chat Roomethora-app-create-chatCreate a new chat room (MUC room) inside an app the caller owns.write
Get Default Roomsethora-app-get-default-roomsList the default chat rooms (MUC rooms) of the currently selected Ethora app - every new user auto-joins these.read-only
Create Agentethora-agents-create-v2Create a reusable AI agent (POST /v2/apps/:appId/agents).write
Invite Agent to Chatethora-agent-invite-to-chatInvite an Agent into a chat room.write
Send Chat Messageethora-chats-message-v2Post a message into a chat room of an app (POST /v2/apps/:appId/chats/broadcast targeting one room).write
Activate Agent for Widgetethora-agents-activate-v2Make an agent the app’s ACTIVE widget bot: sets App.defaultBotInstanceId (and botStatus: on), which is what POST /v2/widget/sessions uses to decide who answers...write
Widget Embed Snippetethora-widget-embed-snippetGenerate the <script> tag that embeds the Ethora AI chat widget (the floating launcher + chat panel that website visitors use) for an app, plus the prerequisites that...read-only
Batch Create Usersethora-users-batch-create-v2Provision many Ethora users (1-100) in one asynchronous batch job - the bulk equivalent of ethora-user-register.write

A clinic front desk in one prompt

“Create an app called Riverside Dental Desk with a Front desk room every new user joins. Create an agent called Desk Assistant for opening hours, accepted insurance plans and booking, put it in Front desk and test it. Then activate it for the widget and give me the snippet in navy.”
  1. ethora-app-create { displayName: "Riverside Dental Desk" }
  2. ethora-app-select { appId: "66f0c2a9b1d4e7f0a3c5d8e1" }
  3. ethora-app-create-chat { title: "Front desk", pinned: true }
  4. ethora-agents-create-v2 { name: "Desk Assistant", prompt: "Front desk of a dental practice. Answer questions on opening hours, insurance plans and booking, briefly.", greetingMessage: "Hello, how can I help?" }
  5. ethora-agent-invite-to-chat { agentIdOrAddress: "66f0c3f1a2b3c4d5e6f70123", chatJid: "66f0c2a9b1d4e7f0a3c5d8e1_frontdesk" }
  6. ethora-chats-message-v2 { text: "Are you open on Saturdays?", roomJid: "66f0c2a9b1d4e7f0a3c5d8e1_frontdesk", waitForReplySec: 45 }
  7. ethora-agents-activate-v2 { agentId: "66f0c3f1a2b3c4d5e6f70123", chatJid: "66f0c2a9b1d4e7f0a3c5d8e1_frontdesk" }
  8. ethora-widget-embed-snippet { botName: "Desk Assistant", primaryColor: "#1F3A5F" }

An app with a room, an agent answering in it, and a script tag that puts the same agent on the clinic website.

Good to know

FAQ

Can I build a chat app with ChatGPT?

Yes. Add the Ethora MCP server as a ChatGPT connector with your personal URL, then describe the app. ChatGPT calls ethora-app-create, ethora-app-create-chat, ethora-agents-create-v2 and the rest in order. The same prompt works in Claude, Cursor and Claude Code because the tools are identical everywhere.

What are MCP server use cases for chat?

Standing up a support or team chat app, adding rooms, building an AI agent that answers in them, embedding a chat widget on a website, broadcasting to many rooms, and reading or searching chat history. Each is a tool group on this server with its own how-to page.

Do I need to write code to build a chat app with AI?

Not for the setup. The assistant creates the app, rooms and agent through tool calls and hands you a script tag for the widget. You write code only when you embed the React, React Native, iOS or Android chat SDK into your own product.

How do users get into the chat app?

They sign up through your app, the SDKs or the website widget, and pinned rooms are joined automatically. Bulk provisioning of up to 100 users per job exists through ethora-users-batch-create-v2, but only for server integrations holding a B2B token.

Can an AI agent create the chat app without a human?

Yes. An agent connects to the open endpoint with no credentials, calls ethora-user-register with an email and name, and receives an API key it stores for later sessions. No browser and no email confirmation are involved; the rest is the same tool calls a person would trigger.

Get started

Build your first app

Create a free account, copy the personal connector URL from Account, AI Assistants, and ask your assistant for an app.

Free tier available Revocable API keys Self-host with the monoserver