<figure><img src="image_1.png" /></figure>

HAL
open science

# UralicMCP: Turning LLMs into Experts in Endangered Languages with MCP

Mika Hämäläinen, Jack Rueter

<figure><img src="image_2.png" /></figure>

## To cite this version:

Mika Hämäläinen, Jack Rueter. UralicMCP: Turning LLMs into Experts in Endangered Languages with MCP. Lightning Proceedings of the 10th International Workshop on Computational Linguistics for Uralic Languages, Dec 2025, Joensuu, Finland. pp.1-7. hal-05406638

HAL Id: hal-05406638

https://hal.science/hal-05406638v1

Submitted on 9 Dec 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_3.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# UralicMCP: Turning LLMs into Experts in Endangered Languages with MCP

Mika Hämäläinen<fnref n="1" />

Jack Rueter<fnref n="2" />

## Introduction

This paper introduces a new MCP (Model Context Protocol) feature to UralicNLP (Hämäläinen, 2019) Python library, UralicMCP<fnref n="1" />. The MCP server exposes rule-based tools such as morphological analyzer, inflector, lemmatizer and dictionaries to any LLM tool that supports MCP. With the help of these tools, LLMs have a shot in completing NLP tasks in languages they know virtually nothing about.

There has been a lot of research interest in the past in combining traditional rule-based methods with neural networks in the context of endangered languages (Ens et al. 2019; Wiechetek et al. 2021; Alnajjar et al. 2023).

<footnote n="1">¹Metropolia University of Applied Sciences, Finland</footnote>

<footnote n="2">²University of Helsinki, Finland</footnote>

<footnote n="1">¹ https://github.com/mikahama/uralicNLP/wiki/UralicMCP</footnote>
Last year, several researchers studied the use of LLMs for NLP tasks in several endangered Uralic languages with a varying degree of success (Pirinen, 2024; Partanen, 2024; Hämäläinen, 2024a). The limiting factor was the lack of understanding of the endangered languages in question that the LLMs exhibited.

As I already stated last year (Hämäläinen, 2024b), I firmly believe that LLMs will be the future way of doing NLP for endangered languages as well. They seem to know a lot about different languages – frankly more than any human ever will – EXW WKH\ MXVW GRQ¶W XQGHUVW languages they have not sufficiently seen in their training data. But what if we gave them tools to interpret languages unknown to them through an MCP server?

# Setting up MCP

Building an MCP compatible tool is a matter of exposing the core features of UralicNLP through an MCP server as tools. We implemented the following tools: *analyze_word*, *morphological_segmentation*, *inflect_word*, *lemmatize*, *dictionary_lookup* and *list_supported cratures*. Each tool has a lengthy prompt-like docstring that explains the LLM how to use the tool.

We had to make some changes to UralicNLP to make it easier for LLMs to use the MCP server. Previously, UralicNLP output an error if language models were not present for a given language. Now, instead of an error, UralicNLP will automatically download any missing language models. We also had to make dictionaries faster and more sensical. Previously, UralicNLP dictionaries were quite messy JSON dictionaries, and there was a separate one for each supported language.
The best way to combine all these dictionaries into one
fast dictionary was to build an FST out of them, as
UralicNLP already supports FSTs and this solution does
not require any additional dependencies. We combined
all the JSON dictionaries into a massive LEXC-file that
essentially maps each lemma with a language tag to its
translations in another language. Here is an example of
one line of the LEXC: P\YB HQJBKXVEDQ\T
line also exists in reverse, so that the Erzya (myv)
translation can be found with the English word as well.

Experiments

One of the nicest aspects of MCP is that it is an open
standard. Therefore, users are not vendor-locked to a
specific LLM by a specific company, but instead
UralicMCP can be equally well used through ChatGPT and
an open-source model. Here we show some of our early
experiments we did using Jan<fnref n="2" /> desktop application.

) LUVW ZH WU\ RQH RI -DQ¶V ORFDO\vLRGHOV
4B-Q4_K_M. The model is successful at doing small
tasks using UralicMCP, but it gets lost in a larger task
such as translation of a complete sentence. Figure 1
shows an example of the Jan model successfully using
UralicMCP to analyze an Erzya word.

<footnote n="2">² https://www.jan.ai/</footnote>
Jan

<figure><img src="image_4.png" /></figure>

Can you analyze Erzya (myv) word модась?

<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /></figure>

Jan

Oct 29, 2025 at 2:19 PM

<figure><img src="image_7.png" /></figure>

Thought

<figure><img src="image_8.png" /></figure>

analyze_word Completed

<figure><img src="image_9.png" /></figure>

Thought

The word you mentioned, "модась", appears to be a Cyrillic spelling variant (possibly with an additional letter or case ending). However, the analysis tool returned results for "мода" (moda) as мода+N+Sg+Nom+Def (noun, singular, nominative, definite).

