MCP Chat Component Demo

Welcome to the MCP Chat Demo

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!

Features

How to Test Local Storage

  1. Click the chat button to open the chat
  2. Send some messages to the AI assistant
  3. Close the chat window
  4. Refresh the page
  5. Open the chat again - your previous messages should be restored!
  6. Use the download icon to export your conversation as JSON
  7. Use the trash icon to clear the chat history

Component Configuration

The chat component supports various attributes for customization:

Integration

To 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>