gas_mcp

whichguy/gas_mcp

3.2

If you are the rightful owner of gas_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 henry@mcphub.com.

The MCP Google Apps Script Server is a robust server designed to integrate AI assistants with Google Apps Script, enabling seamless project management and execution.

Tools
  1. gas_auth

    Manage OAuth 2.0 authentication.

  2. gas_project_create

    Create new Google Apps Script projects.

  3. gas_write

    Write content to files within a project.

  4. gas_run

    Execute JavaScript code dynamically in the GAS environment.

  5. gas_deploy_create

    Create deployments for web apps and APIs.

MCP Google Apps Script Server

npm version License: MIT Node.js Version TypeScript MCP Protocol

A powerful Model Context Protocol server for seamless Google Apps Script integration

Features โ€ข Quick Start โ€ข Installation โ€ข Usage โ€ข API Reference โ€ข Contributing


๐Ÿ“‹ Table of Contents

๐ŸŽฏ Overview

The MCP Google Apps Script Server bridges the gap between AI assistants and Google Apps Script, enabling seamless creation, execution, and management of Google Apps Script projects directly from your development environment. Built with TypeScript and following the Model Context Protocol specification, it provides a robust, type-safe interface for Google Apps Script operations.

Key Benefits

  • ๐Ÿš€ Direct Code Execution: Run JavaScript/Apps Script code instantly without manual deployment
  • ๐Ÿ“ Full Project Management: Create, edit, organize, and deploy complete GAS projects
  • ๐Ÿ” Secure OAuth Integration: Industry-standard PKCE OAuth 2.0 flow with Google
  • ๐Ÿ”„ Real-time Synchronization: Live sync between local development and Google Apps Script
  • ๐Ÿ› ๏ธ Developer-Friendly: Comprehensive error handling, logging, and debugging tools
  • ๐Ÿ“ฑ Drive Integration: Seamless binding with Google Sheets, Docs, Forms, and Sites

โœจ Features

๐Ÿ”ง Core Functionality

  • Project Management: Create, list, delete, and manage GAS projects
  • Smart File Operations: Read, write, copy, move, and organize files with automatic module wrapper
  • Dynamic Code Execution: Execute JavaScript code directly in GAS environment with require() support
  • Deployment Management: Create, update, and manage web app and API deployments
  • Version Control: Create and manage project versions with detailed metadata
  • Module System: Automatic require() wrapper for seamless inter-module dependencies

๐Ÿ”— Integration Capabilities

  • Google Drive: Find and bind scripts to Sheets, Docs, Forms, and Sites
  • OAuth 2.0: Secure authentication with PKCE flow
  • MCP Protocol: Standards-compliant Model Context Protocol implementation
  • TypeScript: Full type safety and IntelliSense support

๐Ÿ“Š Monitoring & Analytics

  • Execution Metrics: Track script performance and usage statistics
  • Process Monitoring: View execution history and debug failed runs
  • Error Reporting: Comprehensive error tracking and diagnostics

๐Ÿ“‹ Prerequisites

Before getting started, ensure you have:

  • Node.js v18.0.0 or higher (Download)
  • npm v8.0.0 or higher (comes with Node.js)
  • Google Account with access to Google Cloud Console
  • Cursor IDE or another MCP-compatible client
  • Google Cloud Project with Apps Script API enabled

๐ŸŽฏ Recommended Tools

For optimal development experience, use these preferred tools that provide automatic module wrapper functionality:

โœ… Smart File Operations

  • gas_write: Automatically wraps JavaScript code with _main() function for require() system
  • gas_cat: Intelligent local/remote file reading with project context
  • gas_run: Code execution with current project context

โš ๏ธ Advanced Tools (Use with Caution)

  • gas_raw_write: Direct file writing (clobbers files, no module wrapper)
  • gas_raw_cat: Direct file reading (no local caching)
  • gas_raw_run: Direct code execution (requires explicit script ID)

