API Keg — Sheet SQL & Multi-Tab XLSX Engine

Run SQLite JOINs, CTEs & window queries over CSV/JSON data and build styled .xlsx workbooks.

我該用這個嗎

品質與安全性

B
說明品質
95%
結構描述完整度
97%
命名品質
87%
汙染風險
40%
權限相符程度
100%
協定合規性
100%

發現項目(5)

  • HIGHTool poisoning patterns detected
  • MEDIUMTool description contains URL to non-standard domain在 query_tabular_data 中
  • MEDIUMTool description contains URL to non-standard domain在 build_xlsx_workbook 中
  • MEDIUMTool description contains URL to non-standard domain在 account_create_checkout 中
  • LOWTool 'account_rotate_api_key' description lacks action verb在 account_rotate_api_key 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~2,455Token(工具定義)
~3.3 KB典型回應大小
中等的注意力影響(128k 上下文的 1.92%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "sheet-sql": {
      "url": "https://sheet-sql.apikeg.com/mcp"
    }
  }
}

遠端端點

https://sheet-sql.apikeg.com/mcpstreamable-http

它能做什麼

工具清單

工具(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.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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).

輸入結構描述

{
  "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).

輸入結構描述

{
  "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.

輸入結構描述

{
  "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.

輸入結構描述

{
  "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
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本6 個工具