This suggests that "мода" is the base form of the word in Erzya (myv), with the analysis indicating it's a definite singular nominative noun. If you intended to analyze "модась" (with a suffix like "-сь"), please clarify the exact spelling, and I'll recheck!

<figure><img src="image_10.png" /></figure>

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /></figure>

38 tokens/sec

)LJXUH -DQ¶V ORFDO PRGHO XVLQJ 8UDOLF0&3

Translation is, however, possible if we use Gemini 1.5 Flash instead of a local model (see Figure 2).

Jan

<figure><img src="image_15.png" /></figure>

I have a text in Erzya that I would like you to translate for me. It's a good idea to try to lemmatize each word and look for their translations in all languages. Analyzing their morphology can also be useful.

Here's the text:

Весь ломантне чачнить львкс, ёнчнізз для праванзіо коряс
вѣдкетекс. Сынсіт улить превест для чаманіаст, вѣдкень-
вѣдкень коряс пряста синенст вѣтяма ялгань ёко марто.

<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /></figure>

<figure><img src="image_18.png" /></figure>

<figure><img src="image_19.png" /></figure>

Jan
Nov 1, 2025, 3:27 PM

I can help you with that. Could you please provide the ISO code for the Erzya language? I need it to use the available tools. If you don't know it, I can list the supported languages and their ISO codes.

<figure><img src="image_20.png" /></figure>

<figure><img src="image_21.png" /></figure>

<figure><img src="image_22.png" /></figure>

21 tokens/sec

It's myv

<figure><img src="image_23.png" /></figure>

<figure><img src="image_24.png" /></figure>

<figure><img src="image_25.png" /></figure>

<figure><img src="image_26.png" /></figure>

Jan
Nov 1, 2025, 3:28 PM

Okay, thank you. I will now proceed to analyze the text you provided, lemmatize each word, and then look for translations in all available languages. This may take a moment.

Scroll to bottom

<caption>Figure 2: Erzya translation task and Gemini 1.5 Flash</caption>
$IWHU VHYHUDO VWHSV RI XVILOJ 8UDOLF0&3|
manages to translate the input Erzya sentence correctly
into English (Figure 3). This is remarkable since this task
would have been otherwise impossible for the model.

<figure><img src="image_27.png" /><figcaption>Figure 3: Gemini gets the translation right after using UralicMCP several times.</figcaption></figure>

Conclusions

MCP has a huge potential for endangered languages as
well. This is the first time I feel that my early visions of
combining rule-based tools with neural networks have
actual practical value.
UralicMCP can be used for several practical use-cases. It
can be used to generate parallel translations between an
endangered language and a large language. This parallel
corpus can then be flipped and used to train a smaller
NMT model to translate from a large language to an
endangered language.

Linguists can also benefit from UralicMCP. They can now
outsource some of their corpus linguistics tasks to an
LLM. The tool can also help language learners who can
just quickly ask an LLM whether a word is inflected in a
certain way or what translations might there be for a
given word.

There must be many more use-cases, I cannot even
think of myself. As always, UralicNLP and the UralicMCP
addition are open-source software.

References

Alnajjar, K., Hämäläinen, M., & Rueter, J. (2023).
Bootstrapping Moksha-Erzya neural machine translation
from rule-based apertium. In Proceedings of the Joint 3rd
International Conference on Natural Language Processing
for Digital Humanities and 8th International Workshop on
Computational Linguistics for Uralic Languages (pp. 213-
218).

Ens, J., Hämäläinen, M., Rueter, J., & Pasquier, P. (2019).
Morphosyntactic disambiguation in an endangered
language setting. In Proceedings of the 22nd Nordic
Conference on Computational Linguistics (pp. 345-349).
Hämäläinen, M. (2019). UralicNLP: An NLP library for Uralic languages. Journal of open source software, 4(37), 1345.

Hämäläinen, M. (2024a). DAG: Dictionary-Augmented Generation for Disambiguation of Sentences in Endangered Uralic Languages using ChatGPT. In Proceedings of the 9th International Workshop on Computational Linguistics for Uralic Languages (pp. 36-40).

Hämäläinen, M. (2024b). LLMs Will Be the Future of NLP for Endangered Languages. In Lightning Proceedings of the 9th International Workshop on Computational Linguistics for Uralic Languages (pp. 14-18).

Partanen, N. (2024). Using large language models to transliterate endangered uralic languages. In Proceedings of the 9th International Workshop on Computational Linguistics for Uralic Languages (pp. 81-88).

Pirinen, F. A. (2024). Keeping Up Appearances v or how to get all Uralic languages included into bleeding edge research and software: generate, convert, and LLM your way into multilingual datasets. In Proceedings of the 9th International Workshop on Computational Linguistics for Uralic Languages (pp. 123-131).

Wiechetek, L., Pirinen, F., Hämäläinen, M., & Argese, C. (2021). Rules ruling neural networks-neural vs. rule-based grammar checking for a low resource language. In Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2021) (pp. 1526-1535).