Skip to main content
Glama
mcp-google-sheets-server

mcp-google-sheets-server

by Longtran2404

πŸš€ MCP Google Sheets Server v2.2.1

Official TaskKit MCP Server for Google Sheets - 37 tools for sheet management, formatting, charts, and automation.

This is an official open-source package in the TaskKit ecosystem, maintained by TrαΊ§n Minh Long.

TaskKit open-source catalog Β· npm Β· GitHub

Version 2.2.1 aligns the package with TaskKit's canonical identity and updates the MCP and Google API dependencies to patched supported releases.

Runtime requirement: Node.js 20 or newer.

npm version npm downloads License: MIT TypeScript


✨ Complete Sheet Management & Enhanced Charts

  • πŸ“‹ Complete Sheet Management - Create, rename, hide/show, move, duplicate, delete sheets

  • πŸ“Š Advanced Chart Creation - Create charts with data, from tables, update chart data

  • πŸ” Sheet Information - Get detailed sheet properties, list all sheets

  • 🎨 Professional Formatting - Colors, fonts, borders, conditional formatting

  • πŸ”’ Data Protection - Validation rules, range protection, access control

  • ⚑ Performance Optimized - Batch operations, efficient API usage

  • πŸš€ Enterprise Ready - 37 tools for professional Google Sheets management


Related MCP server: MCP Server - Google Workspace

πŸš€ Quick Installation

Install Node.js 20 or newer before using the package.

npm install -g mcp-google-sheets-server

Method 2: Local installation

npm install mcp-google-sheets-server

Method 3: Use npx (No installation needed)

npx mcp-google-sheets-server

πŸ” Google Service Account Authentication

Detailed Guide

See the Google Service Account setup guide for step-by-step instructions on how to get a Google Service Account key.

Quick Configuration

{
  "mcpServers": {
    "mcp-google-sheets": {
      "command": "npx",
      "args": ["mcp-google-sheets-server"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_KEY": "your-service-account-json"
      }
    }
  }
}

πŸ“‹ Complete Tool Collection (37 Tools)

πŸ”§ Basic Operations

Tool

Description

Parameters

sheets_get_data

Get data with formatting options

spreadsheetId, range, valueRenderOption, dateTimeRenderOption

sheets_update_data

Update data with input options

spreadsheetId, range, values, valueInputOption

sheets_create

Create spreadsheet with theme

title, initialData, theme

🎨 Advanced Formatting

Tool

Description

Parameters

sheets_format_cells

Apply professional formatting

spreadsheetId, range, backgroundColor, textColor, fontSize, bold, italic, alignment, borders

sheets_conditional_formatting

Set conditional rules

spreadsheetId, range, ruleType, value, colors

sheets_merge_cells

Merge cells with options

spreadsheetId, range, mergeType

πŸ“ˆ Enhanced Charts & Visualization

Tool

Description

Parameters

sheets_create_chart

Create basic charts

spreadsheetId, chartType, dataRange, title, position

sheets_create_chart_with_data

Create charts with data

spreadsheetId, chartType, dataRange, title, position, chartOptions

sheets_create_chart_from_table

Create charts from tables

spreadsheetId, chartType, tableRange, title, useFirstRowAsLabels

sheets_update_chart

Update existing charts

spreadsheetId, chartId, title, dataRange

sheets_update_chart_data

Update chart data

spreadsheetId, chartId, newDataRange, updateTitle

sheets_delete_chart

Delete charts

spreadsheetId, chartId

sheets_list_charts

List all charts

spreadsheetId

πŸ“‹ Complete Sheet Management

Tool

Description

Parameters

sheets_create_sheet

Create new sheets

spreadsheetId, title, index

sheets_duplicate_sheet

Duplicate existing sheets

spreadsheetId, sheetId, newTitle

sheets_delete_sheet

Delete sheets

spreadsheetId, sheetId

sheets_rename_sheet

Rename sheets

spreadsheetId, sheetId, newTitle

sheets_hide_sheet

Hide sheets from view

spreadsheetId, sheetId

sheets_show_sheet

Show hidden sheets

spreadsheetId, sheetId

sheets_move_sheet

Move sheets to new position

spreadsheetId, sheetId, newIndex

sheets_get_sheet_info

Get all sheet information

spreadsheetId, includeGridData

sheets_get_sheet_properties

Get specific sheet properties

spreadsheetId, sheetId

πŸ”’ Data Validation & Protection

Tool

Description

Parameters

sheets_set_data_validation

Set validation rules

spreadsheetId, range, ruleType, values, message

sheets_protect_range

