
Tablestakes
io.github.oborchers由 GitHub 帳號 oborchers 發布v1.1.0更新於 Oct 24, 2026
Read and edit HTML/Markdown tables in GitBook-synced documents via MCP tools.
概覽
一個 MCP 伺服器,讓助理列出、讀取並精準編輯本機檔案中的 HTML 與 Markdown 表格,把摺疊的 GitBook HTML 轉成管道表格並在儲存時還原。
- 可以做什麼
- 列出 Markdown 檔案中的表格,回傳中繼資料與預覽列,並將完整表格讀成整齊的管道表格及版本雜湊
- 批次更新儲存格,插入或刪除列,插入、刪除或重新命名欄
- 以管道輸入整表替換,或新建 HTML 或管道格式的表格
- 支援 GitBook 摺疊 HTML 與一般 HTML 表格的往返轉換,保留 width、data 屬性與行內格式
- 適用情境
- 適用於從 GitBook、Notion 或 CMS 同步的文件中表格被壓成單行 HTML、難以閱讀且編輯容易出錯的情況,希望以更省 token 且保留結構的方式修改表格,而不是整篇讀取與重寫檔案。
- 執行需求
- 以 stdio 本機程序執行;可從 PyPI 安裝(pip install tablestakes)或以 uvx tablestakes 啟動。未宣告帳號、API 金鑰或環境變數。需要存取被編輯的 Markdown 檔案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Tablestakes,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
tablestakes
[PyPI version] [Python versions] [CI] [License]
An MCP server that gives LLMs clean, surgical access to tables trapped in messy HTML.
The Problem
Tools like GitBook, Notion exports, and CMS platforms collapse tables into single-line HTML when syncing to Markdown files. The result looks like this in your editor:
This is unreadable for humans and unreliable for LLMs. Models struggle to parse collapsed HTML tables, frequently hallucinate cell boundaries, and cannot edit them without corrupting the structure.
tablestakes fixes this. It sits between the LLM and the file, converting tables to clean pipe format on read and writing back in the original format on save — preserving GitBook compatibility, HTML attributes, and inline formatting.
What the LLM Sees
Discovery — scan a 26-table document in one call:
Read — collapsed HTML becomes a clean pipe table:
Write — surgical cell edit, version-checked:
14 characters. The file is updated, GitBook HTML format preserved, width attributes intact.
Token Efficiency
Baseline: Claude Code's built-in Read + Edit tools operating on the same file. Measured on a synthetic 18-row, 4-column table with realistic requirement-style content (bold IDs, inline emphasis, mixed-length cells).
Where the savings come from:
-
Read (HTML): collapsed HTML tags (
<td>,<tr>,<th>,<strong>,width="...") are pure overhead. Pipe tables carry the same information without markup. The Read tool also addscat -nline-number prefixes. -
Read (GFM): modest savings from stripping line-number prefixes and surrounding document context. The table content itself is already clean.
-
Write: the Edit tool requires
old_string(enough context to be unique in the file) +new_string(the modified version), both generated as output tokens. For GFM,old_stringis the entire row line (~190 chars). tablestakes needs only{"row": 0, "column": "B", "value": "Should"}(~18 tokens). -
Discovery: without tablestakes, the LLM reads the entire file to find tables.
list_tablesreturns a compact index — metadata + 1 preview row per table. -
Compact pipe tables with no column padding. Per the ImprovingAgents benchmark, GFM pipe tables achieve the best token-to-accuracy ratio: 1.24x CSV cost at 51.9% QA accuracy, beating JSON (2.08x, 52.3%) and YAML (1.88x, 54.7%).
Experiment details
Tokenizer: tiktoken cl100k_base (GPT-4). Claude uses a different tokenizer, but relative comparisons hold. The benchmark script (script.py) constructs tables programmatically and generates tablestakes output using the actual converter code — no hardcoded strings.
Read baseline: simulate_read_tool() wraps file content in cat -n format (line-number prefix per line), matching what Claude Code's Read tool returns. The full file (document text + table) enters the LLM context.
Write baseline: for each cell edit, the script computes the minimum unique old_string by expanding leftward from the target <td> until the substring is unique in the file. new_string is the same context with the cell value replaced. This is a best-case scenario for the Edit tool — a human might include more context than the minimum.
list_tables baseline: 26 copies of an 18-row GitBook HTML table in a markdown document. Naive = Read the full file (~28k tokens). tablestakes = list_tables output with preview_rows=0..3:
Reproduce: uv run --with tiktoken python scripts/script.py
Quick Start
Claude Code:
Codex CLI:
Gemini CLI:
Or install from PyPI directly: pip install tablestakes
Other clients (Cursor, Windsurf, Claude Desktop)
Add the following JSON to your client's MCP config file:
Tools
Discovery & Read
Cell, Row & Column Operations
All write tools require a version hash from read_table — optimistic concurrency that prevents stale overwrites without locks.
Supported Table Formats
While GitBook is the primary motivation, tablestakes works with any Markdown document containing HTML tables — CMS exports, Notion dumps, wiki migrations, or hand-written HTML in .md files.
Column Addressing
Columns can be referenced by:
- Letter:
"A","B","AA"(bijective base-26, like Excel) - Name:
"Priority"(must be unique) - Composite:
"B:Priority"(for disambiguation) - Index:
"0","1"(0-based)
Development
Author
Built by Dr. Oliver Borchers, Executive AI and Automation Partner and Head of AI Engineering at IU Group.
License
Apache-2.0
mcp-name: io.github.oborchers/tablestakes
來源:README.md,提交 d1b96b6
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分