This page demonstrates the MCP (Model Context Protocol) chat component that can be embedded in any website.
The chat widget appears in the bottom-right corner of your screen. Click on it to start chatting!
context-messages attribute controls how many previous messages are sent as context (default: 10)The chat component supports various attributes for customization:
api-url - Backend API endpointtitle - Chat window titleprimary-color - Theme colorcontext-messages - Number of message pairs to send as context (default: 10)starting-message - Initial message shown to usersbutton-position - Position of the chat button (fixed, absolute, or unset)button-bottom, button-right, button-left, button-top - Button positioningbutton-width, button-height - Button dimensionsTo integrate this chat component into your website:
<!-- Include the component script -->
<script type="module" src="path/to/mcp-chat-component.js"></script>
<!-- Add the chat component with your configuration -->
<mcp-chat
api-url="https://your-api-endpoint.com/api"
title="Your Chat Title"
primary-color="#0084ff"
context-messages="10"
starting-message="Welcome! How can I help you today?"
></mcp-chat>