Modern React + TypeScript + Tailwind CSS frontend for the AI MCP Agent.
- 🎨 Beautiful UI with Tailwind CSS
- ⚡ Real-time Streaming responses using Server-Sent Events
- 🔧 MCP Server Management - Add/delete servers from UI
- 💬 Conversation Memory - Context maintained across messages
- 🎯 Mode Switching - Agent mode vs RAG-only mode
- 📱 Responsive Design - Works on all devices
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS - Styling
- Vite - Build tool
- ESLint - Code quality
npm installIn a separate terminal:
cd ../mcp-server
./start_server.shBackend will run on: http://localhost:8000
npm run devFrontend will run on: http://localhost:5173
Navigate to: http://localhost:5173
src/
├── components/
│ ├── ChatMessage.tsx # Message bubble component
│ ├── ChatInput.tsx # Input field with send button
│ └── MCPManager.tsx # MCP server management modal
├── services/
│ └── api.ts # API client for backend
├── App.tsx # Main application component
├── App.css # Additional styles
├── index.css # Tailwind CSS imports
└── main.tsx # Entry point
- Type your message in the input field
- Press Enter or click "Send"
- Watch the response stream in real-time
- Tool usage will be shown as badges
- Click "🔧 MCP Servers" button in header
- Fill in server name and URL
- Click "➕ Add Server"
- Server is available immediately!
- Agent Mode: Uses all MCP tools + RAG
- RAG Mode: Only uses knowledge base (faster)
The frontend connects to the FastAPI backend running on port 8000.
GET /health- Health checkPOST /api/chat/stream- Streaming chatGET /api/mcp-servers- List serversPOST /api/mcp-servers- Add serverDELETE /api/mcp-servers/{name}- Delete server
This project uses Tailwind CSS for styling. Key features:
- Gradient backgrounds
- Smooth animations
- Responsive design
- Custom color palette
- Modern UI components
npm run devnpm run buildnpm run previewnpm run lintEdit vite.config.ts to change:
- Port (default: 5173)
- Proxy settings
- Build options
Edit tailwind.config.js to customize:
- Colors
- Fonts
- Spacing
- Animations
Edit src/services/api.ts to change the backend URL:
const API_BASE_URL = 'http://localhost:8000';- Initial load: ~100KB (gzipped)
- Lazy loading for optimal performance
- Efficient re-renders with React
- Streaming for instant feedback
Make sure the backend is running:
cd ../mcp-server
./start_server.shCheck backend is accessible: http://localhost:8000/health
The backend has CORS enabled for all origins. If you still see errors:
- Check backend is running
- Verify the API URL in
src/services/api.ts - Check browser console for details
If Tailwind styles aren't working:
# Reinstall dependencies
rm -rf node_modules
npm install
# Restart dev server
npm run devResponses appear word-by-word as they're generated, providing instant feedback.
When the agent uses tools (like math operations or RAG), you'll see badges showing which tools were used.
- Slide-in animations for messages
- Bounce animation for typing indicator
- Smooth transitions for all interactions
Works perfectly on:
- Desktop (1920px+)
- Laptop (1366px+)
- Tablet (768px+)
- Mobile (375px+)
- Add voice input/output
- Add file upload support
- Add conversation export
- Add dark mode
- Add keyboard shortcuts
- Add message editing
- Add conversation search
This is a frontend for the AI MCP Agent backend. To contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Same as the main AI MCP Agent project.
Built with ❤️ using React, TypeScript, and Tailwind CSS