esTS-mcp¶
esTS-mcp is an MCP server for esTS, a library of statistics of Spanish texts. It gives an LLM agent tools to measure a text instead of judging it by eye: readability, lexical diversity, morphology, syntax, meter and rhyme, comparison of corpora - each value with the scale to read it by and the limits of its applicability.
Features¶
-
Text statistics
Eleven groups of esTS statistics: basic, readability with the school stage and reader age of Spain, lexical diversity, morphology, phonostatistics, cohesion, style and administrative language, lexical sophistication, verse, syntax, readability formulas of other languages
-
Concordance
All occurrences of a word or a phrase with their context, by word form or by lemma
-
Collocations
Set phrases and the company of a word by eight association measures
-
Word dispersion
How evenly words are spread over the text: the measures of Gries and others
-
Keywords
Words that are more frequent in the text than in Spanish books or in another text
-
Corpus comparison
How two corpora of texts differ by style features: authorship attribution, genres, human and model texts
-
Text charts
Zipf's law, sentence lengths, word places, verse rhythm - as an image with a summary in numbers
-
Dataset texts
Reference texts from the esTS datasets: prose, poems and drama of Spanish-language classics, sonnets from the 15th to the early 20th century
-
Resources
Readability scales, the state of the dictionary and of the datasets
-
Prompts
Typical reviews: readability, administrative style, a poem, a comparison of two texts
Example¶
Asked "what reader is this text written for?", the agent calls analyze_text with the readability group and gets not just the numbers but their reading and caveats. The text is the first sentence of Don Quijote:
{
"name": "analyze_text",
"arguments": {
"text": "En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga antigua, rocín flaco y galgo corredor.",
"groups": ["readability"],
"descriptions": false
}
}
{
"readability": {
"consensus_grade": {"value": 8.0, "interpretation": "ESO (12-16 years)"},
"flesch_reading_easy": {"value": 60.56, "interpretation": "normal"},
"gutierrez_polini_index": {"value": 42.5},
"crawford_grade": {"value": 4.881, "interpretation": "primary school, grades 4-6 (9-12 years)"},
"mu_index": {"value": 80.78, "interpretation": "un poco fácil"},
"sol_grade": {"value": 10.99, "interpretation": "bachillerato (16-18 years)"},
"lix": {"value": 48.15, "interpretation": "texts of medium difficulty, magazine articles"},
"rix": {"value": 5.0, "interpretation": "ESO (12-16 years)"},
"reading_time": {"value": 0.1187}
},
"warnings": [
"Sentences in the text: 1, fewer than 30. The readability formulas rest on the mean sentence length, SMOG and SOL on a sample of 30 sentences: on a short text the values are unstable, the consensus grade included, it is a rough estimate"
]
}
Quick start¶
Connecting to Claude Code and downloading the frequency dictionary for the lexical group and keyness:
claude mcp add ests -- uvx ests-mcp
uvx ests-mcp download
Connecting to Claude Desktop, Cursor and other clients and the server settings are on the Installation page.