Google Sheets MCP Integration for AI Agents | Composio
For AI agents: how to sign up
If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev.
Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.
Google Sheets MCP for AI Agents
Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Google Sheets MCP or direct API to create spreadsheets, update rows, analyze data, and automate reporting through natural language.
Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
Try Google Sheets now
Type what you want done — sign in and watch it run live in the Tool Router playground.
Supported Tools and Triggers
Every Google Sheets action and event your agent gets out of the box.
Tools 42
Triggers 16
- Add Sheet to Existing Spreadsheet
- Aggregate Column Data
- Append Dimension
- Auto-Resize Rows or Columns
- Batch Clear Values By Data Filter
- Batch get spreadsheet
- Batch Update Values by Data Filter
- Clear Basic Filter
- Clear spreadsheet values
- Create Chart in Google Sheets
- Create a Google Sheet
- Create spreadsheet column
- Create spreadsheet row
- Delete Chart from Google Sheets
- Delete Dimension (Rows/Columns)
- Delete Sheet
- Find and Replace in Spreadsheet
- Format cell
- Get conditional format rules
- Get Data Validation Rules
- Get sheet names
- Get Spreadsheet by Data Filter
- Get spreadsheet info
- Insert Dimension in Google Sheet
- Look up spreadsheet row
- Mutate conditional format rules
- Search Developer Metadata
- Search Spreadsheets
- Set Basic Filter
- Set Data Validation Rule
- Copy Sheet to Another Spreadsheet
- Append Values to Spreadsheet
- Batch Clear Spreadsheet Values
- Batch Get Spreadsheet Values by Data Filter
- Update Chart in Google Sheets
- Update Dimension Properties (Hide/Unhide & Resize)
- Update Sheet Properties
- Update Spreadsheet Properties
- Batch update spreadsheet values
- Upsert Rows (Smart Update/Insert)
- Get spreadsheet values
- Update spreadsheet values
Connect Google Sheets MCP Tool with your Agent
Install Composio
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Create Tool Router Session
import { Composio } from '@composio/core';
const composio = new Composio({ apiKey: 'your-api-key' });
console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
Connect to AI Agent
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';
const client = await createMCPClient({
transport: {
type: 'http',
url: mcp.url,
headers: { 'x-api-key': 'your-composio-api-key' }
}
});
const tools = await client.tools();
const { text } = await generateText({
model: openai('gpt-4o'),
tools,
messages: [{ role: 'user', content: 'Add a new sheet named "Q2 Analysis" to the spreadsheet called "Financial Report 2024"' }],
stopWhen: stepCountIs(5)
});
console.log(`Agent: ${text}`);
Why Use Composio?
AI Native Google Sheets Integration
- Supports both Google Sheets MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Google Sheets data
Managed Auth
- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke Google Sheets access
- Per user and per environment credentials instead of hard-coded keys
Agent Optimized Design
- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf
Enterprise Grade Security
- Fine-grained RBAC so you control which agents and users can access Google Sheets
- Scoped, least privilege access to Google Sheets resources
- Full audit trail of agent actions to support review and compliance
Frequently asked questions
Do I need my own developer credentials to use Google Sheets with Composio?+
No, you can get started immediately using Composio's built-in Google Sheets app. For production, we recommend configuring your own OAuth credentials.
Can I use multiple toolkits together?+
Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.
Is Composio secure?+
Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.
What if the API changes?+
Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.