A modern web client built with Next.js that allows you to interact with various LLM models using the Model Context Protocol (MCP). This client provides a clean and intuitive interface for chatting with different AI models while maintaining conversation context.
- 🤖 Support for multiple LLM providers (OpenAI, Google, etc.)
- 💬 Clean chat interface with markdown support
- 🌙 Dark/Light mode support
- 📝 Markdown rendering with syntax highlighting
- 💾 Local conversation history
- 🔄 Real-time streaming responses
Before you begin, ensure you have installed:
- Node.js (v18 or higher)
- pnpm (recommended) or npm
- Clone the repository:
git clone <your-repo-url>
cd mcp-client-any-llm
- Install dependencies:
pnpm install
-
Configure environment variables: Create a
.env.local
file in the root directory with the following variables:# Required: OpenAI API Configuration OPENAI_API_KEY=your_openai_api_key OPENAI_API_BASE_URL=https://api.openai.com/v1 # Optional: Custom base URL if using a proxy OPENAI_API_MODEL=gpt-3.5-turbo # Optional: Default model to use # Optional: Google AI Configuration GOOGLE_API_KEY=your_google_api_key GOOGLE_API_MODEL=gemini-pro # Default Google AI model # Optional: Azure OpenAI Configuration AZURE_OPENAI_API_KEY=your_azure_openai_key AZURE_OPENAI_ENDPOINT=your_azure_endpoint AZURE_OPENAI_MODEL=your_azure_model_deployment_name # Optional: Anthropic Configuration ANTHROPIC_API_KEY=your_anthropic_key ANTHROPIC_API_MODEL=claude-2 # Default Anthropic model
Note: Only the OpenAI configuration is required by default. Other providers are optional.
-
Start the development server:
pnpm dev
- Open http://localhost:3000 in your browser to start chatting!
OPENAI_API_KEY
: Your OpenAI API key
OPENAI_API_BASE_URL
: Custom base URL for OpenAI API (useful for proxies)OPENAI_API_MODEL
: Default OpenAI model to useGOOGLE_API_KEY
: Google AI API keyGOOGLE_API_MODEL
: Default Google AI modelAZURE_OPENAI_API_KEY
: Azure OpenAI API keyAZURE_OPENAI_ENDPOINT
: Azure OpenAI endpoint URLAZURE_OPENAI_MODEL
: Azure OpenAI model deployment nameANTHROPIC_API_KEY
: Anthropic API keyANTHROPIC_API_MODEL
: Default Anthropic model
- Next.js 15 - React Framework
- Tailwind CSS - Styling
- Radix UI - UI Components
- @modelcontextprotocol/sdk - MCP SDK
- React Markdown - Markdown Rendering
To run the development server:
pnpm dev
For production build:
pnpm build
pnpm start
Contributions are welcome! Please feel free to submit a Pull Request.
[Add your license information here]