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
- Clone the Repository
- Install Dependencies
- Configure MCP Servers
- Edit Configuration
- Start the Development Server
http://localhost:3050.
Configuration Options
Environment Variables
Server Configuration
Configure different MCP servers inconfig/mcp.json:
- File System Server
- 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
-
Connection Errors
- Verify MCP Hub is running
- Check configuration URLs
- Validate API keys
-
File Upload Issues
- Check file permissions
- Verify allowed file types
- Check size limits
-
Tool Integration
- Verify tool configuration
- Check environment variables
- Review server logs
Deployment
Production Build
Docker Deployment
Best Practices
-
Error Handling
- Implement proper error boundaries
- Provide user feedback
- Log errors appropriately
-
Performance
- Optimize file uploads
- Implement caching
- Lazy load components
-
Security
- Validate all inputs
- Sanitize file paths
- Implement rate limiting
