API Keg — Sheet SQL & Multi-Tab XLSX Engine
Run SQLite JOINs, CTEs & window queries over CSV/JSON data and build styled .xlsx workbooks.
¿Debería usar esto?
Calidad y seguridad
Hallazgos (5)
- HIGH
- MEDIUMen query_tabular_data
- MEDIUMen build_xlsx_workbook
- MEDIUMen account_create_checkout
- LOWen account_rotate_api_key
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"sheet-sql": {
"url": "https://sheet-sql.apikeg.com/mcp"
}
}
}Puntos de conexión remotos
https://sheet-sql.apikeg.com/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (6)
🟢query_tabular_data(tables, sql, coerceCurrencyNumbers, maxRows, markdownPreviewRows, ...)
Loads 1–10 named CSV/TSV or JSON row-array datasets, normalizes currency strings (e.g. '$1,250.50' -> 1250.5), executes read-only SQL (JOIN, GROUP BY, CTEs, window functions), and returns typed rows, Markdown preview, inferred schemas, and optional .xlsx export. Pricing: $0.002 base (up to $0.01 max $0.002 base + $0.001 per 1,000 total input rows (capped at $0.01), x402 variable settlement). Defaults to HTTP 402 (x402); if your client lacks 402 support, sign in via MCP OAuth or subscribe at https://apikeg.com/account. Pass ?dry_run=true on REST to validate schema free.
Esquema de entrada
{
"type": "object",
"properties": {
"tables": {
"type": "object",
"additionalProperties": {
"type": "string",
"minLength": 1,
"maxLength": 3800000,
"description": "Raw RFC 4180 CSV/TSV string (auto-detecting ',', ';', or '\\t') or serialized JSON row-array string."
},
"description": "Map of 1 to 10 SQL table names (e.g. 'orders', 'customers') to CSV/TSV or JSON row-array payloads."
},
"sql": {
"type": "string",
"minLength": 1,
"maxLength": 32768,
"description": "Read-only SQL SELECT or WITH (CTE) query supporting JOIN, GROUP BY, HAVING, and window functions (ROW_NUMBER() OVER (...), SUM, AVG)."
},
"coerceCurrencyNumbers": {
"type": "boolean",
"default": true,
"description": "Automatically strip $, €, £, ¥ symbols, thousands commas, and accounting parentheses (e.g. '$1,250.50' -> 1250.5) when an entire column is numeric."
},
"maxRows": {
"type": "integer",
"minimum": 1,
"maximum": 5000,
"default": 1000,
"description": "Maximum result rows returned in `rows` (1–5000, default 1000)."
},
"markdownPreviewRows": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 20,
"description": "Maximum rows rendered in `markdownPreview` (1–100, default 20)."
},
"exportXlsx": {
"type": "boolean",
"default": false,
"description": "When true, also exports the query result set as a styled OpenXML .xlsx workbook in `xlsxBase64`."
},
"xlsxSheetName": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Optional worksheet tab name when `exportXlsx` is true (default 'Query Results')."
},
"xlsxSummaryRowFormulas": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"SUM",
"AVERAGE",
"MIN",
"MAX",
"COUNT",
"COUNTA"
],
"description": "Spreadsheet summary aggregation function (SUM, AVERAGE, MIN, MAX, COUNT, COUNTA)."
},
"description": "Optional summary row formulas keyed by output column name when `exportXlsx` is true (e.g. { total_revenue: 'SUM' })."
},
"apiKey": {
"type": "string",
"minLength": 10,
"maxLength": 256,
"description": "Optional API Keg Bearer key (ak_live_... or ak_oauth_...) returned by account_verify_and_checkout when your MCP client does not send an Authorization HTTP header."
}
},
"required": [
"tables",
"sql"
],
"additionalProperties": false
}🟢build_xlsx_workbook(fileName, sheets, apiKey)
Compiles 1–20 structured JSON datasets into a genuine Office Open XML (.xlsx) workbook with bold shaded headers, frozen top rows, auto-sized columns, numeric formatting, formula-injection protection, and live Excel summary formulas (SUM, AVERAGE, MIN, MAX, COUNT). Pricing: $0.003 USD per multi-sheet .xlsx workbook generation (x402 instant micropayment). Defaults to HTTP 402 (x402); if your client lacks 402 support, sign in via MCP OAuth or subscribe at https://apikeg.com/account. Pass ?dry_run=true on REST to validate schema free.
Esquema de entrada
{
"type": "object",
"properties": {
"fileName": {
"type": "string",
"default": "workbook.xlsx",
"minLength": 1,
"maxLength": 128,
"description": "Output .xlsx filename metadata (automatically suffixed with .xlsx if omitted)."
},
"sheets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Worksheet tab name (sanitized and capped at Excel's 31-character limit)."
},
"columns": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"minItems": 1,
"maxItems": 200,
"description": "Optional explicit column order. If omitted, column keys are inferred from `rows` in insertion order."
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"description": "Optional human-friendly header display labels keyed by column name (e.g. { mrr_usd: 'MRR (USD)' })."
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": true,
"description": "Row object mapping column names to typed cell values (number, string, boolean, or null)."
},
"minItems": 0,
"maxItems": 10000,
"description": "Structured JSON rows to populate on this worksheet."
},
"freezeHeader": {
"type": "boolean",
"default": true,
"description": "Freeze top header row (`<pane ySplit=\"1\" state=\"frozen\"/>`)."
},
"coerceCurrencyNumbers": {
"type": "boolean",
"default": false,
"description": "Coerce currency-formatted string cells (e.g. '$1,250.50') into typed numeric Excel cells."
},
"allowCellFormulas": {
"type": "boolean",
"default": false,
"description": "When true, string cells starting with '=' (e.g. '=B2*C2') emit native OpenXML <f> formulas; when false, they stay literal strings to prevent formula injection."
},
"summaryRowFormulas": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"SUM",
"AVERAGE",
"MIN",
"MAX",
"COUNT",
"COUNTA"
],
"description": "Spreadsheet summary aggregation function (SUM, AVERAGE, MIN, MAX, COUNT, COUNTA)."
},
"description": "Optional summary row formulas keyed by column name (e.g. { revenue: 'SUM', deal_size: 'AVERAGE' })."
},
"summaryRowLabel": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Optional label placed in column A of the summary row (default 'Total')."
}
},
"required": [
"name",
"rows"
],
"additionalProperties": false,
"description": "Worksheet definition for an OpenXML .xlsx workbook."
},
"minItems": 1,
"maxItems": 20,
"description": "1 to 20 worksheets to compile into the multi-tab .xlsx archive."
},
"apiKey": {
"type": "string",
"minLength": 10,
"maxLength": 256,
"description": "Optional API Keg Bearer key (ak_live_... or ak_oauth_...) returned by account_verify_and_checkout when your MCP client does not send an Authorization HTTP header."
}
},
"required": [
"sheets"
],
"additionalProperties": false
}🟡account_send_verification_code(email)
Free ($0.00). Sends a 9-character verification code (AAA-AAA-AAA) to the user's email address to register, sign in, or view their current ak_live_... API key without rotating it. Ask for the email and resulting code using your built-in interactive question tool (AskUserQuestion / ask_question).
Esquema de entrada
{
"type": "object",
"properties": {
"email": {
"type": "string",
"minLength": 5,
"maxLength": 254,
"description": "User's email address to receive the 9-character verification code."
}
},
"required": [
"email"
],
"additionalProperties": false
}🟡account_verify_and_checkout(email, code, tierId, createCheckout, rotateApiKey)
Free ($0.00). Verifies the 9-character email code from account_send_verification_code, returns the user's current ak_live_... API key on the first call (even if already registered, without rotating their key!), and optionally creates a direct Stripe Checkout URL for "sheet-sql" ($5, $20, or $50/mo).
Esquema de entrada
{
"type": "object",
"properties": {
"email": {
"type": "string",
"minLength": 5,
"maxLength": 254,
"description": "The same email address passed to account_send_verification_code."
},
"code": {
"type": "string",
"minLength": 9,
"maxLength": 16,
"description": "9-character verification code (AAA-AAA-AAA) from the user's email."
},
"tierId": {
"type": "string",
"enum": [
"starter_5",
"growth_20",
"scale_50"
],
"default": "starter_5",
"description": "Monthly plan for this API: starter_5 ($5/mo = $6 credit), growth_20 ($20/mo = $28 credit), or scale_50 ($50/mo = $80 credit)."
},
"createCheckout": {
"type": "boolean",
"default": true,
"description": "Set false when the user only wants to view their current ak_live_... API key without generating a Stripe Checkout session."
},
"rotateApiKey": {
"type": "boolean",
"default": false,
"description": "Leave false (default) to return the user's existing ak_live_... key unchanged. Set true only if the user explicitly wants to revoke and replace their key."
}
},
"required": [
"email",
"code"
],
"additionalProperties": false
}🟡account_create_checkout(tierId, apiKey)
Free ($0.00). Generates a direct Stripe Checkout URL (https://checkout.stripe.com/...) for "sheet-sql" ($5, $20, or $50/mo) using either the connected Authorization header or an apiKey.
Esquema de entrada
{
"type": "object",
"properties": {
"tierId": {
"type": "string",
"enum": [
"starter_5",
"growth_20",
"scale_50"
],
"default": "starter_5",
"description": "Monthly plan to activate or upgrade to: starter_5 ($5/mo = $6 credit), growth_20 ($20/mo = $28 credit), or scale_50 ($50/mo = $80 credit)."
},
"apiKey": {
"type": "string",
"minLength": 10,
"maxLength": 256,
"description": "Optional ak_live_... or ak_oauth_... key when no Authorization header is configured on the MCP client."
}
},
"additionalProperties": false
}🔴account_rotate_api_key(apiKey)
Free ($0.00). Rotates the user's ak_live_... API key immediately without requiring an email verification code, authenticating with either the connected Authorization header or the current apiKey.
Esquema de entrada
{
"type": "object",
"properties": {
"apiKey": {
"type": "string",
"minLength": 10,
"maxLength": 256,
"description": "Current ak_live_... or ak_oauth_... Bearer key when no Authorization header is configured on the MCP client."
}
},
"additionalProperties": false
}Comunidad
Evidencia