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 henry@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.js
with frontend code. - Update
backendUrl
tohttp://localhost:5000
in 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
/chat
endpoint 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