SakithNizar/mcp-server
If you are the rightful owner of 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.
Model Context Protocol (MCP) is a web application designed to facilitate interactions with your CV and send emails through a simple interface.
MCP Server & Frontend
Model Context Protocol (MCP) is a small web application that allows you to:
- Chat about your CV – ask questions like “What was my last position?” and get AI-generated answers.
- Send emails – simple email endpoint using SMTP.
- Optional frontend – minimal Next.js interface to interact with the backend.
Project Structure
mcp-server/
├─ backend/
│ ├─ index.js # Backend server (Express + OpenAI + Nodemailer)
│ ├─ resume.json # Sample CV
│ └─ .env # Environment variables
└─ frontend/
├─ pages/
│ └─ index.js # Next.js frontend
└─ package.json # Frontend dependencies & scripts
Features
1️⃣ Chat about CV
Endpoint: POST /chat
Request body:
{
"message": "What was my last position?"
}
Response:
{
"reply": "Your last position was Software Engineer at Tech Corp"
}
Uses OpenAI GPT-3.5-Turbo to generate responses. Includes fallback mock response if the OpenAI API fails or quota is exceeded.
2️⃣ Send Email
Endpoint: POST /send-email
Request body:
{
"to": "someone@example.com",
"subject": "Hello",
"body": "Test email from MCP server"
}
Response:
{
"status": "Email sent!"
}
Uses Nodemailer with your SMTP configuration.
3️⃣ Frontend (Optional)
-
Minimal Next.js UI at http://localhost:3000
-
Features:
- Textarea to chat with MCP backend
- Button to send test email
Setup Instructions
1️⃣ Clone the repository
git clone <your-repo-url>
cd mcp-server
2️⃣ Backend Setup
cd backend
npm install express body-parser nodemailer openai dotenv
Create a .env file:
OPENAI_API_KEY=your_openai_api_key
SMTP_HOST=smtp.example.com
SMTP_USER=your_email@example.com
SMTP_PASS=your_email_password
Start backend:
node index.js
Backend URL: http://localhost:5000
3️⃣ Frontend Setup
cd ../frontend
npx create-next-app@latest . # only if not already set up
npm install
- Replace
pages/index.jswith frontend code. - Update
backendUrltohttp://localhost:5000in the frontend code.
Start frontend:
npm run dev
Frontend URL: http://localhost:3000
4️⃣ Testing Endpoints
Chat API
curl -X POST http://localhost:5000/chat \
-H "Content-Type: application/json" \
-d '{"message":"What was my last position?"}'
Send Email API
curl -X POST http://localhost:5000/send-email \
-H "Content-Type: application/json" \
-d '{"to":"someone@example.com","subject":"Test Email","body":"Hello from MCP server!"}'
Notes
- Backend must run on port 5000 to avoid conflicts with Next.js frontend (port 3000).
- If OpenAI API fails or exceeds quota, the
/chatendpoint returns a mock answer. - Ensure your SMTP settings are correct for email functionality.
Dependencies
- Backend: express, body-parser, nodemailer, openai, dotenv
- Frontend: next, react, react-dom
License
MIT License