MCPApp
This text introduces the Model Context Protocol (MCP) for AI interaction, exploring Google Apps Script (GAS) as a server option. It shows feasibility with a sample but notes the lack of a GAS SDK, aiming to encourage understanding and development.
claude mcp add --transport stdio tanaikech-mcpapp node path/to/MCPApp.js \ --env LOCK_SERVICE="enabled by default; set to false to disable (see README for details)"
How to use
MCPApp is an MCP server implemented with Google Apps Script to serve as a universal adapter between AI models and external data or services. It is designed to work with the MCP ecosystem, including clients like the Gemini CLI, enabling models to request contextually relevant information from configured sources. By default, the server leverages a LockService to coordinate access and ensure secure, serialized operations, which is particularly important when multiple clients may issue concurrent requests. When integrating with Gemini CLI or other MCP clients, you can point them at the MCPApp instance to begin requesting and receiving contextual data in a standardized MCP format. The server is designed to be extendable as a library as well, allowing developers to incorporate MCPApp as part of larger Google Apps Script projects or libraries. You can selectively enable or disable the LockService if you require higher throughput for asynchronous requests, but you should do so with caution to avoid race conditions.
How to install
Prerequisites:
- Access to Google Apps Script environment or a Google account to deploy and run Apps Script projects.
- Basic familiarity with deploying Apps Script projects as libraries or web apps.
Installation steps:
- Create a new Google Apps Script project or open an existing one where you want to host the MCPApp server.
- Add the MCPApp library or code as a script file in the project. If you have a library version, add it via the Libraries feature in Apps Script and insert the required initialization code in your project.
- Configure deployment:
- Deploy as a Web App if you want HTTP endpoints for MCP requests, or
- Use as a Library within another Apps Script project to reuse the MCPApp functionality.
- Configure access and environment variables as needed (e.g., enabling/disabling LockService, setting any API keys for underlying data sources).
Notes:
- Since MCPApp is based on Google Apps Script, there is no Node.js, Python, or Docker installation required for running the server in the intended environment. The deployment steps focus on Apps Script configuration and deployment.
- If you are integrating with Gemini CLI or other MCP clients, ensure the client is configured to target the deployed Apps Script endpoints and that any required authentication or access tokens are provided.
Additional notes
Tips and common considerations:
- By default, LockService is enabled to serialize access. To disable, modify the initialization to pass lock: false, but be mindful of a maximum of 30 concurrent asynchronous requests when running without LockService.
- Keep the MCPApp library up to date with the latest MCP protocol changes to maintain compatibility with Gemini CLI and other MCP clients.
- If you encounter deployment or permissions errors in Apps Script, verify that the script has the necessary scopes and that the deployment target (web app or library) is properly configured.
- When debugging, log MCP requests and responses to help trace integration issues with clients.
- Since this server is designed to act as a universal adapter, it's common to configure multiple data sources and contextual sources. Document each source’s endpoint, required authentication, and data format in your project for maintainability.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
mcp
🤖 Taskade MCP · Official MCP server and OpenAPI to MCP codegen. Build AI agent tools from any OpenAPI API and connect to Claude, Cursor, and more.
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
ToolsForMCPServer
The Gemini CLI confirmed that the MCP server built with Google Apps Script (GAS), a low-code platform, offers immense possibilities. If you've created snippets for GAS, these could be revitalized and/or leveraged in new ways by using them as the MCP server. The Gemini CLI and other MCP clients will be useful in achieving this.
mcp-arr
MCP server for *arr media management suite
crawlbase
Crawlbase MCP Server connects AI agents and LLMs with real-time web data. It powers Claude, Cursor, and Windsurf integrations with battle-tested web scraping, JavaScript rendering, and anti-bot protection enabling structured, live data inside your AI workflows.