Skip to main content
Glama

MCP Spreadsheet PoC

PoC em Python de um servidor MCP que expoe resources, tools e prompts para trabalhar com arquivos .xlsx em um diretorio isolado.

Arquitetura

  • Host: Claude Desktop, VS Code/Copilot ou MCP Inspector.

  • Client: cliente MCP embutido no host.

  • Server: este projeto, executado via stdio.

  • Resources: catalogo, metadados e aba em JSON, todos somente leitura.

  • Tools: leitura de intervalo, criacao, inclusao de linhas, atualizacao de celula e resumo numerico.

  • Prompt: roteiro reutilizavel para analise de vendas.

Related MCP server: mcp-xlsx-server

Seguranca da PoC

  • acesso restrito a MCP_SPREADSHEET_DATA_DIR;

  • somente .xlsx;

  • bloqueio de path traversal;

  • escrita desligavel por variavel de ambiente;

  • sem sobrescrita na criacao;

  • backup automatico antes de alteracoes;

  • limite de linhas por operacao;

  • nenhuma formula, macro ou comando e executado pelo servidor.

Inicio rapido no PowerShell

cd .\mcp_spreadsheet_poc
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -e ".[dev]"
python .\scripts\create_demo.py
mcp dev .\src\mcp_spreadsheet\server.py

O comando mcp dev abre o MCP Inspector e requer Node.js/npx no PATH. No Inspector, experimente:

  1. Resource spreadsheet://catalog.

  2. Tool read_range com vendas_demo.xlsx, Vendas, A1:F5.

  3. Tool summarize_column com coluna D.

  4. Prompt analyze_sales.

Execucao direta por stdio

$env:MCP_SPREADSHEET_DATA_DIR = (Resolve-Path .\data)
$env:MCP_SPREADSHEET_ALLOW_WRITE = "true"
mcp-spreadsheet

Copie e adapte mcp.json para o formato de configuracao aceito pelo host escolhido. Prefira caminho absoluto no campo MCP_SPREADSHEET_DATA_DIR.

Testes e qualidade

pytest
ruff check .
mypy src

Cenarios de demonstracao

  • Pergunta: "Quais planilhas estao disponiveis?" O host consulta o resource de catalogo.

  • Leitura: "Mostre as vendas A1:F5." O modelo chama read_range.

  • Analise: "Qual a media de quantidade?" O modelo chama summarize_column.

  • Escrita: "Adicione uma venda." O host deve solicitar aprovacao humana e entao chamar append_rows.

Limites intencionais

Esta PoC nao processa .xlsm, nao preserva macros, nao recalcula formulas como o Excel, nao implementa autenticacao para transporte remoto e nao oferece transacoes concorrentes. Para producao, use Streamable HTTP com autenticacao/autorizacao, trilha de auditoria, controle de concorrencia, allowlist de operacoes e aprovacao humana para escrita.

Available Tools

5 tools
spreadsheet_append_rowsC

Adiciona linhas ao final de uma aba.

ParametersJSON Schema
NameRequiredDescriptionDefault
rowsYes
sheetYes
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that rows are added at the end, but says nothing about side effects, row format expectations, error behavior, authorization, or whether the operation is reversible. For a mutation tool, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no filler, and the core action is stated up front. It is concise and easily parseable, though it is thin on detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with three required parameters, a nested rows structure, and no annotations, this description is too sparse. It does not explain prerequisites, row formatting, return values, or how this tool fits with the sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no meaning beyond the parameter names. The nested array structure of 'rows' is left completely undocumented, and 'filename' and 'sheet' are not explained. The description does not compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Adiciona' and a clear resource: rows at the end of a sheet. This clearly indicates an append operation and distinguishes it from siblings like spreadsheet_update_cell and spreadsheet_read_range, though no sibling is explicitly named.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage is implied by the append-to-end semantics: use this tool when you need to add rows to a sheet. However, there is no explicit guidance about when to prefer it over alternatives, no prerequisites, and no caveats such as whether the sheet must already exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spreadsheet_create_workbookA

Cria uma planilha XLSX sem sobrescrever arquivos existentes.

ParametersJSON Schema
NameRequiredDescriptionDefault
sheetYes
headersYes
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It does disclose a meaningful safety trait—no overwriting of existing files—but it leaves ambiguous what actually happens on conflict (error, no-op, unique filename creation) and provides no further behavior context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no filler. It names the action, the output format, and a critical constraint in minimal space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and an output schema exists, so return values are likely covered elsewhere. However, given there are no annotations and the description is very brief, an agent still lacks clarity on conflict behavior and parameter usage, making this minimally adequate rather than complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain 'filename', 'sheet', or 'headers'. The parameter names and the general purpose allow some inference, but the description adds essentially no detail beyond what the schema itself exposes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Cria'), a clear resource ('uma planilha XLSX'), and an important scoping behavior ('sem sobrescrever arquivos existentes'). This clearly distinguishes it from siblings like spreadsheet_read_range and spreadsheet_append_rows, which operate on existing files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies it should be used to create a new XLSX file and that existing files will not be overwritten, but it does not explicitly state when to use it versus alternatives or what to do if the file already exists. Usage context is mostly carried by the tool name and sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spreadsheet_read_rangeA

