tei-mcp MCP Server

An MCP server that helps AI agents read and write valid TEI XML. It parses the TEI P5 specification and exposes 21 tools spanning two complementary capabilities: schema grounding (element lookup…

Local serverstdio

What is the tei-mcp Server?

tei-mcp is an MCP project maintained in the pantagrueliste/tei-mcp repository. The maintainer describes its purpose as “An MCP server that helps AI agents read and write valid TEI XML. It parses the TEI P5 specification and exposes 21 tools spanning two…”. Read the project documentation for the complete scope.

Installation

The documented pypi package is tei-mcp. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
lookup_elementLook up an element by name (e.g., persName)
lookup_classLook up a class by name (e.g., att.global)
lookup_macroLook up a macro by name (e.g., macro.paraContent)
list_module_elementsList all elements in a module (e.g., namesdates)
searchRegex search across all TEI entities
list_attributesResolve all attributes for an element (local + inherited)
class_membership_chainShow the full class hierarchy chain
expand_content_modelExpand content model into a structured tree
valid_childrenList all valid direct children of an element
check_nestingCheck if an element can appear inside another
check_nesting_batchCheck multiple nesting pairs in one call
suggest_attributeFind relevant attributes by intent description
validate_documentValidate a TEI XML document against the spec
validate_elementValidate a single element in context
load_customisationLoad an ODD customisation
unload_customisationClear the loaded customisation
get_sourceReturn source plaintext for a span-locked document
tag_spanRecord a TEI tag at a character range over the source
composeAssemble final TEI from recorded tags; enforces body-text byte-equality
list_tagsList currently recorded tags for a document
reset_tagsClear recorded tags for a document

How to install the tei-mcp Server

{
  "mcpServers": {
    "tei": {
      "command": "uvx",
      "args": [
        "tei-mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.