Protect ranges from editing

spreadsheetId, range, description, warningOnly

πŸ“Š Advanced Data Operations

Tool

Description

Parameters

sheets_insert_rows

Insert rows at position

spreadsheetId, sheetId, startIndex, endIndex

sheets_insert_columns

Insert columns at position

spreadsheetId, sheetId, startIndex, endIndex

sheets_delete_rows

Delete rows from position

spreadsheetId, sheetId, startIndex, endIndex

sheets_delete_columns

Delete columns from position

spreadsheetId, sheetId, startIndex, endIndex

πŸ“ Formula & Calculation

Tool

Description

Parameters

sheets_set_formula

Set formulas in cells

spreadsheetId, range, formulas

sheets_calculate_formula

Calculate formula results

spreadsheetId, formula

⚑ Batch Operations

Tool

Description

Parameters

sheets_batch_update

Multiple operations in one request

spreadsheetId, requests

sheets_batch_get

Get data from multiple ranges

spreadsheetId, ranges, valueRenderOption

πŸ” Search & Sharing

Tool

Description

Parameters

sheets_search

Search spreadsheets

query, maxResults

sheets_share

Share with permissions

spreadsheetId, email, role, message

sheets_get_metadata

Get comprehensive metadata

spreadsheetId, includeGridData

🧹 Utility Operations

Tool

Description

Parameters

sheets_clear_range

Clear content and formatting

spreadsheetId, range

sheets_copy_to

Copy sheets between spreadsheets

spreadsheetId, sheetId, destinationSpreadsheetId


πŸ› οΈ Advanced Setup Examples

Create Professional Spreadsheet with Multiple Sheets

{
  "mcpServers": {
    "mcp-google-sheets": {
      "command": "npx",
      "args": ["mcp-google-sheets-server"],
      "env": {
        "GOOGLE_SERVICE_ACCOUNT_KEY": "your-service-account-json"
      }
    }
  }
}

πŸ“š Advanced Usage Examples

Complete Sheet Management Workflow

// 1. Create spreadsheet
const spreadsheet = await mcp.callTool("sheets_create", {
  title: "Business Dashboard 2024",
  theme: "LIGHT",
});

// 2. Create multiple sheets
await mcp.callTool("sheets_create_sheet", {
  spreadsheetId: spreadsheet.spreadsheetId,
  title: "Sales Data",
  index: 1,
});

await mcp.callTool("sheets_create_sheet", {
  spreadsheetId: spreadsheet.spreadsheetId,
  title: "Charts",
  index: 2,
});

// 3. Add data to Sales Data sheet
await mcp.callTool("sheets_update_data", {
  spreadsheetId: spreadsheet.spreadsheetId,
  range: "Sales Data!A1:D6",
  values: [
    ["Month", "Revenue", "Expenses", "Profit"],
    ["January", 50000, 30000, 20000],
    ["February", 55000, 32000, 23000],
    ["March", 60000, 35000, 25000],
    ["April", 65000, 38000, 27000],
    ["May", 70000, 40000, 30000],
  ],
});

// 4. Create professional chart
await mcp.callTool("sheets_create_chart_from_table", {
  spreadsheetId: spreadsheet.spreadsheetId,
  chartType: "COLUMN",
  tableRange: "Sales Data!A1:D6",
  title: "Monthly Financial Performance",
  useFirstRowAsLabels: true,
});

// 5. Rename and organize sheets
await mcp.callTool("sheets_rename_sheet", {
  spreadsheetId: spreadsheet.spreadsheetId,
  sheetId: 0, // First sheet
  newTitle: "Summary",
});

// 6. Move Charts sheet to the end
await mcp.callTool("sheets_move_sheet", {
  spreadsheetId: spreadsheet.spreadsheetId,
  sheetId: 2, // Charts sheet
  newIndex: 3, // Move to end
});

// 7. Hide a temporary sheet if needed
await mcp.callTool("sheets_hide_sheet", {
  spreadsheetId: spreadsheet.spreadsheetId,
  sheetId: 1, // Hide Sales Data sheet
});

Advanced Chart Management

// Create chart with custom options
await mcp.callTool("sheets_create_chart_with_data", {
  spreadsheetId: "your-spreadsheet-id",
  chartType: "LINE",
  dataRange: "A1:C10",
  title: "Trend Analysis",
  chartOptions: {
    colors: ["#4285F4", "#34A853"],
    legendPosition: "RIGHT_LEGEND",
  },
});

