Skip to content

tanaikech/ToolsForMCPServer-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License

ToolsForMCPServer-extension (ToolsForMCPServer as Gemini Extension)

The name of this MCP server is tools-for-mcp-server-extension. The base MCP server is from https://github.com/tanaikech/ToolsForMCPServer.

Description

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.

How to install ToolsForMCPServer-extension

1. Install Gemini CLI and default settings

1. Install Gemini CLI

npm install -g @google/gemini-cli

2. Authorization

You can see how to authorize at https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#-authentication-options.

2. Copy a Google Apps Script project

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.

3. Deploy Web Apps

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:

  1. In the script editor, at the top right, click Deploy -> New deployment.
  2. Click Select type -> Web App.
  3. Enter a description for the Web App in the fields under Deployment configuration.
  4. Select "Me" for "Execute as". This is crucial, as it allows the script to run with your permissions to access your Google services.
  5. Select "Anyone" for "Who has access". This makes the URL callable from the internet. Access is controlled by the unguessable URL and the accessKey defined in the script.
  6. Click Deploy.
  7. 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.

4. Environmental variables

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.

5. Install Gemini extension

Run the following command on the terminal.

gemini extensions install https://github.com/tanaikech/ToolsForMCPServer-extension

6. Testing

Run the following command on the terminal.

gemini

When the Gemini CLI is opened, run the following command.

/mcp

When you can see the tools from the MCP server, the setup was finished.

Sample prompts

The sample prompts using the tools of this MCP server are as follows.


Licence

MIT

Author

Tanaike

Donate

Update History

  • v1.0.0 (October 15, 2025)

    1. Initial release.
  • v1.1.0 (October 31, 2025)

    1. timeout was added to gemini-extension.json.
  • v1.2.0 (November 14, 2025)

    1. 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.
      
    2. 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

TOP