A modern, feature-rich chat client built with React, TypeScript, and Vite that integrates with Model Context Protocol (MCP) servers to provide intelligent AI-powered conversations with access to various tools and resources.
- 🤖 AI-Powered Chat: Seamless integration with AI models through MCP servers
- 🛠️ Tool Integration: Access to various MCP tools and resources
- 🔐 Authentication: Secure user authentication and session management
- 💬 Real-time Chat: Interactive chat interface with typing indicators
- 📚 Conversation History: Persistent chat history and conversation management
- 🎨 Modern UI: Beautiful, responsive interface built with modern design principles
- 🔧 MCP Server Management: Add, configure, and manage multiple MCP servers
- Frontend: React 18 + TypeScript + Vite
- Styling: SCSS with modern CSS features
- Backend: Cloudflare Workers
- Caching: Cloudflare Workers KV
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- State Management: React Context + Custom Hooks
- Build Tool: Vite with SWC for fast refresh
- Node.js 18+
- npm or yarn
- Cloudflare account (for deployment)
- Supabase account (for database and auth)
-
Clone the repository
git clone <repository-url> cd mcp-chat-client
-
Install dependencies
npm install
-
Set up environment variables Create a
.env
file in the root directory:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Configure Supabase
- Set up a new Supabase project
- Configure authentication providers
- Set up the required database tables
-
Configure Cloudflare Workers
- Update
wrangler.json
with your Cloudflare account details - Configure environment variables in Cloudflare dashboard
- Update
npm run dev
The application will be available at http://localhost:5173
npm run build
npm run preview
npm run deploy
src/
├── components/ # React components
│ ├── chat/ # Chat interface components
│ ├── mcp/ # MCP server management
│ ├── tools-wrapper/ # Tool integration components
│ └── ... # Other UI components
├── contexts/ # React contexts
├── hooks/ # Custom React hooks
├── services/ # API and external service integrations
└── util/ # Utility functions
worker/ # Cloudflare Workers backend
├── backend/ # Backend logic
│ ├── mcp/ # MCP server implementations
│ ├── conversations/ # Chat conversation handling
│ └── clients/ # External service clients
└── index.ts # Worker entry point
This client supports the Model Context Protocol, allowing you to:
- Connect to multiple MCP servers
- Access various tools and resources
- Extend functionality through MCP tool definitions
- Manage server configurations and authentication
- Navigate to the MCP section in the application
- Click "Add MCP Server"
- Configure the server details (URL, authentication, etc.)
- Test the connection
- Start using the available tools
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow TypeScript best practices
- Use functional components with hooks
- Maintain consistent code formatting
- Write meaningful commit messages
- Test your changes thoroughly
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production buildnpm run lint
- Run ESLintnpm run type-check
- Run TypeScript type checkingnpm run deploy
- Deploy to Cloudflare Workers
[Add your license information here]
For support and questions:
- Create an issue in the repository
- Join the ThoughtSpot Developer Discord
Copyright 2025, ThoughtSpot Inc.