About Language Detector X402
Language Detector X402 is an API for identifying text languages through trigram frequency analysis. It serves AI agents and other clients that need language detection, with per-call USDC payments over x402 on Base.
Key features
- 01Detect 30+ languages
- 02Return confidence scores and top matches
- 03Identify writing scripts
- 04Provide character statistics
- 05Pay per call with USDC on Base
Use cases
- 01Route multilingual content by language
- 02Identify language before translation
- 03Filter text based on language
MCP support
Provides the `text_detect_language` tool to MCP clients through a remote MCP endpoint. The tool detects language, reports confidence and script information, and uses x402 pay-per-call payments.
Configuration
Remote servers need no local install. Pick your client, then copy the config or install in one click.
https://language-detector.api.klymax402.com/mcpclaude mcp add --transport sse language-detector-x402 https://language-detector.api.klymax402.com/mcp{"mcpServers":{"language-detector-x402":{"type":"sse","url":"https://language-detector.api.klymax402.com/mcp"}}}Open in Cursor{"servers":{"language-detector-x402":{"type":"sse","url":"https://language-detector.api.klymax402.com/mcp"}}}Open in VS Code{"mcpServers":{"language-detector-x402":{"type":"sse","url":"https://language-detector.api.klymax402.com/mcp"}}}{"mcpServers":{"language-detector-x402":{"serverUrl":"https://language-detector.api.klymax402.com/mcp"}}}Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.
Tools
Details
From the project READMELanguage Detector API
Detect language from text using trigram frequency analysis. Supports 30+ languages with script detection. Pay-per-call via x402 (USDC on Base L2) -- no API key, no signup, no rate-limit wall.
Part of the klymax402 marketplace -- 100 x402 micropayment APIs for AI agents, one wallet, USDC on Base.
Quickstart -- MCP
Add to your MCP client config (Claude Desktop, Cursor, ElizaOS, etc.):
{
"mcpServers": {
"language-detector": {
"url": "https://language-detector.api.klymax402.com/mcp"
}
}
}
Quickstart -- HTTP (x402)
curl -X POST "https://language-detector.api.klymax402.com/api/detect" \
-H "Content-Type: application/json" \
-d '{"text":"..."}'
# -> 402 Payment Required, with an x402 payment challenge in the response body
Any x402-aware client (@x402/fetch, x402-agent-tools, ATXP) handles the 402 -> sign -> retry cycle automatically.
Tools
| Tool | Method | Path | Price | Description |
|---|---|---|---|---|
text_detect_language | POST | /api/detect | $0.005 | Detect the language of input text with confidence scores and script identification |
text_detect_language
Use this when you need to identify what language a text is written in. Uses n-gram frequency analysis to detect 30+ languages with confidence scores. Returns top 3 language matches, script detection (Latin, Cyrillic, Arabic, CJK, Devanagari), and character statistics. Ideal for multilingual content routing, pre-translation detection, and content filtering. Do NOT use for translation — use text_translate. Do NOT use for sentiment — use text_analyze_sentiment.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text | string | yes | The text to detect language for (min 10 characters for accuracy) |
Example agent prompts
- "Identify what language a text is written in"
Payment
- Protocol: x402 -- HTTP-native pay-per-call, no signup, no API key
- Network: Base L2 (
eip155:8453) - Asset: USDC
- Facilitator: Coinbase CDP (primary), PayAI (fallback)
Part of klymax402
100 x402 micropayment APIs for AI agents -- one wallet, USDC on Base, zero signup.
- Catalog: https://klymax402.com/llms.txt
- Full API reference: https://klymax402.com/llms-full.txt
- Live stats: https://klymax402.com/stats
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.