Skip to content

thefactlab-org/mcp-text-thai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Text Thai

MCP Text Thai is MCP server for converting Thai text and fixing keyboard layout issues.

demo-mcp-text-thai-resize-video.mp4

Features

  • QWERTY to Thai: Fix text typed with wrong keyboard layout
  • Thai Correction: Improve spelling, tone marks, and writing style
  • Smart Detection: Auto-detect and convert based on context
  • Suggestions: Get multiple conversion options
  • Batch Processing: Convert multiple texts at once

Benefits

  • Convert Thai text typed with the wrong keyboard layout (TH → EN)
  • No need to retype the text
  • Copy and paste the corrected text instantly

Requirements

  • Bun runtime (Node.js-compatible JavaScript runtime)
  • An active AI provider subscription that allows custom MCP configuration (e.g. ChatGPT, Claude, or others)
  • An AI model that supports reasoning (thinking) and MCP tool usage

Alternatively, an IDE or editor extension that supports MCP
(e.g. Cline, or any MCP-compatible extension in your IDE)

Installation

bun install
bun run dev

Usage

Add to your MCP config:

{
  "mcpServers": {
    "mcp-text-thai": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

MCP Endpoint

You can use the MCP Text Thai server for free via the public endpoint below:

Example MCP Config

{
  "mcpServers": {
    "mcp-text-thai": {
      "type": "http", // or "streamableHttp" for Cline extension
      "url": "https://mcp-text-thai.thefactlab.org/mcp"
    }
  }
}

⚠️ Note: The free public endpoint is intended for testing and light usage. For production or high-throughput workloads, it is recommended to run your own instance.


Available Tools

1. convert_thai_text

Convert Thai text with auto-detection.

Parameters:

  • text (string): Text to convert
  • mode (string, optional): Conversion mode
    • smart (default): Auto-detect
    • qwerty-to-thai: Convert QWERTY to Thai
    • thai-to-qwerty: Convert Thai to QWERTY
    • correct-thai: Correct Thai text

Example:

{
  "text": "l;ylfu8iy[",
  "mode": "smart"
}

Response:

{
  "originalText": "l;ylfu8iy[",
  "convertedText": "สวัสดีครับ",
  "conversionType": "qwerty-to-thai",
  "confidence": 80%,
  "suggestions": ["สวัสดีครับ"]
}

2. get_thai_suggestions

Get multiple conversion suggestions.

Parameters:

  • text (string): Text to get suggestions for

Example:

{
  "text": "=j;pg-upo ฟยร c[[ หรทยสำ fh;p4kKk เน .shsojvplb"
}

Response:

{
  "originalText": "=j;pg-upo ฟยร c[[ หรทยสำ fh;p4kKk เน .shsojvplb",
  "suggestions": [
    "ช่วยเขียน ฟยร แบบ หรทยสำ ด้วยภาษา เน ให้หน่อยสิ",
    "=j;pg-upo api c[[ simple fh;p4kKk go \"shsojvplb"
  ]
}

3. batch_convert_thai

Convert multiple texts at once.

Parameters:

  • texts (array): Array of texts to convert
  • mode (string, optional): Conversion mode for all texts

Example:

{
  "texts": ["l;ylfu8iy[", "-v[86I8iy[",
  "mode": "smart"
}

Response:

{
  "mode": "smart",
  "results": [
    {
      "originalText": "l;ylfu -v[86I",
      "convertedText": "สวัสดี ขอบคุณ",
      "conversionType": "qwerty-to-thai",
      "confidence": "95%"
    }
  ]
}

Additionals

Keyboard Layout Correction

Input: l;ylfu8iy[ (intended "สวัสดีครับ" but typed in English mode)
Output: สวัสดีครับ

Keyboard Mapping

Standard QWERTY to Thai layout mapping:

QWERTY Thai QWERTY Thai
q w
e r
t y
u i
o p
[ ]
/ ... ...

Limitations

  • Thai correction is currently basic
  • Advanced NLP features not yet implemented
  • Confidence score uses simple calculation

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).


Built with ❤️ for Thai users & developers who frequently mistype keyboard layouts!

About

MCP Text Thai is MCP server for converting Thai text and fixing keyboard layout issues.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors