email-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@email-mcpsearch for John Doe and draft an email about project update"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Email MCP Server
A production-ready Model Context Protocol (MCP) server built with Node.js, Express, and the official MCP SDK (@modelcontextprotocol/sdk). It supports SSE transport (compatible with Zaby) and exposes tools to search contacts, draft emails, and send emails using the Gmail API.
Workflow & Business Logic
AI Flow:
search_contact->draft_email-> Wait for User Approval ->send_email.The AI must NEVER send an email directly without explicit user approval.
draft_emailsimply prepares the subject and body and does not interact with the Gmail API.send_emailtakes the drafted subject and body and sends it via the Gmail API.
Requirements
Node.js (v18 or higher)
A Google Cloud Project with the Gmail API enabled
OAuth 2.0 Credentials (Client ID, Client Secret, Refresh Token)
1. Installing Node
Make sure Node.js is installed. You can download it from nodejs.org.
2. Installing Dependencies
Clone this repository (or copy the files) and run:
npm install3. Creating .env
Create a .env file in the root directory by copying the .env.example:
cp .env.example .envFill in your Google credentials:
PORT=3000
GMAIL_CLIENT_ID=your_client_id
GMAIL_CLIENT_SECRET=your_client_secret
GMAIL_REDIRECT_URI=http://localhost:3000/oauth2callback
GMAIL_REFRESH_TOKEN=your_refresh_tokenNote: You can get a refresh token using Google's OAuth2 Playground or by implementing a small auth script.
4. Running Locally
Start the development server with auto-reload:
npm run devOr start it normally:
npm startThe server will run on http://localhost:3000.
5. Deploying to Railway
This repository contains a railway.json for seamless deployment.
Create an account on Railway.app.
Click New Project -> Deploy from GitHub repo.
Select this repository.
Go to the Variables tab in your Railway project settings and add all the environment variables from your
.envfile.Railway will automatically build and deploy your app. Wait for it to finish and note the public URL provided by Railway.
6. Connecting the endpoint to Zaby
Once deployed (or running locally), configure Zaby to use your MCP server.
Type: SSE
URL:
https://<your-railway-url>.up.railway.app/sse(orhttp://localhost:3000/ssefor local)
Zaby will automatically connect, list the tools, and make them available to the LLM.
7. Testing using Postman
To test the SSE connection manually:
Open Postman.
Create a new request to
GET http://localhost:3000/sse.You should see a stream of events. The first event will usually be an
endpointevent pointing to/message.Copy the session ID or note the POST endpoint.
Make a
POST http://localhost:3000/messagewith a JSON-RPC request to call a tool, e.g.,{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "hello", "arguments": {} } }
8. Testing using the MCP Inspector
You can use the official MCP Inspector to test the server.
npx @modelcontextprotocol/inspector node src/index.jsNote: Since the server uses SSE, you might need an inspector that specifically supports connecting via SSE if you want to test the transport layer, but the inspector can also just run the node script using stdio if configured, though this server is hardcoded to Express SSE. For SSE testing, point the inspector to http://localhost:3000/sse.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pavankrishna813/email-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server