sleekcms/sleekcms-mcp-server
If you are the rightful owner of sleekcms-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Model Context Protocol (MCP) server is a specialized server designed to manage AI interactions by maintaining conversation context, particularly in applications like chatbots that require continuous context awareness.
SleekCMS Chat Assistant
A chatbot system that integrates with SleekCMS to provide AI-powered insights about website content. The system uses MCP (Model Context Protocol) to manage AI interactions and maintain conversation context.
Features
- 🔐 Pub Token Authentication: Connect to SleekCMS using your pub token
- 🤖 AI-Powered Chat: Ask questions about your website content
- 🧩 Visual Cards: AI can optionally return Tailwind components rendered inline
- 💾 Session Management: Maintains conversation context throughout the session
- 🎨 Modern UI: Clean, responsive interface built with Tailwind CSS
- 🔄 MCP Integration: Uses Model Context Protocol for managing AI context
Project Structure
sitechatsystem/
├── frontend/
│ └── index.html # Frontend HTML with Tailwind CSS
├── backend/
│ ├── src/
│ │ ├── index.ts # Express server
│ │ ├── session-manager.ts # Session management
│ │ └── mcp/
│ │ └── server.ts # MCP server for AI interactions
│ ├── package.json
│ └── tsconfig.json
└── README.md
Setup Instructions
Backend Setup
- Navigate to the backend directory:
cd backend
- Install dependencies:
npm install
- Create a
.envfile and add your Anthropic API key. Optionally set the Claude model (defaults toclaude-3-haiku-20240307, which is available on the free evaluation plan):
ANTHROPIC_API_KEY=your_actual_api_key_here
# Optional: pick another Claude 3 model if your account has access (e.g. claude-3-5-sonnet-20241022)
ANTHROPIC_MODEL=claude-3-haiku-20240307
- Start the development server:
npm run dev
The backend will run on http://localhost:3000
Frontend Setup
- Simply open
frontend/index.htmlin your web browser, or serve it using a local server:
# Using Python
cd frontend
python -m http.server 8000
# Using Node.js http-server
npx http-server -p 8000
- Open
http://localhost:8000in your browser
Usage
- Enter Pub Token: Paste the full token SleekCMS gives you (format:
pub-<siteId>-<secret>). The app will automatically callhttps://pub.sleekcms.com/<siteId>/latest, so you do not need to type any URL. - Start Chatting: After connecting, the token input will be replaced with a prompt input. Ask any questions about your website
- View Responses: AI responses will appear in the message box. When the assistant includes a visual card (e.g., pricing breakdowns), it renders directly below the text
- End Session: Click "End Session" to disconnect and start fresh
API Endpoints
-
POST /api/connect- Connect with pub token- Body:
{ "pubToken": "your_token" } - Returns:
{ "sessionId": "...", "websiteData": {...} }
- Body:
-
POST /api/chat- Send a chat message- Body:
{ "sessionId": "...", "prompt": "your question" } - Returns:
{ "response": "AI response", "sessionId": "..." }
- Body:
-
POST /api/end-session- End a session- Body:
{ "sessionId": "..." } - Returns:
{ "message": "Session ended successfully" }
- Body:
How It Works
- Connection: User provides SleekCMS pub token → Backend fetches website JSON data → Creates session
- Chat: User asks question → Backend sends to MCP server → MCP server processes with website context → AI generates response → Returns to user
- Context Management: MCP server maintains conversation history and website data throughout the session
- Session End: User clicks "End Session" → All session data is cleared
Technologies Used
- Frontend: HTML, Tailwind CSS, Vanilla JavaScript
- Backend: Node.js, Express, TypeScript
- AI: Anthropic Claude 3 (Sonnet)
- MCP: Custom MCP server implementation for context management
Notes
- Sessions automatically expire after 2 hours of inactivity
- The system maintains the last 10 messages in conversation history for context
- Make sure your Anthropic API key has sufficient credits for API calls