๐Ÿ”‘ Key Advantage: Smart tools automatically wrap your JavaScript code with the proper _main() function signature, enabling seamless require() functionality across your modules without manual wrapper management.

๐Ÿš€ Installation

1. Clone and Install

# Clone the repository
git clone https://github.com/whichguy/mcp_gas.git
cd mcp_gas

# Install dependencies
npm install

# Build the project
npm run build

2. OAuth Configuration

Create Google OAuth credentials:

  1. Visit Google Cloud Console
  2. Create a new project or select existing one
  3. Enable the Google Apps Script API
  4. Go to Credentials โ†’ Create Credentials โ†’ OAuth client ID
  5. Choose Desktop Application
  6. Download the JSON file

Configure the server:

# Copy your OAuth credentials
cp path/to/your/credentials.json oauth-config.json

3. Verify Installation

# Run validation script
./validate-setup.sh

# Start the server
npm start

๐Ÿƒ Quick Start

Basic Workflow

// 1. Authenticate with Google
await gas_auth({ mode: "start" });

// 2. Create a new project
const project = await gas_project_create({ 
  title: "My First Calculator" 
});

// 3. Add source code
await gas_write({
  path: `${project.scriptId}/calculator`,
  content: `
    function add(a, b) {
      return a + b;
    }
    
    function fibonacci(n) {
      if (n <= 1) return n;
      return fibonacci(n - 1) + fibonacci(n - 2);
    }
  `
});

// 4. Execute code directly
const result = await gas_run({
  scriptId: project.scriptId,
  js_statement: "add(5, 3)"
});
console.log(result); // 8

// 5. Run complex calculations
const fibResult = await gas_run({
  scriptId: project.scriptId,
  js_statement: "fibonacci(10)"
});
console.log(fibResult); // 55

Integration with Cursor IDE

Add to your Cursor configuration:

