Manage Google Apps Script projects, including creation, editing, deployment, and execution. Requires Google Cloud credentials for authentication.
世界初のGoogle Apps Script完全操作MCPサーバー - JSON-RPC Protocol完全準拠版
✅ JSON-RPC Protocol汚染エラー完全修正
✅ プロセス早期終了エラー根本解決
✅ 99%軽量化達成: 647KB → 4.82KB
✅ Claude Desktop v0.11.6 完全対応
詳細: CRITICAL-FIX-REPORT.md を参照
Claude Desktop v0.11.6以降で最も簡単な方法:
DXTファイルをダウンロード
google-apps-script-mcp-STABLE-FIXED.dxt (4.82KB)
Claude Desktopでインストール
即座に利用開始!
npm install
# Service Accountキー(JSON文字列)
export GOOGLE_SERVICE_ACCOUNT_KEY='{"type":"service_account","project_id":"your-project",...}'
# または、ファイルパス指定
export GOOGLE_SERVICE_ACCOUNT_KEY="/path/to/service-account-key.json"
# 暗号化キー(推奨)
export ENCRYPTION_KEY="your-hex-encryption-key"
export GOOGLE_CREDENTIALS_PATH="/path/to/credentials.json"
export GOOGLE_AUTH_CODE="your-authorization-code"
.env
ファイルまたは環境変数を設定後、Claude.aiの設定に以下を追加:
{
"mcpServers": {
"google-apps-script-mcp": {
"command": "node",
"args": ["src/index-security.js"],
"cwd": "/path/to/google-apps-script-mcp",
"env": {
"GOOGLE_SERVICE_ACCOUNT_KEY": "your-service-account-key",
"ENCRYPTION_KEY": "your-encryption-key"
}
}
}
}
// APIキーを暗号化して保存
await setSecureProperty("script-id", "API_KEY", "your-secret-key", true);
// 暗号化されたAPIキーを取得
const apiKey = await getSecureProperty("script-id", "API_KEY", true);
// 全プロパティを一覧表示(マスキング付き)
await listProperties("script-id", true, true);
// セキュリティ監査を実行
const audit = await auditProperties("script-id");
// → 機密情報の検出、暗号化推奨、統計情報
// プロパティをバックアップ
const backup = await backupProperties("script-id", false);
// → チェックサム付きバックアップ
// バックアップから復元
await restoreProperties("script-id", backup, true);
// → チェックサム検証付き復元
// 新しいGASプロジェクトを作成
const project = await createGasProject("My New Project");
console.log(`プロジェクトID: ${project.scriptId}`);
// スクリプトファイルを作成
await createGasFile(scriptId, "main.js", "SERVER_JS", `
function myFunction() {
console.log("Hello from GAS!");
}
`);
// ファイル内容を取得
const fileContent = await getGasFile(scriptId, "main.js");
// GAS関数を実行
const result = await executeGasFunction(scriptId, "myFunction", []);
console.log("実行結果:", result);
// Webアプリとしてデプロイ
const deployment = await deployGasWebApp(scriptId, null, "appsscript", "初回デプロイ");
console.log(`WebアプリURL: ${deployment.url}`);
// ❌ 平文でAPIキーを保存(危険)
await setSecureProperty(scriptId, "api_key", "secret123", false);
// ✅ 暗号化してAPIキーを保存(安全)
await setSecureProperty(scriptId, "api_key", "secret123", true);
// 月1回実行推奨
const audit = await auditProperties(scriptId);
if (audit.suspiciousKeys.length > 0) {
console.warn("暗号化が必要なキーが見つかりました:", audit.suspiciousKeys);
}
// 重要なプロパティは定期的にバックアップ
const backup = await backupProperties(scriptId, false); // 復号化してバックアップ
// 安全な場所に保存...
dependency_check
- システム環境検証とClasp CLIセットアップ確認clasp_setup
- Clasp CLI認証セットアップガイダンスclasp_create
- Google Apps Scriptプロジェクト作成準備clasp_clone
- 既存プロジェクトクローン準備clasp_pull
- プロジェクト変更取得準備clasp_push_and_deploy
- プロジェクトプッシュ&デプロイ準備clasp_list
- プロジェクト一覧取得注意: STABLE版は基本的なClasp操作の準備・ガイダンスを提供します。実際のClasp実行は別途ローカル環境で行ってください。高度なセキュリティ機能については開発版をご利用ください。
set_secure_property
- 暗号化保存get_secure_property
- 復号化取得delete_property
- プロパティ削除list_properties
- プロパティ一覧audit_properties
- セキュリティ監査backup_properties
- バックアップrestore_properties
- 復元環境変数 | 説明 | 必須 | デフォルト |
---|---|---|---|
GOOGLE_SERVICE_ACCOUNT_KEY | Service Accountキー | ○※ | - |
GOOGLE_CREDENTIALS_PATH | OAuth認証情報パス | ○※ | - |
GOOGLE_AUTH_CODE | OAuth認証コード | △ | - |
ENCRYPTION_KEY | 暗号化キー(hex) | 推奨 | 自動生成 |
LOG_LEVEL | ログレベル | - | info |
MCP_SERVER_NAME | サーバー名 | - | google-apps-script-mcp |
※ いずれか1つが必須
https://www.googleapis.com/auth/script.projects
https://www.googleapis.com/auth/script.processes
https://www.googleapis.com/auth/script.deployments
https://www.googleapis.com/auth/script.metrics
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.metadata.readonly
npm run dev
npm test
npm run build
❌ Google認証に失敗しました: invalid_client
解決方法:
❌ 暗号化エラー: invalid key length
解決方法:
openssl rand -hex 32
❌ プロパティ取得エラー: permission denied
解決方法:
script.projects
が含まれているか確認MIT License - 詳細は LICENSE ファイルを参照
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)問題が発生した場合は、Issuesを作成してください。
🔒 Security First - Google Apps Script MCP Server
Performs gene set enrichment analysis using the Enrichr API, supporting all available gene set libraries.
Enables persistent memory for Claude using a local knowledge graph of entities, relations, and observations.
An intelligent robot control middleware for natural language interaction with industrial robots, powered by LLMs. It integrates with Universal Robots and supports real-time, multi-robot control.
Search and access Python package metadata, version history, and download statistics from the PyPI repository.
A secure command-line interface server for the Model Context Protocol (MCP) that allows AI models to interact with a user's terminal.
Integration with QA Sphere test management system, enabling LLMs to discover, summarize, and interact with test cases directly from AI-powered IDEs
A comprehensive toolkit for AI-driven development, offering file system operations, code analysis, execution, web searching, and system information retrieval.
Set up and interact with your unstructured data processing workflows in Unstructured Platform
An MCP server for Nextflow development and testing, which requires a local clone of the Nextflow Git repository.
Manage secrets and environment variables with Infisical's official MCP server.