Consolidating-Generative-AI-Protocols-A-Single -Solution-for -and-A2A
A new unified Google Apps Script now deploys both Model Context Protocol (MCP) and Agent2Agent (A2A) networks as a single server, streamlining AI model integration for Google Workspace users.
claude mcp add --transport stdio tanaikech-consolidating-generative-ai-protocols-a-single-server-solution-for-mcp-and-a2a npx mcp-remote https://script.google.com/macros/s/###/exec?accessKey=sample
How to use
This MCP server consolidates both MCP (Model Context Protocol) and A2A (Agent2Agent) functionality into a single Google Apps Script Web App server. Clients (such as MCP-compatible desktop clients and A2A SDKs) can connect to the unified server URL and perform MCP and A2A actions through HTTP GET/POST requests. The included example demonstrates how Claude Desktop can connect to the MCP portion via an npx-based remote server configuration, while the A2A workflow can be exercised through the A2A client ecosystem using the shared backend. The server is designed to share common utilities between MCP and A2A, reducing duplication and simplifying integration for Google Workspace users.
How to install
Prerequisites:
- A Google account with access to Google Drive and Apps Script
- Basic familiarity with Google Apps Script Web Apps deployment
Steps:
- Prepare API access: Obtain or generate the Gemini API key as needed for your environment.
- Copy the demo or source script into Apps Script:
- Open Google Apps Script in your Google Drive, create a new project or copy from the repository if provided.
- Deploy as a Web App:
- In the Apps Script editor, click Deploy → New deployment.
- Choose Web App as the deployment type.
- Set Execute as: Me
- Set Who has access: Anyone
- Deploy and note the Web App URL (https://script.google.com/macros/s/XXXXXXXX/exec).
- Configure the server URL for MCP/A2A clients:
- Use the Web App URL as the server address in MCP/A2A client configurations.
- Optional: Update copied script with your apiKey and the correct Web App URL in the agent configuration (as described in the repository’s instructions).
- Test connections from MCP and A2A clients to verify the unified server is handling both MCP and A2A requests.
Additional notes
Tips and considerations:
- When you modify the Google Apps Script, redeploy as a new version to ensure changes are reflected.
- For MCP client setups, the server is typically referenced via npx mcp-remote <server-url> to route MCP requests to the Web App.
- For A2A integrations, ensure any required authentication tokens or accessKey query parameters are included as described in the repository (example: accessKey=sample).
- If you encounter CORS or redirect-related issues in A2A client testing, prefer the Google Apps Script Web App URL and ensure redirects are supported by your client environment.
- Maintain proper API key handling; avoid exposing keys in client-side code or publicly accessible configurations.
Related MCP Servers
desktop
Agentify Desktop lets Codex/Claude/OpenCode control your logged-in ChatGPT, Claude, AiStudio, Gemini, Grok, Perplexity web sessions via MCP, parallel hidden/visible tabs, file upload + image download
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.
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.
ToolsForMCPServer-extension
Simplified Google Workspace Automation with Gemini CLI Extensions
xcatcher -manifest
Agent-first Remote MCP for X (Twitter) batch crawling with x402 USDC top-up (Base/Solana). Includes OpenAPI + copy-paste ADK/curl E2E examples.