MCP Server & Programmatic Access
Fast programmatic endpoints, live Model Context Protocol (MCP) tools, deep passage citation hashes, and clean Markdown/JSON feeds for AI agents and developers.
1. Connect via Model Context Protocol (MCP)
THAI.NEWS exposes a read-only JSON-RPC 2.0 MCP endpoint at POST https://thai.news/mcp. Connect Claude Desktop, Cursor, Antigravity, or any MCP-compatible client using Streamable HTTP:
{
"mcpServers": {
"thai-news": {
"url": "https://thai.news/mcp",
"transport": "http"
}
}
}Available MCP Tools
| Tool | Arguments | Returns |
|---|---|---|
search_news | query, category?, limit? | Ranked full-text search hits with web, .md, and .json links. |
get_article | category, slug, include_comments? | Full Markdown report with numbered [¶N] deep-linkable citations + threaded reader discussion. |
list_latest | category?, limit? | Latest published editorial stories across Thailand or within a specific desk. |
list_sections | none | All active news sections with article counts, RSS URLs, and JSON Feed URLs. |
Quick cURL Verification
curl -sS -X POST https://thai.news/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'2. Text, Markdown & JSON REST API
Every article and search query is available in lightweight, pre-compressed Markdown and JSON with zero HTML scraping required:
| Endpoint | Format | Purpose |
|---|---|---|
GET /api/v1/search?q=visa&category=visa | JSON | Fast full-text search with relevance ranking. |
GET /api/v1/search.txt?q=visa | Plain Text | Token-efficient plain-text search digest for LLMs. |
GET /api/v1/articles/{category}/{slug}.md | Markdown | YAML frontmatter, numbered [¶N] citable passages, and full threaded reader discussion. |
GET /api/v1/articles/{category}/{slug}.json | JSON | Structured article metadata, paragraphs[] with anchor URLs, and nested comments[]. |
Accept: text/markdown on /news/{cat}/{slug} | Markdown | Automatic content negotiation for HTTP agents hitting canonical article URLs. |
3. Deep Passage Citations & Feeds
The article URL plus a citation hash is the highlight API — no extra request required. Every article supports paragraph, quote, and combined highlight hashes (full guide · /citation.json):
# Paragraph highlight
https://thai.news/news/economy/thailand-18-percent-us-tariff-deal-2027-economic-pivot-expats#p-2
# Exact quote highlight (20–80 char unique snippet)
https://thai.news/news/economy/thailand-18-percent-us-tariff-deal-2027-economic-pivot-expats#q=18%20percent%20baseline%20tariff
# Quote scoped inside a paragraph (falls back to paragraph if quote not found)
https://thai.news/news/economy/thailand-18-percent-us-tariff-deal-2027-economic-pivot-expats#p-2&q=18%20percent%20baseline%20tariff
# W3C Text Fragment (also accepted; prefer #q= as the durable form)
https://thai.news/news/economy/thailand-18-percent-us-tariff-deal-2027-economic-pivot-expats#:~:text=18%20percent%20baseline%20tariffOpening any citation hash smoothly scrolls to and paints the cited passage with a yellow marker. Readers can also highlight any text inside an article to copy a durable #p-N&q=… link or quote it directly in the discussion.
Syndication Feeds
- Global RSS 2.0:
/feed.xml - Global JSON Feed 1.1:
/feed.json - Per-Section Feeds:
/news/{category}/feed.xmland/news/{category}/feed.json(e.g./news/economy/feed.json) - Citation Spec:
/citationand/citation.json - LLM Discovery:
/llms.txtand/llms-full.txt