MCP Google Sheets Server

MCP Google Sheets Server

Enables reading, writing, and managing Google Sheets documents with support for batch operations, formatting, charts, and conditional formatting through the Model Context Protocol.

Category
Visit Server

README

GoogleSheetsMCP - AgenticLedger Platform

Google Sheets MCP Server

TypeScript Node.js License: MIT Google Sheets API

Production-ready MCP server providing comprehensive Google Sheets integration for the AgenticLedger AI Agent Platform.

🚀 Features

  • 26 Production-Ready Tools - Complete CRUD operations, formatting, charts, sheet management
  • Service Account Authentication - Persistent, shareable credentials
  • Batch Operations - 50-70% faster than sequential operations
  • Advanced Formatting - Colors, fonts, borders, conditional formatting, cell merging
  • Chart Creation - LINE, BAR, COLUMN, PIE, SCATTER, AREA, COMBO charts
  • Type-Safe - Full TypeScript with Zod schema validation
  • 100% Documented - Comprehensive guides for developers and AI agents

📦 Quick Start

Installation

# Clone repository
git clone https://github.com/oregpt/Agenticledger_MCP_SheetsOnly.git
cd Agenticledger_MCP_SheetsOnly

# Install dependencies
npm install

# Build
npm run build

Authentication Setup

  1. Create Google Cloud Project (see GOOGLE_CLOUD_SETUP.md)
  2. Enable Google Sheets API
  3. Create Service Account and download JSON key
  4. Configure environment:
# Create .env file
cp .env.example .env

# Edit .env with your credentials
GOOGLE_PROJECT_ID=your-project-id
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
TEST_SPREADSHEET_ID=your-test-spreadsheet-id
  1. Share spreadsheets with service account email (from JSON key)

Run Tests

npm run test:integration

🛠️ Available Tools (26)

<details> <summary><b>Reading Data (4 tools)</b></summary>

  • sheets_check_access - Verify spreadsheet access
  • sheets_get_values - Read cell values from range
  • sheets_batch_get_values - Read multiple ranges at once
  • sheets_get_metadata - Get spreadsheet metadata

</details>

<details> <summary><b>Writing Data (5 tools)</b></summary>

  • sheets_update_values - Update cell values
  • sheets_batch_update_values - Update multiple ranges
  • sheets_append_values - Append rows to table
  • sheets_clear_values - Clear cell contents
  • sheets_insert_rows - Insert rows at position

</details>

<details> <summary><b>Sheet Management (6 tools)</b></summary>

  • sheets_insert_sheet - Create new sheet
  • sheets_delete_sheet - Delete sheet
  • sheets_duplicate_sheet - Duplicate sheet
  • sheets_copy_to - Copy sheet to another spreadsheet
  • sheets_update_sheet_properties - Update sheet properties
  • sheets_batch_delete_sheets - Delete multiple sheets

</details>

<details> <summary><b>Formatting (6 tools)</b></summary>

  • sheets_format_cells - Apply cell formatting
  • sheets_batch_format_cells - Format multiple ranges
  • sheets_update_borders - Add/modify borders
  • sheets_merge_cells - Merge cells
  • sheets_unmerge_cells - Unmerge cells
  • sheets_add_conditional_formatting - Add conditional rules

</details>

<details> <summary><b>Charts (3 tools)</b></summary>

  • sheets_create_chart - Create chart
  • sheets_update_chart - Update existing chart
  • sheets_delete_chart - Delete chart

</details>

<details> <summary><b>Additional (2 tools)</b></summary>

  • sheets_insert_link - Insert hyperlink
  • sheets_insert_date - Insert formatted date/time

</details>

📖 Documentation

For Developers

For AI Agents

Example Files

  • .env.example - Environment configuration template
  • service-account-key.example.json - Credentials format example
  • test-integration.ts - Integration test suite

💡 Example Usage

Read Data

const result = await sheets_get_values({
  spreadsheetId: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
  range: "Sheet1!A1:C10"
});

Write Data

await sheets_update_values({
  spreadsheetId: "1BxiMVs0XRA...",
  range: "Sheet1!A1",
  values: [
    ["Name", "Age", "Email"],
    ["Alice", "25", "alice@example.com"]
  ]
});

Format Cells

await sheets_format_cells({
  spreadsheetId: "1BxiMVs0XRA...",
  range: "Sheet1!A1:C1",
  backgroundColor: "#4285F4",
  foregroundColor: "#FFFFFF",
  bold: true
});

Create Chart

await sheets_create_chart({
  spreadsheetId: "1BxiMVs0XRA...",
  sheetId: 0,
  chartType: "COLUMN",
  sourceRange: "Sheet1!A1:B10",
  position: { anchorCell: "E1" }
});

🔐 Security

  • Never commit credentials (service-account-key.json, .env)
  • Share spreadsheets explicitly with service account email
  • Use environment variables for sensitive data
  • Rotate keys regularly (every 90 days recommended)
  • Monitor API usage in Google Cloud Console

📊 Performance

  • Average Response Time: 477ms per operation
  • Batch Operations: 50-70% faster than sequential
  • API Quotas: 100 requests per 100 seconds per user
  • Recommendation: Use batch operations for 2+ ranges

🤝 Contributing

This is an AgenticLedger platform-customized version of freema/mcp-gsheets.

AgenticLedger Customizations:

  • Platform-specific documentation
  • Integration test suite
  • AI agent guides
  • Example files and templates

📜 License

MIT License - See LICENSE file

🔗 Links

  • Repository: https://github.com/oregpt/Agenticledger_MCP_SheetsOnly
  • Upstream Source: https://github.com/freema/mcp-gsheets
  • AgenticLedger Platform: [Platform Documentation]
  • Google Sheets API: https://developers.google.com/sheets/api

📞 Support

  1. Check Documentation:

  2. Run Diagnostics:

    npm run test:integration
    
  3. Review Examples:

    • See test-integration.ts for real API usage examples

Status: ✅ Production Ready Version: 1.5.2 Last Updated: 2025-11-03 Total Tools: 26 Platform: AgenticLedger

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured