MatthewCampCorp/stark-mcp
If you are the rightful owner of stark-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for interacting with Google Workspace services including Drive, Calendar, and Apps Script.
STARK Google Workspace MCP Server
A Model Context Protocol (MCP) server for interacting with Google Workspace services including Drive, Calendar, and Apps Script.
Features
- Drive Search: Search Google Drive for files and folders using the Drive API query syntax
- Calendar Quick Lookup: Retrieve upcoming calendar events from your primary calendar
- Apps Script Trigger: Execute custom Google Apps Script functions via Web App
Prerequisites
- Python 3.8 or higher
- Google Cloud Project with:
- Drive API enabled
- Calendar API enabled
- Service account with domain-wide delegation configured
- (Optional) Deployed Google Apps Script Web App for custom functions
Installation
-
Clone or download this repository
-
Install dependencies:
pip install -r requirements.txt
- Set up environment variables by copying
.env.exampleto.env:
cp .env.example .env
- Configure your
.envfile with:GOOGLE_APPLICATION_CREDENTIALS: Path to your service account JSON key fileUSER_EMAIL: Email address for domain-wide delegationAPPS_SCRIPT_URL: (Optional) Your deployed Apps Script Web App URLAPPS_SCRIPT_AUTH_TOKEN: (Optional) Authentication token for Apps Script
Service Account Setup
- Create a service account in Google Cloud Console
- Download the JSON key file
- Enable domain-wide delegation for the service account
- In Google Workspace Admin Console, authorize the service account with these scopes:
https://www.googleapis.com/auth/drive.readonlyhttps://www.googleapis.com/auth/calendar.readonly
Usage
Option 1: HTTP Gateway (Recommended for LLC Command Center)
For HTTP-based integrations like the LLC Command Center backend, use the HTTP gateway:
python http_gateway.py
The gateway runs on http://localhost:3000 and provides REST API endpoints. See HTTP_GATEWAY_README.md for full documentation.
Quick Start:
# Windows
start_gateway.bat
# Or manually
python http_gateway.py
Option 2: stdio MCP Server (For Claude Desktop)
Run the traditional stdio-based MCP server for Claude Desktop integration:
python -m server.server
The server communicates via stdio and can be integrated with MCP-compatible clients.
Tools
drive_search
Search Google Drive for files matching a query.
Parameters:
query(string, required): Drive API search querymax_results(integer, optional): Maximum results to return (1-100, default: 10)
Example queries:
"name contains 'report'""mimeType='application/pdf'""modifiedTime > '2024-01-01'"
calendar_quick
Get upcoming calendar events.
Parameters:
days_ahead(integer, optional): Number of days to look ahead (1-90, default: 7)
apps_script_trigger
Execute a Google Apps Script function.
Parameters:
function_name(string, required): Name of the Apps Script functionparameters(object, optional): Parameters to pass to the function
Project Structure
stark-mcp/
├── server/
│ ├── __init__.py
│ ├── server.py # Main MCP server
│ ├── core/
│ │ ├── __init__.py
│ │ ├── auth.py # Google authentication
│ │ └── apps_script_client.py # Apps Script integration
│ └── tools/
│ ├── __init__.py
│ ├── drive_search.py # Drive search tool
│ ├── calendar_quick.py # Calendar tool
│ └── apps_script_trigger.py # Apps Script tool
├── requirements.txt
├── .env.example
└── README.md
Error Handling
All tools include comprehensive error handling and will return descriptive error messages if:
- Authentication fails
- API calls fail
- Required environment variables are missing
- Invalid parameters are provided
License
This project is provided as-is for educational and development purposes.