# π€ MCP Website Chatbot - Complete Application
**Status:** β
Production-Ready
**Version:** 1.0.0
**Website:** srinivasanramanujam.sbs
**Last Updated:** January 12, 2026
---
## π Quick Navigation
### π **Getting Started**
- **[QUICKSTART.md](./QUICKSTART.md)** β Start here! (3 steps to running)
- **[PROJECT_SUMMARY.md](./PROJECT_SUMMARY.md)** β Full project overview
### π **Documentation**
- **[README.md](./README.md)** β Complete technical documentation
- **[system_prompt.txt](./system_prompt.txt)** β AI chatbot behavior definition
### π» **Source Code**
- **[server.js](./server.js)** β Express backend with chat API
- **[public/index.html](./public/index.html)** β Chat UI (HTML/CSS/JavaScript)
- **[mcp-client.js](./mcp-client.js)** β MCP tool integration
- **[llm-integration.js](./llm-integration.js)** β LLM API templates
### π§ **Configuration**
- **[package.json](./package.json)** β Node.js dependencies
- **[.env.example](./.env.example)** β Environment variables template
- **[.gitignore](./.gitignore)** β Git exclusion rules
### π³ **Deployment**
- **[Dockerfile](./Dockerfile)** β Docker container definition
- **[docker-compose.yml](./docker-compose.yml)** β Multi-container setup
### π§ͺ **Testing & DevOps**
- **[setup.sh](./setup.sh)** β Automated setup script
- **[test-chatbot.sh](./test-chatbot.sh)** β Testing suite
---
## β‘ Quick Start (30 seconds)
```bash
# 1. Install dependencies
npm install
# 2. Start server
npm run dev
# 3. Open browser
# β http://localhost:3000
```
---
## π What's Included
### β
Production-Grade Features
- Real-time chat interface with beautiful UI
- Express.js REST API with `/api/chat` endpoint
- MCP (Model Context Protocol) integration framework
- RAG (Retrieval-Augmented Generation) support
- System prompt with hallucination prevention guardrails
- Health checks and monitoring endpoints
- Docker containerization
- Comprehensive error handling
### β
Ready-to-Use Templates
- OpenAI/GPT API integration template
- Anthropic Claude API integration template
- Ollama (local LLM) integration template
- MCP tool integration framework
- Docker deployment configuration
### β
Documentation
- 3-step quick start guide
- Complete technical documentation
- Architecture overview
- Troubleshooting guide
- Deployment instructions
---
## π― Architecture
```
ββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend: public/index.html β
β β’ Modern chat UI β
β β’ Real-time updates β
β β’ Mobile responsive β
ββββββββββββββββββ¬ββββββββββββββββββββββββββ
β HTTP/REST
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββ
β Backend: server.js (Express.js) β
β β’ /api/chat endpoint β
β β’ /api/health health check β
β β’ /api/system-prompt retrieve prompt β
ββββββββββββββββββ¬ββββββββββββββββββββββββββ
β
ββββββββββ΄βββββββββ¬ββββββββββββββ
βΌ βΌ βΌ
βββββββββββ ββββββββββββ ββββββββββββ
β System β β MCP β β LLM API β
β Prompt β β Tools β β (Plug) β
βββββββββββ ββββββββββββ ββββββββββββ
```
---
## π File Organization
```
Root Directory
βββ Core Files
β βββ server.js β Express backend
β βββ mcp-client.js β MCP integration
β βββ llm-integration.js β LLM API templates
β βββ package.json β Dependencies
β
βββ Frontend
β βββ public/
β βββ index.html β Chat UI
β
βββ Configuration
β βββ .env.example β Environment template
β βββ .gitignore β Git rules
β βββ Dockerfile β Container def
β βββ docker-compose.yml β Compose config
β
βββ Scripts
β βββ setup.sh β Auto-setup
β βββ test-chatbot.sh β Testing
β
βββ System Prompt
β βββ system_prompt.txt β AI behavior
β
βββ Documentation
βββ QUICKSTART.md β 3-step guide
βββ README.md β Full docs
βββ PROJECT_SUMMARY.md β Detailed overview
βββ INDEX.md (this file) β Navigation
```
---
## π Deployment Quick Links
### **Vercel (Recommended)**
```bash
npm install -g vercel && vercel
```
Fastest, free tier available, auto-scaling.
### **Docker (Any Cloud)**
```bash
docker build -t mcp-chatbot .
docker run -p 3000:3000 mcp-chatbot
```
### **Heroku**
```bash
heroku create && git push heroku main
```
---
## π Integration Checklist
### Before Running Locally
- [ ] Node.js 16+ installed
- [ ] Run `npm install`
### For Development
- [ ] Run `npm run dev`
- [ ] Test at http://localhost:3000
- [ ] Review system_prompt.txt
### For Production
- [ ] Add OpenAI/Claude API key to `.env`
- [ ] Update website info in system_prompt.txt
- [ ] Connect to real MCP server
- [ ] Configure CORS
- [ ] Set up rate limiting
- [ ] Deploy to cloud
---
## π‘ Key Features
### Smart Information Retrieval
- Automatically detects time-sensitive queries
- Routes to live data via MCP tools when needed
- Falls back to static RAG knowledge gracefully
- Transparent about information source
### Hallucination Prevention
- Refuses to guess or invent information
- Cites sources for live data
- Explains why information might be unavailable
- Validates facts before responding
### Beautiful User Experience
- Modern, responsive chat interface
- Real-time message updates
- Loading indicators & typing status
- Mobile-friendly design
- Accessible & intuitive
### Production Ready
- Health monitoring endpoints
- Comprehensive error handling
- Structured logging ready
- Docker containerization
- Rate limiting compatible
- CORS ready
---
## π Documentation by Use Case
### **I want to...**
**Get it running fast**
β See [QUICKSTART.md](./QUICKSTART.md)
**Understand the full system**
β See [PROJECT_SUMMARY.md](./PROJECT_SUMMARY.md)
**Learn the technical details**
β See [README.md](./README.md)
**Customize AI behavior**
β Edit [system_prompt.txt](./system_prompt.txt)
**Integrate with OpenAI/Claude**
β See [llm-integration.js](./llm-integration.js)
**Deploy to production**
β See [README.md](./README.md) β Deployment section
**Connect to MCP server**
β See [mcp-client.js](./mcp-client.js) comments
**Test everything**
β Run `./test-chatbot.sh`
**Troubleshoot issues**
β See [README.md](./README.md) β Troubleshooting section
---
## π― Common Commands
```bash
# Setup & Installation
npm install # Install dependencies
./setup.sh # Automated setup
# Development
npm run dev # Start development server
npm run start # Start production server
# Testing & Validation
./test-chatbot.sh # Run test suite
curl http://localhost:3000/api/health # Health check
# Deployment
docker build -t mcp-chatbot . # Build Docker image
docker run -p 3000:3000 mcp-chatbot # Run container
vercel # Deploy to Vercel
```
---
## π Security Highlights
β
System prompt protected from user access
β
Input validation prevents injection
β
No secrets in version control
β
Error messages don't expose internals
β
Health checks for monitoring
β
Rate limiting ready
β
CORS security configured
---
## π Need Help?
### Quick Issues
**Port 3000 in use?**
```bash
npm run dev -- --port 3001
```
**Dependencies not installing?**
```bash
rm -rf node_modules && npm install
```
**Server not starting?**
```bash
node --version # Check Node.js 16+
npm cache clean --force
npm install && npm run dev
```
### Detailed Help
See [README.md](./README.md) β Troubleshooting section
---
## π Support Resources
- **Quick Start:** [QUICKSTART.md](./QUICKSTART.md)
- **Full Docs:** [README.md](./README.md)
- **Architecture:** [PROJECT_SUMMARY.md](./PROJECT_SUMMARY.md)
- **API Endpoints:** See README.md β API Endpoints section
- **Deployment:** See README.md β Deployment section
- **Code Comments:** In each .js file
---
## π You're Ready!
Your production-grade website chatbot is **complete and ready to deploy**.
### Next Steps:
1. Read [QUICKSTART.md](./QUICKSTART.md) (5 min read)
2. Run `npm install && npm run dev`
3. Visit http://localhost:3000
4. Customize system_prompt.txt as needed
5. Add API key to .env for production
6. Deploy using Vercel, Docker, or preferred platform
**Happy building! π**
---
*Created: January 12, 2026*
*For: srinivasanramanujam.sbs*
*Status: Production-Ready β
*