Add AI Chat to any website in 30 seconds

Copy one line of code, paste it into your site, and your visitors get a ChatGPT-like chat experience powered by your own MCP server.

How it works

1

Copy the embed code

Grab the script tag below and paste it into your website's HTML, just before the closing </body> tag.

2

Set your API endpoint

Replace the data-api-url with the URL of your AI agent / MCP server endpoint. The widget will POST messages there and stream back responses.

3

Done — your visitors can chat!

A chat bubble appears on your site. Visitors click it and get a full ChatGPT-style conversation with your AI agent.

Embed code

Copy this snippet and add it to your website. The widget will appear automatically.

HTML
<script
  src="https://YOUR-DOMAIN.com/widget.js"
  data-api-url="https://YOUR-API-ENDPOINT.com/chat"
  data-title="Chat with us"
  data-subtitle="Ask me anything"
  data-color="#2563eb"
  data-position="right"
  data-placeholder="Type a message…">
</script>

Configuration options

Attribute Description Default
data-api-url Your AI endpoint URL. The widget POSTs { messages: [...] } here. Demo mode
data-title Header title shown in the chat panel Chat with us
data-subtitle Header subtitle Ask me anything
data-color Primary accent color (hex) #2563eb
data-position Bubble position: right or left right
data-placeholder Input placeholder text Type a message…

API endpoint format

Your endpoint should accept POST requests with this body and return a streaming response (SSE or plain text):

Request body (JSON)
{
  "messages": [
    { "role": "user", "content": "Hello!" },
    { "role": "assistant", "content": "Hi there!" },
    { "role": "user", "content": "What can you do?" }
  ]
}
Copied to clipboard!