sheets-mcp
MCP server for Google Sheets that exposes tools to read cell ranges, update values, and apply advanced batch updates (borders, colors, data validation, conditional formatting) via HTTP.
README
sheets-mcp
Servidor MCP pessoal para o Google Sheets. Expõe 3 ferramentas que o Claude pode chamar diretamente por HTTP, sem precisar de navegador:
sheets_get_range— lê um intervalo de células.sheets_update_range— escreve valores em um intervalo.sheets_batch_update— aplica operações avançadas (bordas, cores, validação de dados, formatação condicional) usando o formato bruto dobatchUpdateda API do Google.
Como funciona
- As credenciais (Client ID/Secret + refresh token de uma conta Google com acesso à planilha) ficam em variáveis de ambiente — nada fica no código.
lib/google.tsmonta um cliente autenticado da Sheets API v4 usando essas variáveis.app/api/mcp/route.tsexpõe esse cliente como ferramentas MCP via@vercel/mcp-adapter.- Uma vez publicado na Vercel, o endpoint fica em
https://<seu-projeto>.vercel.app/api/mcp— essa URL é o que se registra como um "remote MCP server" no Claude.
Passo a passo para deixar funcionando de verdade
1. Criar credenciais OAuth no Google Cloud
- Acesse https://console.cloud.google.com/, crie (ou reaproveite) um projeto.
- Ative a Google Sheets API.
- Em "Credenciais" → "Criar credenciais" → "ID do cliente OAuth" → tipo Aplicativo para computador.
- Copie o Client ID e o Client Secret.
2. Gerar o refresh token (uma vez só, localmente)
GOOGLE_CLIENT_ID=xxx GOOGLE_CLIENT_SECRET=yyy npm run get-refresh-token
Isso abre um link — logue com a conta Google que tem acesso à planilha "Promoção", autorize,
cole o código que o Google mostrar, e o script imprime o refresh_token.
3. Configurar variáveis de ambiente
Copie .env.example para .env.local e preencha os três valores (para rodar localmente),
e depois configure as mesmas três variáveis nas "Environment Variables" do projeto na Vercel
(para produção): GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REFRESH_TOKEN.
4. Rodar localmente
npm run dev
O endpoint MCP fica em http://localhost:3000/api/mcp.
5. Publicar na Vercel
Conectar este projeto a um repositório no GitHub e importar na Vercel (ou vercel deploy
direto pela CLI). Depois de publicado, a URL https://<projeto>.vercel.app/api/mcp é o
endereço que se adiciona como conector MCP remoto no Claude.
Limitações desta versão (MVP pessoal)
- Não cobre Apps Script (scripts
onEdit, sidebars) — só edita células/formatação via Sheets API. Continuaria precisando do navegador para essa parte. - Sem multiusuário: um único refresh token, de uma única conta Google, fixo nas env vars. Se quiser abrir para outras pessoas usarem depois, aí entra banco de dados (ex: Supabase) para guardar um refresh token por pessoa, e um fluxo OAuth próprio no MCP.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.