ASCII Table MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ASCII Table MCP Servercreate a box table with headers: คำบาลี, Roman; rows: กมฺม, kamma; อวิชฺชา, avijjā"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ASCII Table MCP Server
+------------+------------------+------+---------------+
| คำบาลี | Roman | หมวด | ความหมาย |
+------------+------------------+------+---------------+
| ปฏิจจสมุปฺปาท | paṭiccasamuppāda | ธรรม | เหตุปัจจัยต่อเนื่อง |
| กามจฺฉนฺท | kāmacchanda | นิวรณ์ | ความพอใจในกาม |
| อวิชฺชา | avijjā | กิเลส | ความไม่รู้ |
+------------+------------------+------+---------------+ตารางภาษาไทย + Roman + ตัวเลข → alignment ตรงทุกบรรทัด
MCP server สำหรับสร้างตาราง (ASCII grid / Unicode box-drawing) ที่รองรับภาษาไทย บาลี โรมัน และ CJK อย่างถูกต้อง — ใช้ wcwidth ในการวัดความกว้างตัวอักษร ไม่ใช้ len() ที่นับผิด
Features
3 formats:
grid(ASCII+---+),box(Unicode┌─┬─┐),pipe(Markdown| | |)Thai/Pali/CJK: zero-width combining marks (พินทุ, สระบน/ล่าง) alignment ไม่เพี้ยน
Safe mode: char-count padding สำหรับ platform ที่ zero-width ≠ 0
5 MCP tools:
make_table,make_table_from_csv,make_table_from_json,make_table_preview,debug_tableValidation:
validate_table_textตรวจสอบโครงสร้างตาราง,analyze_tableวิเคราะห์ alignmentZero external dependencies (beyond
mcp+wcwidth)
Related MCP server: WebforAI Text Extractor
Quick Start
uvx (no install)
uvx --from git+https://github.com/dhammawatthumpra-coder/ascii-table-mcp ascii-table-mcppip install
git clone https://github.com/dhammawatthumpra-coder/ascii-table-mcp.git
cd ascii-table-mcp
pip install -e .
python -m ascii_table_mcpRegister with Claude Desktop
{
"mcpServers": {
"ascii-table": {
"command": "python",
"args": ["-m", "ascii_table_mcp"]
}
}
}Register with Hermes
# หลังจาก pip install -e . แล้ว
hermes mcp add ascii-table --command "python -m ascii_table_mcp"MCP Tools
make_table
สร้างตารางจาก headers + rows
Parameter | Type | Default | Description |
|
| — | หัวตาราง |
|
| — | แถวข้อมูล |
|
|
|
|
{
"headers": ["ชื่อไฟล์", "หน้าที่", "สถานะ"],
"rows": [
["generate_table.py", "core rendering engine", "✅"],
["server.py", "MCP wrapper", "✅"],
["README.md", "documentation", "✅"]
],
"fmt": "grid"
}ผลลัพธ์:
+-------------------+-----------------------+-------+
| ชื่อไฟล์ | หน้าที่ | สถานะ |
+-------------------+-----------------------+-------+
| generate_table.py | core rendering engine | ✅ |
| server.py | MCP wrapper | ✅ |
| README.md | documentation | ✅ |
+-------------------+-----------------------+-------+make_table_from_csv
{
"csv_text": "คำบาลี,Roman,หมวด,ความหมาย\\nกมฺม,kamma,นาม,กรรม",
"fmt": "grid"
}make_table_from_json
{
"json_data": "[ [\"คำ\",\"แปล\"], [\"กมฺม\",\"kamma\"], [\"อวิชฺชา\",\"avijjā\"] ]",
"fmt": "grid"
}debug_table
แสดงตำแหน่ง char@pos และ drift analysis สำหรับ debugging alignment:
┌───────┬───────┐
│ คำบาลี │ Roman │ ← │@char9 vs ┬@char8 ❌ drift=1
├───────┼───────┤
│ กมฺม │ kamma │ ← ✅ align
└───────┴───────┘analyze_table
วิเคราะห์ column positions ของ +--+ table และ validate | alignment
validate_table_text
ตรวจสอบโครงสร้างตาราง: column count, border alternation, format detection
Why wcwidth?
ภาษาไทยและบาลีมีอักขระ zero-width combining marks เช่น:
พินทุ ( ฺ ) —
0-widthในพจนานุกรมสระบน ( ิ ี ึ ื ั ) —
0-widthติดพยัญชนะสระล่าง ( ุ ู ) —
0-widthไม้หันอากาศ ( ั ) —
0-width
len() ใน Python นับผิด:
len("กมฺม") → 4 ❌ (นับพินทุเป็นตัวอักษร)
wcswidth("กมฺม") → 3 ✅ (พินทุ width 0)ถ้าใช้ len() ในการจัดตาราง:
+----------+-----------+ ← border ยาว 8
| คำบาลี | Roman | ← "กมฺม" = 4 char → padding 4 → len=9 ❌ drift!
+----------+-----------+ของเราใช้ wcwidth.wcswidth() แทน len() → alignment ตรงทุก platform
Format Comparison
Format | Example | เหมาะกับ |
|
| Default — terminal, code review, GitHub |
|
| presentation, formal doc |
|
| Browser/Discord ที่ zero-width ≠ 0 |
|
| Markdown, ไม่แนะนำสำหรับตารางไทย |
CLI Usage
# CSV args → grid
python -m ascii_table_mcp.generate_table --grid 'ชื่อ,อายุ' 'สมชาย,30' 'สมหญิง,25'
# TSV pipe → grid
printf 'ชื่อ\tอายุ\nสมชาย\t30\n' | python -m ascii_table_mcp.generate_table --tsv --grid
# JSON
python -m ascii_table_mcp.generate_table --json '{"headers":["A","B"],"rows":[["1","2"]]}' --grid
# ASCII/Pipe Table → auto-convert
cat table.txt | python -m ascii_table_mcp.generate_table --ascii+-------+-----+
| ชื่อ | อายุ |
+-------+-----+
| สมชาย | 30 |
| สมหญิง | 25 |
+-------+-----+Architecture
ascii-table-mcp/
├── ascii_table_mcp/
│ ├── __init__.py # MCP server (FastMCP)
│ └── generate_table.py # Core rendering engine
├── server.py # Thin wrapper for `python server.py`
├── requirements.txt # mcp + wcwidth
├── pyproject.toml # uv / pip install
├── ascii-table-mcp.bat # Windows wrapper
├── LICENSE # MIT
└── README.md # เอกสารนี้Core rendering (render_table, render_ascii_grid, render_pipe_table, render_table_safe) อยู่ใน generate_table.py — server.py import มาใช้ ไม่มี code ซ้ำ
Related
dmarsters/ascii-art-mcp — decorative ASCII art (shaded boxes, styled tables)
wcwidth — Python port of wcwidth(3)
License
MIT — แจกฟรี ใช้ได้ทั้งส่วนตัวและพาณิชย์
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/dhammawatthumpra-coder/ascii-table-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server