A production-ready Next.js application for connecting to multiple MCP (Model Context Protocol) servers and providing a conversational interface with AI agents.
- Next.js 14 with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- React 18 with Server Components
- Edge Functions for real-time features
- API Routes for MCP connections and inference
- Server-Side Rendering for optimal performance
- OAuth Integration for secure authentication
# Deploy to Vercel
npm run build
vercel --prodConfigure these in your Vercel dashboard:
OPENROUTER_API_KEYOPENROUTER_CLIENT_IDOPENROUTER_CLIENT_SECRETNEXT_PUBLIC_APP_URL
Option 1: Railway (Recommended)
- Deploy MCP servers and AI agents
- Persistent WebSocket connections
- Built-in Redis/PostgreSQL
Option 2: Vercel Functions + Inngest
- Serverless AI workflows
- Async job processing
- Auto-scaling
# Install dependencies
npm install
# Set up environment
cp .env.example .env.local
# Start development server
npm run devnpm run dev- Development servernpm run build- Production buildnpm run start- Production servernpm run lint- ESLintnpm run type-check- TypeScript check
- π Multi-server MCP connections
- π€ AI agent orchestration
- π¬ Real-time conversation interface
- π οΈ Tool call visualization
- π MCP debugging and tracing
- π± Responsive design
- π Production-ready deployment
# Type check
npm run type-check
# Build for production
npm run build
# Deploy to Vercel
vercel --prodapp/
βββ api/ # API routes
β βββ mcp/ # MCP server connections
β βββ inference/ # AI inference endpoints
β βββ auth/ # OAuth callbacks
βββ components/ # React components
βββ lib/ # Utilities and contexts
β βββ contexts/ # React contexts
β βββ providers/ # API providers
β βββ mcp/ # MCP utilities
β βββ utils/ # Helper functions
βββ types/ # TypeScript types
βββ hooks/ # Custom hooks
βββ globals.css # Global styles
βββ layout.tsx # Root layout
βββ page.tsx # Homepage
- Server-side API key management
- OAuth 2.0 authentication
- CORS configuration
- Environment variable protection
- Server-side rendering
- Static generation where possible
- Edge function optimization
- Tailwind CSS purging
- TypeScript strict mode