{
  "mcpServers": {
    "mcp-gas": {
      "command": "node",
      "args": ["/path/to/mcp_gas/dist/src/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

โš™๏ธ Configuration

The MCP Gas Server uses a single unified configuration file: mcp-gas-config.json

Unified Configuration Structure

{
  "oauth": {
    "client_id": "your-oauth-client-id.apps.googleusercontent.com",
    "type": "uwp",
    "redirect_uris": ["http://127.0.0.1/*", "http://localhost/*"],
    "scopes": ["https://www.googleapis.com/auth/script.projects", "..."]
  },
  "projects": {
    "my-project": {
      "scriptId": "1ABC...XYZ",
      "name": "my-project",
      "description": "My project description"
    }
  },
  "environments": {
    "dev": { "scriptId": "1ABC...XYZ", "name": "my-project" }
  },
  "localRoot": {
    "rootPath": "/Users/you/src/mcp_gas/gas-projects",
    "lastUpdated": "2025-06-29T16:47:43.135Z"
  },
  "server": {
    "defaultWorkingDir": "/Users/you/src/mcp_gas",
    "configVersion": "1.0.0",
    "lastModified": "2025-06-29T16:47:43.135Z"
  }
}

Starting the Server

# Using npm (recommended)
npm start

# Direct invocation
node dist/src/index.js --config ./mcp-gas-config.json

# Custom config location
node dist/src/index.js --config /path/to/custom-config.json

Cursor IDE Integration

Update your Cursor configuration to include the config file:

{
  "mcpServers": {
    "mcp-gas": {
      "command": "node",
      "args": [
        "/Users/you/src/mcp_gas/dist/src/index.js",
        "--config",
        "/Users/you/src/mcp_gas/mcp-gas-config.json"
      ],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

๐Ÿ”ง All 43 Available Tools

๐Ÿ“‹ Tool Usage Guide

Tool TypeWhen to UseExamples
โœ… RECOMMENDEDNormal development workflowgas_write, gas_cat, gas_run
๐Ÿ”„ EXPLICITMulti-environment, troubleshootinggas_pull, gas_push, gas_status
โš ๏ธ ADVANCEDPower users, explicit controlgas_raw_write, gas_raw_cat, gas_raw_copy, gas_raw_run

โœ… RECOMMENDED TOOLS (Normal Workflow)

Authentication (1 tool)

ToolDescriptionKey Parameters
gas_authOAuth 2.0 authenticationmode, openBrowser?

๐Ÿ“‚ Smart Filesystem Operations (6 tools)

Auto-sync: Automatically handles local/remote synchronization

ToolDescriptionKey Parameters
gas_lsList projects/filespath?, detailed?
gas_catโœ… Smart reader (local-first, remote fallback)path
gas_writeโœ… Auto-sync writer (local + remote)path (projectId/filename), content
gas_rmDelete filespath
gas_mvMove/rename filesfrom, to
gas_cpCopy filesfrom, to

โš ๏ธ Advanced Filesystem Operations (3 tools)

Raw access: Direct remote operations with explicit project IDs

ToolDescriptionKey Parameters
gas_raw_catRead files with explicit project IDpath (full projectId/filename)
gas_raw_writeโš ๏ธ Write files with explicit project ID (CLOBBERS remote files - use gas_write for safe merging)path, content
gas_raw_copyCopy files between projectsfrom, to

๐Ÿš€ Smart Execution (1 tool)

Current project: Uses project context automatically

ToolDescriptionKey Parameters
gas_runโœ… Execute with current projectjs_statement

โš ๏ธ Advanced Execution (1 tool)

Raw execution: Direct execution with explicit project IDs

ToolDescriptionKey Parameters
gas_raw_runExecute with explicit project IDscriptId, js_statement

๐ŸŽฏ Project Workflow (1 tool)

Main workflow: Set project and start development

ToolDescriptionKey Parameters
gas_project_setโœ… Set project & auto-pull filesproject

๐Ÿ”„ EXPLICIT TOOLS (Multi-Environment)

Project Management (4 tools)

ToolDescriptionKey Parameters
gas_mkdirCreate logical directoriesprojectId, directoryPath
gas_infoGet project informationprojectId, includeContent?
gas_reorderChange file execution orderprojectId, fileName, newPosition
gas_project_metricsGet project analyticsscriptId, metricsGranularity?

Local Sync & Project Context (4 tools)

ToolDescriptionKey Parameters
gas_project_setSet current project & cache filesproject?, workingDir?
gas_pullPull remote files to local srcproject?, force?
gas_pushPush local files to remoteproject?, dryRun?
gas_statusCompare local vs remote filesproject?, detailed?

Execution Tools (2 tools)

ToolDescriptionKey Parameters
gas_run_api_execExecute via APIscriptId, functionName, parameters?
gas_proxy_setupSetup HTTP proxyscriptId, deploy?

Deployment Management (7 tools)

ToolDescriptionKey Parameters
gas_version_createCreate project versionscriptId, description?
gas_deploy_createCreate deploymentscriptId, entryPointType, versionNumber?
gas_deploy_listList deploymentsscriptId
gas_deploy_get_detailsGet deployment infoscriptId, deploymentId
gas_deploy_deleteDelete deploymentscriptId, deploymentId
gas_deploy_updateUpdate deploymentscriptId, deploymentId
gas_project_createCreate new projecttitle, parentId?

Version Management (2 tools)

ToolDescriptionKey Parameters
gas_version_getGet version detailsscriptId, versionNumber
gas_version_listList all versionsscriptId, pageSize?

Process Management (2 tools)

ToolDescriptionKey Parameters
gas_process_listList user processespageSize?, userProcessFilter?
gas_process_list_scriptList script processesscriptId, scriptProcessFilter?

Drive Integration (3 tools)

ToolDescriptionKey Parameters
gas_find_drive_scriptFind container scriptsfileName
gas_bind_scriptBind script to containercontainerName, scriptName
gas_create_scriptCreate container scriptcontainerName, scriptName?

Local Root Management (4 tools)

ToolDescriptionKey Parameters
gas_local_set_rootSet local root directoryrootPath, workingDir?
gas_local_get_rootGet current local rootworkingDir?
gas_local_list_projectsList local projectsdetailed?, workingDir?
gas_local_show_structureShow directory structuredepth?, workingDir?

Trigger Management (3 tools)

ToolDescriptionKey Parameters
gas_trigger_listList installable triggersscriptId, detailed?
gas_trigger_createCreate new triggerscriptId, functionName, triggerType
gas_trigger_deleteDelete triggerscriptId, triggerId?, functionName?

For complete API documentation, see and .

๐Ÿ“– Usage

Authentication

// Check current authentication status
await gas_auth({ mode: "status" });

// Start OAuth flow (opens browser)
await gas_auth({ mode: "start" });

// Logout and clear credentials
await gas_auth({ mode: "logout" });

Project Operations

// Create a new project
const project = await gas_project_create({
  title: "Data Analytics Suite",
  parentId: "optional_drive_folder_id"
});

// List all accessible projects
const projects = await gas_ls({ path: "" });

// Get detailed project information
const info = await gas_info({ 
  projectId: project.scriptId,
  includeContent: true 
});

File Management

// Write a new file
await gas_write({
  path: `${scriptId}/utils/helpers`,
  content: `
    function formatDate(date) {
      return new Date(date).toISOString().split('T')[0];
    }
    
    function validateEmail(email) {
      const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
      return re.test(email);
    }
  `,
  position: 0  // Execute first
});

// Read file contents
const content = await gas_cat({
  path: `${scriptId}/utils/helpers`
});

// Copy file to new location
await gas_cp({
  from: `${scriptId}/utils/helpers`,
  to: `${scriptId}/shared/utilities`
});

// Move/rename file
await gas_mv({
  from: `${scriptId}/shared/utilities`,
  to: `${scriptId}/lib/common`
});

Code Execution

// Execute simple expressions
await gas_run({
  scriptId: scriptId,
  js_statement: "Math.PI * 2"
});

// Call custom functions
await gas_run({
  scriptId: scriptId,
  js_statement: "formatDate(new Date())"
});

// Access Google Services
await gas_run({
  scriptId: scriptId,
  js_statement: "DriveApp.getRootFolder().getName()"
});

// Execute complex operations
await gas_run({
  scriptId: scriptId,
  js_statement: `
    const sheet = SpreadsheetApp.create('Analytics Data');
    const id = sheet.getId();
    sheet.getActiveSheet().getRange('A1').setValue('Hello World');
    return id;
  `
});

Deployment Management

// Create a version (required for deployment)
const version = await gas_version_create({
  scriptId: scriptId,
  description: "Initial release with analytics functions"
});

// Deploy as web app
const deployment = await gas_deploy_create({
  scriptId: scriptId,
  entryPointType: "WEB_APP",
  webAppAccess: "ANYONE",
  webAppExecuteAs: "USER_ACCESSING",
  versionNumber: version.versionNumber
});

// Deploy as API executable
const apiDeployment = await gas_deploy_create({
  scriptId: scriptId,
  entryPointType: "EXECUTION_API",
  accessLevel: "ANYONE",
  versionNumber: version.versionNumber
});

// Execute via API (requires deployment)
const apiResult = await gas_run_api_exec({
  scriptId: scriptId,
  functionName: "formatDate",
  parameters: [new Date()]
});

๐Ÿ“š API Reference

Authentication Tools

ToolDescriptionParameters
gas_authManage OAuth authenticationmode: "start" | "status" | "logout"

Project Management Tools

ToolDescriptionKey Parameters
gas_project_createCreate new GAS projecttitle, parentId?
gas_lsList projects and filespath, detailed?, recursive?
gas_infoGet project detailsprojectId, includeContent?

File Operation Tools

ToolDescriptionKey Parameters
gas_writeWrite file contentpath, content, position?
gas_catRead file contentpath
gas_mvMove/rename filesfrom, to
gas_cpCopy filesfrom, to
gas_rmDelete filespath

Execution Tools

ToolDescriptionKey Parameters
gas_runExecute JavaScript dynamicallyscriptId, js_statement
gas_run_api_execExecute via APIscriptId, functionName, parameters?

Deployment Tools

ToolDescriptionKey Parameters
gas_version_createCreate project versionscriptId, description?
gas_deploy_createCreate deploymentscriptId, entryPointType, versionNumber?
gas_deploy_listList deploymentsscriptId
gas_deploy_get_detailsGet deployment infoscriptId, deploymentId

For complete API documentation, see .

โš™๏ธ Configuration

OAuth Configuration

The oauth-config.json file contains your Google OAuth credentials:

{
  "client_id": "your-client-id.apps.googleusercontent.com",
  "client_secret": "your-client-secret",
  "redirect_uris": ["http://localhost:3000/oauth/callback"],
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token"
}

Environment Variables

# Optional: Override OAuth client ID
export GOOGLE_OAUTH_CLIENT_ID="your-client-id"

# Optional: Set custom OAuth port
export OAUTH_PORT="3000"

# Optional: Enable debug logging
export DEBUG="mcp:*"

# Optional: Set custom timeout
export REQUEST_TIMEOUT="30000"

MCP Server Configuration

For Cursor IDE integration:

{
  "mcpServers": {
    "mcp-gas": {
      "command": "node",
      "args": ["/absolute/path/to/mcp_gas/dist/src/index.js"],
      "env": {
        "NODE_ENV": "production",
        "DEBUG": "mcp:error"
      }
    }
  }
}

๐Ÿ’ก Examples

Example 1: Spreadsheet Analytics

// Create analytics project
const project = await gas_project_create({
  title: "Spreadsheet Analytics"
});

// Add analytics functions
await gas_write({
  path: `${project.scriptId}/analytics`,
  content: `
    function analyzeSheet(sheetId) {
      const sheet = SpreadsheetApp.openById(sheetId);
      const data = sheet.getActiveSheet().getDataRange().getValues();
      
      return {
        rows: data.length,
        columns: data[0]?.length || 0,
        lastUpdate: sheet.getLastUpdate().toISOString()
      };
    }
    
    function generateReport(sheetIds) {
      return sheetIds.map(id => ({
        sheetId: id,
        analysis: analyzeSheet(id)
      }));
    }
  `
});

// Execute analytics
const report = await gas_run({
  scriptId: project.scriptId,
  js_statement: `generateReport(["sheet_id_1", "sheet_id_2"])`
});

Example 2: Gmail Automation

// Create email automation project
const emailProject = await gas_project_create({
  title: "Email Automation Suite"
});

// Add email functions
await gas_write({
  path: `${emailProject.scriptId}/email`,
  content: `
    function sendWelcomeEmail(recipient, name) {
      const subject = "Welcome to Our Platform!";
      const body = \`
        Hello \${name},
        
        Welcome to our platform! We're excited to have you on board.
        
        Best regards,
        The Team
      \`;
      
      GmailApp.sendEmail(recipient, subject, body);
      return \`Email sent to \${recipient}\`;
    }
    
    function getUnreadCount() {
      return GmailApp.getInboxUnreadCount();
    }
  `
});

// Send welcome email
await gas_run({
  scriptId: emailProject.scriptId,
  js_statement: `sendWelcomeEmail("user@example.com", "John Doe")`
});

// Check unread emails
const unreadCount = await gas_run({
  scriptId: emailProject.scriptId,
  js_statement: "getUnreadCount()"
});

Example 3: Drive Integration

// Find existing spreadsheet and bind script
const driveFiles = await gas_find_drive_script({
  fileName: "Sales Data"
});

if (driveFiles.containers.length > 0) {
  // Bind script to spreadsheet
  const binding = await gas_bind_script({
    containerName: "Sales Data",
    scriptName: "Data Processor"
  });
  
  // Add functions to bound script
  await gas_write({
    path: `${binding.scriptId}/processor`,
    content: `
      function onOpen() {
        const ui = SpreadsheetApp.getUi();
        ui.createMenu('Data Tools')
          .addItem('Process Data', 'processCurrentSheet')
          .addToUi();
      }
      
      function processCurrentSheet() {
        const sheet = SpreadsheetApp.getActiveSheet();
        const data = sheet.getDataRange().getValues();
        
        // Process data logic here
        Browser.msgBox('Data processed successfully!');
      }
    `
  });
}

More examples available in the directory.

๐Ÿ› ๏ธ Development

Project Structure

mcp_gas/
โ”œโ”€โ”€ src/                    # TypeScript source code
โ”‚   โ”œโ”€โ”€ tools/             # MCP tool implementations
โ”‚   โ”‚   โ”œโ”€โ”€ auth.ts        # Authentication tools
โ”‚   โ”‚   โ”œโ”€โ”€ execution.ts   # Code execution tools
โ”‚   โ”‚   โ”œโ”€โ”€ filesystem.ts  # File operation tools
โ”‚   โ”‚   โ””โ”€โ”€ project.ts     # Project management tools
โ”‚   โ”œโ”€โ”€ auth/              # OAuth authentication
โ”‚   โ”œโ”€โ”€ api/               # Google Apps Script API client
โ”‚   โ”œโ”€โ”€ server/            # MCP server implementation
โ”‚   โ””โ”€โ”€ index.ts           # Main server entry point
โ”œโ”€โ”€ test/                  # Comprehensive test suite
โ”œโ”€โ”€ docs/                  # Documentation
โ”œโ”€โ”€ examples/              # Usage examples
โ””โ”€โ”€ gas-projects/          # Local project templates

Development Commands

# Development workflow
npm run dev                # Watch mode compilation
npm run build             # Production build
npm run clean             # Clean build artifacts

# Code quality
npm run lint              # Run ESLint
npm run lint:fix          # Fix linting issues

# Testing
npm test                  # Run core tests
npm run test:unit         # Unit tests only
npm run test:system       # System integration tests
npm run test:workflow     # End-to-end workflow tests
npm run test:all          # Run all test suites

Adding New Tools

  1. Create tool implementation in src/tools/
  2. Extend the base tool class
  3. Add comprehensive TypeScript types
  4. Write unit tests in test/tools/
  5. Update API documentation

Example tool structure:

import { BaseTool } from './base.js';

export class MyNewTool extends BaseTool {
  public name = "my_new_tool";
  public description = "Description of what this tool does";
  public inputSchema = {
    type: "object" as const,
    properties: {
      parameter1: {
        type: "string",
        description: "Parameter description"
      }
    },
    required: ["parameter1"]
  };

  async execute(args: any): Promise<any> {
    // Implementation here
  }
}

๐Ÿงช Testing

Test Categories

  • Unit Tests: Individual function and class testing
  • System Tests: MCP protocol and authentication testing
  • Integration Tests: End-to-end workflow testing with real Google APIs
  • Security Tests: OAuth flow and permission validation

Running Tests

# Quick validation
npm test

# Comprehensive testing
npm run test:all

# Integration tests (requires OAuth setup)
npm run test:workflow

# Specific test suites
npm run test:unit         # Unit tests only
npm run test:system       # System tests only
npm run test:gas-run      # Execution engine tests

Test Configuration

For integration tests, set up environment:

# Enable integration testing
export GAS_INTEGRATION_TEST=true

# Optional: Use custom OAuth credentials
export GOOGLE_OAUTH_CLIENT_ID="test-client-id"

๐Ÿ”ง Troubleshooting

Common Issues

Authentication Problems

Issue: "OAuth client was not found" or "invalid_client"

# Solution: Check OAuth configuration
cat oauth-config.json  # Verify credentials exist
./validate-setup.sh    # Run comprehensive validation

Issue: Browser doesn't open during authentication

# Solution: Check browser setup
export BROWSER=chrome  # Set preferred browser
npm start             # Restart server
Connection Issues

Issue: MCP server not connecting in Cursor

# Check Cursor configuration
# Ensure absolute paths in mcpServers config
# Restart Cursor IDE after configuration changes

Issue: Server startup failures

# Validate Node.js version
node --version  # Should be โ‰ฅ18.0.0

# Rebuild project
npm run clean && npm install && npm run build
Execution Problems

Issue: gas_run timeouts or hangs

# Check Google Apps Script quota limits
# Verify project permissions
# Try simpler code execution first

Issue: File operation failures

# Check project permissions
# Verify file paths (no extensions needed)
# Ensure authentication is valid

Debug Mode

Enable comprehensive logging:

# Enable all debug output
export DEBUG=mcp:*
npm start

# Enable specific debug categories
export DEBUG=mcp:auth,mcp:execution
npm start

Validation Script

Run the comprehensive setup validator:

./validate-setup.sh

This script checks:

  • โœ… Node.js and npm versions
  • โœ… Project dependencies
  • โœ… OAuth configuration
  • โœ… Build process
  • โœ… Server startup
  • โœ… MCP protocol compliance

Getting Help

  1. Check Documentation: Review directory
  2. Search Issues: Look for similar problems in project issues
  3. Enable Debug Mode: Use DEBUG=mcp:* for detailed logs
  4. Run Validation: Execute ./validate-setup.sh
  5. Check Examples: Review for working patterns

๐Ÿค Contributing

We welcome contributions! Please see our for details.

Quick Start for Contributors

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/amazing-feature
    
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite:
    npm run test:all
    
  6. Commit your changes:
    git commit -am 'Add amazing feature'
    
  7. Push to your branch:
    git push origin feature/amazing-feature
    
  8. Open a Pull Request

Development Guidelines

  • Code Style: Follow TypeScript best practices
  • Testing: Maintain >90% test coverage
  • Documentation: Update README and docs for new features
  • Backwards Compatibility: Don't break existing APIs without major version bump

Areas for Contribution

  • ๐Ÿš€ Performance Optimization: Improve execution speed and memory usage
  • ๐Ÿ“š Documentation: Enhance guides, examples, and API docs
  • ๐Ÿงช Testing: Add more comprehensive test coverage
  • ๐Ÿ”Œ Integration: Add support for more Google services
  • ๐Ÿ› ๏ธ Tools: Create new MCP tools for additional functionality

๐Ÿ” Security

Security Best Practices

  • OAuth Credentials: Never commit oauth-config.json to version control
  • Environment Variables: Use environment variables for sensitive configuration
  • Scope Limitation: Request only necessary OAuth scopes
  • Token Storage: Credentials are stored securely using OS keychain
  • Regular Updates: Keep dependencies updated for security patches

Security Features

  • PKCE OAuth Flow: Proof Key for Code Exchange for enhanced security
  • State Parameter Validation: CSRF protection during OAuth flow
  • Token Expiry Handling: Automatic token refresh with clock skew protection
  • Secure Token Storage: OS-level credential storage
  • Input Validation: Comprehensive validation of all inputs

Reporting Security Issues

If you discover a security vulnerability, please:

  1. DO NOT open a public issue
  2. Email security concerns to []
  3. Include detailed description and reproduction steps
  4. Allow time for investigation and resolution

๐Ÿ“„ License

This project is licensed under the MIT License - see the file for details.

MIT License

Copyright (c) 2024 MCP Gas Server Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

๐Ÿ†˜ Support

Documentation

  • ๐Ÿ“– - Organized documentation hub
  • ๐Ÿ“š - Complete API documentation
  • ๐Ÿ”ง - Technical documentation for developers
  • ๐Ÿ› ๏ธ - Schema design for AI assistants

Community

  • ๐Ÿ’ฌ Discussions - Ask questions and share ideas
  • ๐Ÿ› Issues - Report bugs and request features
  • ๐Ÿ“ง - Direct support for critical issues

Resources


Made with โค๏ธ by the MCP Gas Server team

โญ Star this repo โ€ข ๐Ÿ› Report a bug โ€ข ๐Ÿ’ก Request a feature