Skip to main content

Overview

MCP Chatbot is the frontend interface component that integrates with MCP Hub to provide an interactive chat experience. It allows users to interact with configured tools and resources through a user-friendly interface.

Features

  • Chat interface for AI interactions
  • File upload and handling
  • Tool integration
  • Resource management
  • Custom UI components

Installation

Prerequisites

  • Node.js 14+
  • Running MCP Hub instance
  • (Optional) MCP Enterprise for administration

Setup Steps

  1. Clone the Repository
  1. Install Dependencies
  1. Configure MCP Servers
  1. Edit Configuration
  1. Start the Development Server
The chatbot interface will be available at http://localhost:3050.

Configuration Options

Environment Variables

Server Configuration

Configure different MCP servers in config/mcp.json:
  1. File System Server
  1. Search Server

Components

Chat Interface

The main chat interface (ChatUI.vue) provides:
  • Message history
  • Input area
  • Tool selection
  • File upload
  • Response formatting

File Handling

File upload component (FileUploadZone.vue):
  • Drag and drop support
  • Multiple file upload
  • Progress tracking
  • File type validation

Resource Management

Resource modal (ResourcesModal.vue):
  • List available resources
  • Resource selection
  • Resource metadata
  • Access controls

Integration with MCP Hub

Initializing Connection

Using Tools

Security

Authentication

When using with MCP Enterprise:

File Security

  • File type validation
  • Size limits
  • Path validation
  • Sanitization

Customization

Styling

The chatbot uses Tailwind CSS for styling:

Custom Components

Create custom components in the components directory:

Troubleshooting

Common Issues

  1. Connection Errors
    • Verify MCP Hub is running
    • Check configuration URLs
    • Validate API keys
  2. File Upload Issues
    • Check file permissions
    • Verify allowed file types
    • Check size limits
  3. Tool Integration
    • Verify tool configuration
    • Check environment variables
    • Review server logs

Deployment

Production Build

Docker Deployment

Best Practices

  1. Error Handling
    • Implement proper error boundaries
    • Provide user feedback
    • Log errors appropriately
  2. Performance
    • Optimize file uploads
    • Implement caching
    • Lazy load components
  3. Security
    • Validate all inputs
    • Sanitize file paths
    • Implement rate limiting