Lê um intervalo da planilha sem modificar o arquivo.

ParametersJSON Schema
NameRequiredDescriptionDefault
sheetYes
filenameYes
cell_rangeYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral burden. It explicitly discloses the key trait of being side-effect-free ('sem modificar o arquivo'), which is valuable for an agent deciding whether this is a safe read operation. It does not go into further detail, but for a simple read tool this is substantive disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence communicates the core operation and the read-only guarantee with no filler. Every phrase earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a simple read operation, especially since an output schema exists, but it lacks parameter guidance and explicit sibling routing. For a tool with three required parameters and no annotations, more context about range format or when to prefer this tool would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain parameter formats, constraints, or examples. 'Intervalo' only restates the meaning of cell_range; nothing clarifies filename expectations, sheet naming, or the exact range syntax required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Lê' / reads) and a specific resource ('intervalo da planilha' / spreadsheet range), and explicitly contrasts itself with mutations via 'sem modificar o arquivo'. This clearly distinguishes it from sibling tools that create, append, update, or summarize.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'sem modificar o arquivo' gives a clear read-only context, but the description does not explicitly state when to choose this over alternatives such as spreadsheet_summarize_column or spreadsheet_append_rows. No exclusions or conditional guidance are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spreadsheet_summarize_columnB

Calcula estatísticas básicas de uma coluna numérica.

ParametersJSON Schema
NameRequiredDescriptionDefault
sheetYes
columnYes
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool calculates statistics, which implies a read/analysis operation, but it does not disclose whether the spreadsheet is modified, what happens with non-numeric data, or other edge-case behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with no filler or redundancy. It communicates the essential purpose efficiently and is appropriately front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is relatively simple and has an output schema, so return value details are likely covered. However, the absence of parameter descriptions and explicit usage guidance leaves gaps: an agent may not know what 'basic statistics' includes or whether the tool mutates the spreadsheet. The description is adequate but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the undocumented parameters. It adds some meaning to 'column' by indicating it should be numeric, but it provides no additional detail about 'filename', 'sheet', or how the parameters relate to each other.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Calcula') and a clear resource ('estatísticas básicas de uma coluna numérica'). This clearly distinguishes it from siblings like spreadsheet_read_range or spreadsheet_update_cell, making the tool's purpose immediately identifiable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when the tool should be used by specifying 'coluna numérica' (numeric column), which is a prerequisite condition. However, it does not explicitly state when to choose this tool over alternatives such as spreadsheet_read_range, nor does it mention exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

spreadsheet_update_cellB

Atualiza uma célula e cria backup antes da alteração.

ParametersJSON Schema
NameRequiredDescriptionDefault
cellYes
sheetYes
valueYes
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the behavioral disclosure burden. It does disclose one meaningful trait: a backup is created before the change, which is valuable for a mutating operation. However, it omits other relevant behaviors such as overwrite semantics, confirmation behavior, or side effects beyond the backup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence that front-loads the action and adds only the most important behavioral note. There is no redundant wording or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating tool with four required parameters, no annotations, and no parameter descriptions, this one-liner is insufficient. The backup behavior is useful, but the definition still lacks enough detail for an agent to safely construct a call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and all four required parameters (filename, sheet, cell, value) are undocumented. The description only references the cell being updated, providing no clarification of value formats, sheet naming, or filename expectations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The Portuguese description uses a specific verb ('Atualiza') and resource ('uma célula'), clearly indicating a single-cell update. It also distinguishes itself from siblings by contrasting with read, create, append, and summarize operations, so an agent can easily identify when this tool applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit when-to-use or when-not-to-use guidance, and it names no alternative tools or selection criteria. The only signal is the verb 'atualiza', which implies an update scenario, but this is inferential rather than stated guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.6/5.0
Disambiguation5/5

Each tool targets a distinct spreadsheet operation: reading, creating, appending, updating, and summarizing. There is no meaningful overlap or ambiguity between them.

Naming Consistency5/5

All tools consistently follow the spreadsheet_verb_noun pattern using snake_case. The verbs are uniform and clearly indicate the action.

Tool Count5/5

Five tools is a well-scoped size for a focused spreadsheet server. Each tool provides a distinct, useful capability without bloat or redundancy.

Completeness3/5

Core workflows like create, read, append, update, and summarize are covered. However, there are no delete/clear operations or sheet-level management tools, which creates a notable gap in the expected spreadsheet lifecycle.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables reading and searching Excel files through MCP-compatible clients. Provides tools to retrieve workbook metadata, read sheet contents, and search across all sheets using absolute file paths.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables reading and writing Excel workbooks (.xlsx) through MCP. Supports listing sheets, tables, pivot tables, reading cell data, exporting to CSV/text/Markdown, and creating/modifying Excel files.
    14
    GPL 3.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides full read and write access to Excel workbooks (sheets, cell ranges, tables, formulas, formatting, and cross-workbook references) via MCP, running locally or as an HTTP/SSE service.
    70
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abigaillopes-eng/por_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server