// Update chart data when source data changes
await mcp.callTool("sheets_update_chart_data", {
  spreadsheetId: "your-spreadsheet-id",
  chartId: 12345,
  newDataRange: "A1:C15", // Extended range
  updateTitle: "Updated Trend Analysis",
});

// List all charts in spreadsheet
const charts = await mcp.callTool("sheets_list_charts", {
  spreadsheetId: "your-spreadsheet-id",
});

// Delete unwanted charts
await mcp.callTool("sheets_delete_chart", {
  spreadsheetId: "your-spreadsheet-id",
  chartId: 12345,
});

Sheet Information and Properties

// Get information about all sheets
const sheetInfo = await mcp.callTool("sheets_get_sheet_info", {
  spreadsheetId: "your-spreadsheet-id",
  includeGridData: false,
});

// Get properties of specific sheet
const sheetProps = await mcp.callTool("sheets_get_sheet_properties", {
  spreadsheetId: "your-spreadsheet-id",
  sheetId: 0,
});

// Check if sheet is hidden
if (sheetProps.properties.hidden) {
  // Show the sheet
  await mcp.callTool("sheets_show_sheet", {
    spreadsheetId: "your-spreadsheet-id",
    sheetId: 0,
  });
}

πŸ”§ Troubleshooting

Common errors:

Error

Solution

"GOOGLE_SERVICE_ACCOUNT_KEY not found"

β€’ Check environment variable in mcp.jsonβ€’ Ensure JSON is properly escaped

"Permission denied"

β€’ Check service account access permissionsβ€’ Ensure Google Sheets are shared with service account

"Invalid credentials"

β€’ Check service account JSON fileβ€’ Ensure Google Sheets API is enabled


πŸš€ Advantages Over Other Solutions

  • βœ… 37 Advanced Tools - Complete Google Sheets MCP tool collection

  • βœ… Complete Sheet Management - Full control over sheets (create, rename, hide, move, delete)

  • βœ… Enhanced Chart Creation - Create charts with data, from tables, update dynamically

  • βœ… Professional Formatting - Colors, fonts, borders, conditional formatting

  • βœ… Data Validation - Set rules and protect sensitive data

  • βœ… Batch Operations - High-performance multiple operations

  • βœ… Sheet Information - Get detailed properties and status of all sheets

  • βœ… Performance Optimized - Efficient API usage and batch processing


πŸ“„ License

MIT License - See LICENSE file for details.


🀝 Contributing

All contributions are welcome! Please:

  1. 🍴 Fork the project

  2. 🌿 Create a feature branch (git checkout -b feature/AmazingFeature)

  3. πŸ’Ύ Commit your changes (git commit -m 'Add some AmazingFeature')

  4. πŸš€ Push to the branch (git push origin feature/AmazingFeature)

  5. πŸ”„ Open a Pull Request


πŸ“ž Support

If you encounter issues:

  1. πŸ” Check Issues first

  2. πŸ†• Create a new issue if none exists

  3. πŸ“ Describe the problem in detail and how to reproduce it

  4. 🌐 TaskKit: Official open-source catalog


⭐ Star the Project

If this project is helpful, please give it a star! ⭐


Made with ❀️ by Longtran2404

Founder profile: TrαΊ§n Minh Long

πŸš€ 37 Tools for Complete Google Sheets Management πŸš€

Available Tools

37 tools
sheets_batch_getA

Get data from multiple ranges in a single request

Inputs: ranges (required), spreadsheetId (required), valueRenderOption.

sheets_batch_updateC

Perform multiple operations in a single request for better performance

Inputs: requests (required), spreadsheetId (required).

sheets_calculate_formulaC

Calculate the result of a formula

Inputs: formula (required), spreadsheetId (required).

sheets_clear_rangeA

Clear content and formatting from a range

Inputs: range (required), spreadsheetId (required).

sheets_conditional_formattingB

Apply conditional formatting rules to cells

Inputs: range (required), ruleType (required), spreadsheetId (required), value, +2 more.

sheets_copy_toA

Copy a sheet to another spreadsheet

Inputs: sheetId (required), spreadsheetId (required), destinationSpreadsheetId (required).

sheets_createC

Create a new Google Sheets with optional initial data and formatting

Inputs: title (required), theme, initialData.

sheets_create_chartB

Create various types of charts in Google Sheets

Inputs: chartType (required), dataRange (required), spreadsheetId (required), title, +1 more.

sheets_create_chart_from_tableB

Create a chart from a table structure with headers and data

Inputs: chartType (required), tableRange (required), spreadsheetId (required), title, +2 more.

sheets_create_chart_with_dataC

Create a chart with data and automatically populate it

