メインコンテンツにスキップ

ToolsForMCPServer-extension

Simplified Google Workspace Automation with Gemini CLI Extensions

AI Summary

ToolsForMCPServer-extension

Provides a Gemini CLI extension that installs and enables the ToolsForMCPServer with minimal setup.

Target Users

Intermediate-to-advanced GAS developers who want to control Google services via natural language through the Gemini CLI.

Problems Solved

Setting up an MCP server required many manual steps; the extension removes this complexity.

Tags

Main Features

1
One-command installation

Install ToolsForMCPServer instantly with `gemini extensions install`, saving setup time.

2
Seamless Gemini CLI integration

Registered as a Gemini CLI extension, making the MCP tools accessible through the `/mcp` command.

3
Secure configuration via environment variables

Manages API key and Web Apps URL through environment variables and uses an access key for simple authentication.

Usage Examples

Health-check endpoint for the MCP Web App

/**
 * Returns a simple response if the supplied accessKey matches.
 */
function doGet(e) {
  const ACCESS_KEY = "sample"; // Must match the key used in your env var
  if (e.parameter.accessKey !== ACCESS_KEY) {
    return ContentService
      .createTextOutput("Invalid accessKey")
      .setMimeType(ContentService.MimeType.TEXT);
  }
  return ContentService
    .createTextOutput("MCP server is running")
    .setMimeType(ContentService.MimeType.TEXT);
}

Deploy this script as a Web App and set MCP_WEB_APPS_URL to the deployment URL with ?accessKey=sample. You can then invoke the tools inside Gemini CLI with the /mcp command.