A Model Context Protocol (MCP) server for CV data and email functionality, now available as both an MCP server and a REST API.
- 📄 CV data parsing from PDF
- 🔍 Search functionality across CV content
- 📧 Email notifications via Gmail SMTP
- 🌐 REST API endpoints for web integration
- 🛠 MCP tools for AI assistant integration
-
Install dependencies:
npm install
-
Set up environment variables in
.env
:GMAIL_USER=your-email@gmail.com GMAIL_PASS=your-app-password MCP_SERVER_PORT=3001 DEBUG=true
-
Start the web server:
npm start
-
Or start the MCP server:
npm run start:mcp
Railway is perfect for Node.js applications and offers free hosting:
-
Push to GitHub (if not already done):
git add . git commit -m "Add web server and deployment config" git push origin main
-
Deploy to Railway:
- Go to railway.app
- Sign up/login with GitHub
- Click "New Project" → "Deploy from GitHub repo"
- Select your
mcp-cv-backend
repository - Railway will automatically detect the Dockerfile and deploy
-
Set Environment Variables in Railway dashboard:
GMAIL_USER
: Your Gmail addressGMAIL_PASS
: Your Gmail app passwordPORT
: 3001 (Railway will set this automatically)
-
Your API will be available at:
https://your-app-name.railway.app
- Go to render.com
- Connect your GitHub repository
- Choose "Web Service"
- Use these settings:
- Build Command:
npm install
- Start Command:
npm start
- Environment: Add your environment variables
- Build Command:
- Install Vercel CLI:
npm i -g vercel
- Deploy:
vercel --prod
- Set environment variables in Vercel dashboard
Once deployed, your backend will have these endpoints:
GET /
- Server info and statusGET /health
- Health checkGET /api/personal
- Get personal informationGET /api/experience
- Get work experienceGET /api/education
- Get education detailsGET /api/skills
- Get skills listPOST /api/search
- Search CV contentPOST /api/email
- Send email notification
Update your frontend to use the deployed backend URL:
const API_BASE_URL = 'https://your-app-name.railway.app';
// Example API call
const response = await fetch(`${API_BASE_URL}/api/personal`);
const data = await response.json();
Required environment variables:
GMAIL_USER
- Your Gmail addressGMAIL_PASS
- Gmail app password (not your regular password)PORT
- Port number (set automatically by most platforms)DEBUG
- Set totrue
for development
- Never commit your
.env
file - Use Gmail App Passwords, not regular passwords
- The backend is configured for CORS with your frontend domain
Run tests with:
npm test
If you encounter issues:
- Check the deployment logs
- Verify environment variables are set correctly
- Ensure your Gmail app password is working
- Test the health endpoint:
GET /health