Inputs: chartType (required), dataRange (required), spreadsheetId (required), title, +2 more.

sheets_create_sheetC

Create a new sheet in the spreadsheet

Inputs: title (required), spreadsheetId (required), index.

sheets_delete_chartB

Delete a chart from the spreadsheet

Inputs: chartId (required), spreadsheetId (required).

sheets_delete_columnsA

Delete columns from a specific position

Inputs: sheetId (required), startIndex (required), spreadsheetId (required), endIndex.

sheets_delete_rowsC

Delete rows from a specific position

Inputs: sheetId (required), startIndex (required), spreadsheetId (required), endIndex.

sheets_delete_sheetC

Delete a sheet from the spreadsheet

Inputs: sheetId (required), spreadsheetId (required).

sheets_duplicate_sheetC

Duplicate an existing sheet

Inputs: sheetId (required), spreadsheetId (required), newTitle.

sheets_format_cellsB

Apply formatting to cells including colors, fonts, borders, and alignment

Inputs: range (required), spreadsheetId (required), bold, italic, +6 more.

sheets_get_dataB

Get data from Google Sheets with optional formatting

Inputs: range (required), spreadsheetId (required), valueRenderOption, dateTimeRenderOption.

sheets_get_metadataB

Get comprehensive metadata about Google Sheets

Inputs: spreadsheetId (required), includeGridData.

sheets_get_sheet_infoC

Get detailed information about all sheets in a spreadsheet

Inputs: spreadsheetId (required), includeGridData.

sheets_get_sheet_propertiesC

Get properties of a specific sheet (title, index, hidden status, etc.)

Inputs: sheetId (required), spreadsheetId (required).

sheets_hide_sheetB

Hide a sheet from view (make it invisible)

Inputs: sheetId (required), spreadsheetId (required).

sheets_insert_columnsC

Insert columns at a specific position

Inputs: sheetId (required), startIndex (required), spreadsheetId (required), endIndex.

sheets_insert_rowsB

Insert rows at a specific position

Inputs: sheetId (required), startIndex (required), spreadsheetId (required), endIndex.

sheets_list_chartsA

List all charts in a spreadsheet with their details

Inputs: spreadsheetId (required).

sheets_merge_cellsC

Merge cells in a range

Inputs: range (required), spreadsheetId (required), mergeType.

sheets_move_sheetA

Move a sheet to a different position in the spreadsheet

Inputs: sheetId (required), newIndex (required), spreadsheetId (required).

sheets_protect_rangeB

Protect a range of cells from editing

Inputs: range (required), spreadsheetId (required), description, warningOnly.

sheets_rename_sheetC

Rename an existing sheet

Inputs: sheetId (required), newTitle (required), spreadsheetId (required).

sheets_set_data_validationC

Set data validation rules for cells

Inputs: range (required), ruleType (required), spreadsheetId (required), values, +1 more.

sheets_set_formulaB

Set formulas in cells

Inputs: range (required), formulas (required), spreadsheetId (required).

sheets_shareB

Share Google Sheets with specific permissions

Inputs: email (required), spreadsheetId (required), role, message.

sheets_show_sheetA

Show a hidden sheet (make it visible again)

Inputs: sheetId (required), spreadsheetId (required).

sheets_update_chartC

Update an existing chart in Google Sheets

Inputs: chartId (required), spreadsheetId (required), title, dataRange.

sheets_update_chart_dataC

Update chart data and refresh the chart

Inputs: chartId (required), newDataRange (required), spreadsheetId (required), updateTitle.

sheets_update_dataC

Update data in Google Sheets with optional formatting

Inputs: range (required), values (required), spreadsheetId (required), valueInputOption.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 37 tools

    Disambiguation2/5

    Several tools have overlapping purposes: three chart creation tools, update_chart vs update_chart_data, and get_metadata vs get_sheet_info/get_sheet_properties are hard to distinguish without deep inspection. This creates ambiguity for an agent selecting the right tool.

    Naming Consistency4/5

    Tool names mostly follow a consistent sheets_verb_noun snake_case pattern. Minor inconsistencies like 'conditional_formatting' instead of a verb-based name and varied chart-creation forms prevent a perfect score.

    Tool Count2/5

    With 37 tools, the server is well beyond the typical comfortable range and feels heavy. Many tools are slight variations of the same operation, making the large count harder to justify.

    Completeness4/5

    The tool surface covers spreadsheets, sheets, charts, formatting, data validation, and protection comprehensively. Only minor gaps like deleting/copying a spreadsheet or appending rows keep it from being fully complete.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers