The name of this MCP server is tools-for-mcp-server-extension. The base MCP server is from https://github.com/tanaikech/ToolsForMCPServer.
The Gemini CLI is continually advancing, and Gemini CLI extensions have recently been released. Ref These extensions allow for the automatic installation of custom commands, MCP servers, and more through a simple command. I thought this extension could be useful for my MCP server tool, ToolsForMCPServer. This repository allows ToolsForMCPServer to be installed via the Gemini CLI extensions.
1. Install Gemini CLI
npm install -g @google/gemini-cli2. Authorization
You can see how to authorize at https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#-authentication-options.
After you log in to your Google account, access the following URL using your browser. And, copy the project by clicking the copy button at the top right.
https://script.google.com/home/projects/1Qm9LgtuQLxDzdLUoJPrOEpmyTBivZZsCLiSUC7q-D3Gi4fISvxgcITWb
By this, the copied Google Apps Script project is automatically opened.
To allow the Gemini CLI to communicate with our script, we must deploy it as a Web App. This creates a unique URL that acts as our MCP server endpoint.
You can find detailed information in the official documentation.
Please follow these steps to deploy the Web App in the script editor:
- In the script editor, at the top right, click Deploy -> New deployment.
- Click Select type -> Web App.
- Enter a description for the Web App in the fields under Deployment configuration.
- Select "Me" for "Execute as". This is crucial, as it allows the script to run with your permissions to access your Google services.
- Select "Anyone" for "Who has access". This makes the URL callable from the internet. Access is controlled by the unguessable URL and the
accessKeydefined in the script. - Click Deploy.
- After authorizing the necessary scopes, copy the Web app URL. It will look similar to
https://script.google.com/macros/s/###/exec. This is your MCP server endpoint.
Important: When you modify the Apps Script code, you must create a new deployment version to publish the changes. Click Deploy > Manage deployments, select your active deployment, click the pencil icon, and choose "New version" from the Version dropdown. More info here.
This MCP server uses the following 2 environmental variables. Please set them.
API key for using Gemini API. (This variable might have already been set for using Gemini CLI and Gemini API, depending on the environment.)
export GEMINI_API_KEY="{Your API key}"Web Apps URL retrieved from the above section.
export MCP_WEB_APPS_URL="https://script.google.com/macros/s/###/exec?accessKey=sample"Here, sample of accessKey=sample is from new MCPApp.mcpApp({ accessKey: "sample" }) in the Google Apps Script "ToolsForMCPServer_project". When you want to modify the access key, please modify both. And, deploy the Web Apps again to reflect the latest script.
For example, these variables can be set to a file .bashrc or .bash_profile for bash.
Run the following command on the terminal.
gemini extensions install https://github.com/tanaikech/ToolsForMCPServer-extensionRun the following command on the terminal.
geminiWhen the Gemini CLI is opened, run the following command.
/mcp
When you can see the tools from the MCP server, the setup was finished.
The sample prompts using the tools of this MCP server are as follows.
- Gemini CLI with MCP Server: Expanding Possibilities with Google Apps Script
- Gemini CLI: Featuring an Enhanced ToolsForMCPServer
- Next-Level Data Automation: Gemini CLI, Google Sheets, and MCP
- Managing Google Docs, Sheets, and Slides by Natural Language with Gemini CLI and MCP
- Next-Level Data Automation: Gemini CLI, Google Calendar, and MCP
- Enhanced Guide to Using Prompts in Gemini CLI
- Next-Level Classroom Automation: Gemini CLI, Google Classroom, and MCP
- Unifying Google Workspace with Natural Language: Integrated Collaboration through Gemini CLI and MCP
- Streamlining Web Page Insights with Natural Language using Gemini CLI, Google Analytics, and MCP
- Google Maps with Natural Language: Integrated Collaboration through Gemini CLI and MCP
- Streamlining Content Creation: A Guide to Using Gemini CLI, MCP Server, and VSCode
- From Data Silos to Unified RAG: Gemini CLI Extensions Unify Local and Google Workspace for a Powerful File Search
-
v1.0.0 (October 15, 2025)
- Initial release.
-
v1.1.0 (October 31, 2025)
timeoutwas added togemini-extension.json.
-
v1.2.0 (November 14, 2025)
-
The MCP server "workspace-developer" was removed. This was necessary because updating the Gemini CLI to v0.15.0 or v0.17.0-nightly.20251114.0fcbff506 caused the following errors:
✕ Error discovering tools from workspace-developer: can't resolve reference #/$defs/SearchResult from id # ✕ Error during discovery for server 'workspace-developer': No prompts or tools found on the server. -
The following 11 tools for managing File Search were added. The underlying script for these tools was created using Google Apps Script. Ref
- file_search_gas_create
- file_search_gas_documents_get
- file_search_gas_documents_list
- file_search_gas_documents_query
- file_search_gas_documents_remove
- file_search_gas_generate_content
- file_search_gas_get
- file_search_gas_import_file
- file_search_gas_list
- file_search_gas_media_upload
- file_search_gas_remove
-