MCP Latin Tools Server
Provides Latin NLP tools for tokenization, lemmatization, POS tagging, reported speech detection, and LiLa Knowledge Base querying via MCP.
README
MCP Latin Tools Server
A Model Context Protocol (MCP) server for Latin Natural Language Processing (NLP), reported speech detection, and LiLa Knowledge Base querying.
Features
- Latin tokenization with enclitic
-quesplitting - UDPipe-based lemmatization, POS tagging, and morphological analysis
- Non-finite verb identification
- Reported speech detection using a fine-tuned LaBERTa transformer latin model
- LiLa Knowledge Base SPARQL querying and exporting results
- MCP-compatible tool interface for Claude Desktop, VS Code, and MCP Inspector
System Overview
The server provides a pipeline of interoperable MCP tools for Latin NLP and Digital Humanities workflows.
The tools are designed to be used sequentially, but may also be used independently.
Tools
| Tool | Description |
-------------------------------------------------------------------------------------------------------------|
| tokenize_latin_text | Tokenize Latin text with sentence splitting and enclitic handling |
| parser | Morphological analysis and preprocessing using UDPipe |
| detect_reported_speech_from_text| Transformer-based reported speech detection |
| get_lila_lemma_info | Query the LiLa Knowledge Base for lemma information |
| get_lila_lemma_tokens_dataframe | Retrieve LiLa corpus token occurrences and count attestations per work |
| export_lila_lemma_tokens_csv | Export LiLa corpus token occurrences as a CSV file |
1. Latin NLP Parsing Pipeline
The parser tool performs:
- tokenization
- sentence segmentation
- lemmatization
- POS tagging
- morphological analysis
- non-finite verb identification
The tool calls the UDPipe API and uses the model:
latin-evalatin24-240520
The model was evaluated on EvaLatin campaign in 2024 and trained with on Latin Dependency Treebanks.
References
-
EvaLatin 2024 overview: https://aclanthology.org/2024.lt4hala-1.21/
-
UDPipe model repository: https://github.com/ufal/evalatin2024-latinpipe
2. Reported Speech Detection
A. Preparation Tool
The parser tool also prepares the linguistic input required by the reported speech detection model.
This preparation stage:
- aligns UDPipe tokenization with the original tokens
- prepares aligned linguistic features
- formats the input for transformer inference
B. Reported Speech Detector
The detect_reported_speech tool performs token-level reported speech prediction.
It takes the output of the parsing/preparation stage as input and returns:
- token-level predictions
- confidence scores
The model is:
- the first experimental Latin reported speech detection model at token level
- a fine-tuned LaBERTa model for token classification
References
-
Hugging Face model repository: https://huggingface.co/agudei/latin-reported-speech-laberta
-
Paper describing the experiment: https://aclanthology.org/2026.latechclfl-1.24/
3. LiLa Knowledge Base Querying
The get_lila_lemma_info tool provides simplified access to the LiLa Knowledge Base.
The tool:
- accepts a Latin lemma
- performs SPARQL queries automatically
- retrieves lexical and linguistic information
- simplifies access to Linked Open Data resources
The tool is designed to help users interact with LiLa without manually writing SPARQL queries.
LiLa
- LiLa Knowledge Base: https://lila-erc.eu/sparql/
4. LiLa Corpus Attestation Retrieval
The get_lila_lemma_tokens_dataframe tool retrieves corpus attestations linked to a Latin lemma in the LiLa Knowledge Base.
The tool:
- retrieves token occurrences associated with a lemma
- retrieves token URIs
- retrieves work titles
- computes occurrence frequencies per work
- structures results as a dataframe-like output
This enables corpus-based lexical exploration and quantitative analysis of lemma attestations across Latin works.
5. LiLa CSV Export
The export_lila_lemma_tokens_csv tool exports LiLa corpus attestation results as a CSV file.
The exported CSV includes:
- token forms
- token URIs
- work titles
The tool is designed for:
- corpus analysis
- spreadsheet analysis
- downstream NLP workflows
- Digital Humanities research pipelines
Installation
Install dependencies with:
uv sync
Running the Server
Recommended
uv run mcp-latin
Alternative
uv run python -m mcp_latin -vv
The MCP server will run at:
http://localhost:8001/mcp
MCP Inspector
You can test the server locally with:
npx @modelcontextprotocol/inspector
Then connect Inspector to:
http://localhost:8001/mcp
Example Prompts
Tokenization
Use the MCP tool tokenize_latin_text on:
"Senatus populusque Romanus."
Parsing
Use the MCP tool parser on:
"Non potui, inquit, sustinere illud durum spectaculum."
Reported Speech Detection
Use the Latin MCP tools only.
1. Parse:
"HISPO ROMANIUS alio colore dixit illam non amore adulescentis sed odio patris sui secutam"
2. Detect reported speech.
LiLa Query
Use the MCP tool get Lila information on the "probabilis".
LiLa Query
Use the MCP tool get occurrences of the on the lemma "probabilis" and export the results.
Development Container
A reproducible VS Code devcontainer is included in:
.devcontainer/
See:
.devcontainer/README.md
for details.
Notes
- UDPipe requests require internet access.
- Hugging Face model weights are downloaded automatically.
- The server is designed for MCP-compatible clients such as Claude Desktop and VS Code MCP integration.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。