Google Sheets MCP Server for Cloudflare Workers
Get started with Google Sheets in your AI application. Choose your preferred language below.
npm install primrose-mcp
Sign up and create an API key in your dashboard
Use listTools() to discover Google Sheets tools and callTool() to execute them
import { Primrose } from 'primrose-mcp';
// Initialize the client
const primrose = new Primrose({
apiKey: 'prm_xxxxx',
provider: 'anthropic' // or: openai, google, amazon, meta, mistral
});
// List available Google Sheets tools
const tools = await primrose.listTools({ mcpServer: 'googlesheets' });
console.log(tools);
// Call a Google Sheets tool
const result = await primrose.callTool('googlesheets_googlesheets_add_basic_chart', {
title: 'your-value',
sheetId: 'your-value',
headerCount: 'your-value',
widthPixels: 'your-value',
heightPixels: 'your-value',
seriesRanges: 'your-value',
spreadsheetId: 'your-value',
anchorRowIndex: 'your-value',
anchorColumnIndex: 'your-value'
});
console.log(result);This server uses API KEY authentication.
View Full Auth Guide