Workspace_Productivity_Hub_Gateway
Centralized orchestration layer providing programmatic access to manage correspondence (electronic mail) and scheduling artifacts (appointments/meetings) via the integrated Gmail and Calendar service interfaces, facilitating task automation and workflow optimization.
Author

KaranThink41
Quick Info
Actions
Tags
Workspace Utility Orchestrator Node
This Model Context Protocol (MCP) endpoint acts as a nexus for interacting with Google's core communication and scheduling APIs (Gmail and Calendar). It exposes functionalities that allow external systems to manipulate electronic messages and manage time-bound engagements programmatically.
Core Capabilities
Electronic Mail Handlers (Gmail Functions)
list_emails: Retrieve a catalog of recent correspondence, supporting advanced filtering criteria.search_emails: Execute complex lookups against the mailbox using Gmail's native query syntax.send_email: Dispatch new outgoing messages, including support for carbon copy (CC) and blind carbon copy (BCC) recipients.modify_email: Alter the status or categorization of existing messages (e.g., archival, deletion, marking status).
Scheduling Artifact Handlers (Calendar Functions)
list_events: Fetch details for upcoming scheduled activities within specified temporal boundaries.create_event: Instigate a new calendar entry, defining participants and session parameters.update_event: Revise the parameters of an established schedule entry.delete_event: Permanently remove a scheduled commitment.
Deployment Prerequisites
- Runtime Environment: Node.js environment, version 14 or newer.
- Cloud Project Configuration:
- Navigate to the Google Cloud Console.
- Provision or select a target project.
- Activate the necessary APIs:
- Access 'APIs & Services' -> 'Library'.
- Secure activation of both the 'Gmail API' and 'Google Calendar API'.
- Configure OAuth 2.0 Credentials:
- Proceed to 'APIs & Services' -> 'Credentials'.
- Initiate credential creation: 'OAuth client ID'.
- Select 'Web application' as the application type.
- Append the required callback URI:
http://localhost:3000/auth/callback. - Record the resulting Client Identifier and Secret.
Installation via Smithery Platform
Use the Smithery command-line interface to deploy the server: bash npx spinai-mcp install @KaranThink41/gsuite-mcp-server --provider smithery --config '{"googleClientId":"your_client_id","googleClientSecret":"your_secret","googleRefreshToken":"your_token"}'
Alternatively, configure via smithery.config.js:
javascript
// smithery.config.js
export default {
KaranThink41_workspace_gateway:
{
command: 'npx',
args: [
'-y',
'@smithery/cli@latest',
'run',
'@KaranThink41/google_chat_mcp_server'
]
},
};
Local Execution (Alternative)
For direct local execution:
-
Clone the repository source code: bash git clone https://github.com/KaranThink41/Google_workspace_mcp_server.git cd Google_workspace_mcp_server
-
Resolve dependencies: bash npm install
-
Compile the codebase: bash npm run build
-
Start the server instance: bash node build/index.js
Operational Examples (Invocation Payloads)
Mailbox Tasks
- Retrieve Latest Mail: (Show top 5 unread)
{ "maxResults": 5, "query": "is:unread" }
- Targeted Mail Search:
{ "query": "from:support@corp.com has:attachment larger:5M", "maxResults": 10 }
- Transmit Correspondence:
{ "to": "stakeholder@domain.org", "subject": "Project Update", "body": "Details attached.", "cc": "manager@domain.org" }
- Message State Update:
{ "id": "msg_xyz123", "addLabels": ["ARCHIVED"], "removeLabels": ["IMPORTANT"] }
Calendar Operations
- Upcoming Schedule Fetch:
{ "maxResults": 10, "timeMin": "2025-03-01T00:00:00Z", "timeMax": "2025-03-31T23:59:59Z" }
- Schedule Appointment:
{ "summary": "Q1 Review", "location": "Virtual Link", "description": "Reviewing financial performance.", "start": "2025-03-15T14:00:00Z", "end": "2025-03-15T15:30:00Z", "attendees": ["analyst@corp.com", "lead@corp.com"] }
- Reschedule Commitment:
{ "eventId": "event_9876", "summary": "Revised Q1 Review", "start": "2025-03-16T14:00:00Z" }
- Cancel Commitment:
{ "eventId": "event_9876" }
Support and Diagnostics
- Credential Failures:
- Validate that all necessary OAuth scopes have been explicitly authorized.
- Confirm the Client ID and Secret match registered application values.
-
Ensure the refresh token has not expired or been revoked.
-
API Service Interruptions:
- Review the Google Cloud Console for current API usage quotas and potential throttling.
- Confirm that the required Google APIs are active for the associated project.
- Cross-reference request parameters against API specification requirements.
Licensing
This utility is distributed under the permissive MIT License terms.
Google Chat API Interface (Deprecated/Informational)
Note: The original entry included a section for Google Chat API integration. This section is retained below for context but the primary focus of this rewritten entry is Gmail/Calendar.
This section describes capabilities for interfacing with the Google Chat API for space interaction.
Chat Utility Suite
post_text_message: Submit textual content to a designated Chat space.fetch_message_details: Retrieve granular data for a specific message within a space.list_space_messages: Enumerate messages in a space, supporting ordering and pagination.
Space Administration Tools
fetch_space_details: Obtain comprehensive metadata for a specified communication area.list_joined_spaces: Generate a roster of all accessible spaces for the authenticated user.
Participant Management
list_space_memberships: View the roster of individuals associated with a space.fetch_member_details: Query specific attributes for an individual participant.
Semantic Query Assistance
apply_natural_language_filter: Translate idiomatic human language into structured API query parameters.
Error Mitigation Strategies
System robustness is ensured through systematic error handling, addressing potential issues such as authorization revocations, malformed identifiers, service throttling, and API limits.
Security Posture
Authentication secrets are isolated in environment variables. OAuth refresh tokens are managed securely, ensuring private keys remain shielded from the application runtime context.
Community Contribution Guide
Contributors are encouraged to engage by forking the repository, initiating feature branches, committing logical changes, and submitting Pull Requests for review.
License Details
This project adheres to the MIT License terms.
