MCP Server & Programmatic Access
Fast programmatic endpoints, live Model Context Protocol (MCP) tools, deep passage & reply citation hashes, and clean Markdown/JSON feeds across 79430+ Thailand visa, immigration, and expat Q&A threads.
1. Connect via Model Context Protocol (MCP)
Ask Thailand exposes a read-only JSON-RPC 2.0 MCP endpoint at POST https://asq.in.th/mcp. Connect Claude Desktop, Cursor, Antigravity, or any MCP-compatible client using Streamable HTTP:
{
"mcpServers": {
"asq-thailand": {
"url": "https://asq.in.th/mcp",
"transport": "http"
}
}
}| Tool | Arguments | Returns |
|---|---|---|
| search_questions | query, tag?, limit? | Bounded GIN full-text search hits with web, .md, and .json links. |
| get_question | slug, include_comments? | Clean Markdown with numbered [¶N] deep-linkable citations + threaded replies with #c-{id} anchors. |
| list_latest | tag?, limit? | Latest published Thailand Q&A threads across all topics or filtered by tag. |
| list_popular_tags | limit? | Active visa, immigration, and expat topic tags with recent thread counts. |
Quick cURL Verification
curl -sS -X POST https://asq.in.th/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'2. Markdown & JSON REST API
Every question and search query is available in lightweight, Brotli/Gzip pre-compressed Markdown and JSON with zero HTML scraping required:
| Endpoint | Format | Purpose |
|---|---|---|
| GET /api/v1/search?q=... | JSON | Fast bounded GIN full-text search (alias: /api/v1/search.json). |
| GET /api/v1/search.txt?q=... | Plain Text | Token-efficient plain-text search digest for LLMs. |
| GET /api/v1/questions/{slug}.md | Markdown | YAML frontmatter, numbered [¶N] citable passages, and full threaded replies. |
| GET /api/v1/questions/{slug}.json | JSON | Structured thread metadata, paragraphs[] with anchor URLs, and nested comments[]. |
| Accept: text/markdown on /question/{slug} | Markdown | Automatic content negotiation for HTTP agents hitting canonical URLs (also works on / and /search?q=...). |
3. Deep Passage & Reply Citations
The URL plus a citation hash is the highlight API (full guide · /citation.json). Opening any citation hash scrolls directly to and highlights the passage in yellow; selecting text on any thread shows a floating Copy Cite Link button.
# Paragraph highlight
https://asq.in.th/question/{slug}#p-4
# Exact quote highlight (20–80 char unique snippet)
https://asq.in.th/question/{slug}#q=hiring%20agents%20for%20visa%20extensions
# Quote scoped inside a paragraph (falls back to paragraph if quote not found)
https://asq.in.th/question/{slug}#p-4&q=hiring%20agents%20for%20visa%20extensions
# Reply permalink & scoped quote inside a specific reply
https://asq.in.th/question/{slug}#c-{comment_id}
https://asq.in.th/question/{slug}#c-{comment_id}&q=exact%20passage%20in%20reply
# W3C Text Fragment (also accepted; prefer #q= as the durable form)
https://asq.in.th/question/{slug}#:~:text=hiring%20agents%20for%20visa%20extensions