@aot-tech/gmail-mcp-server
Version:
Gmail MCP Server with Bearer Token Authentication - A Model Context Protocol server for Gmail access
46 lines (45 loc) • 1.34 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = exports.SERVER_CONFIG = exports.GMAIL_API_BASE = void 0;
exports.getEnvironmentConfig = getEnvironmentConfig;
exports.GMAIL_API_BASE = 'https://gmail.googleapis.com/gmail/v1';
exports.SERVER_CONFIG = {
name: 'gmail-bearer-mcp',
version: '0.1.0',
description: 'Gmail MCP Server with Bearer Token Authentication',
capabilities: {
tools: {},
},
};
exports.config = {
constants: {
authHeaderPrefix: 'Bearer ',
gmailTokenHeader: 'X-Gmail-Token',
maxSearchResults: 500,
defaultSearchResults: 10,
maxEmailsToShow: 5,
},
api: {
base: exports.GMAIL_API_BASE,
endpoints: {
messages: '/users/me/messages',
labels: '/users/me/labels',
send: '/users/me/messages/send',
},
},
errorCodes: {
authenticationError: 401,
authorizationError: 403,
notFoundError: 404,
validationError: 400,
serverError: 500,
},
};
function getEnvironmentConfig() {
return {
bearerToken: process.env.GMAIL_BEARER_TOKEN || null,
nodeEnv: process.env.NODE_ENV || 'development',
port: process.env.PORT || 3000,
corsOrigin: process.env.CORS_ORIGIN || '*',
};
}