Expand description
oxml-mcp — a Model Context Protocol server for XML.
Four tools: query, validate, check, and inspect. The protocol is
handled by rmcp, the official MCP SDK; this crate supplies the
tools and the text a model reads.
Why a model wants this: an LLM asked to pull a value out of a large
XML document otherwise has to read the whole thing into its
context and pattern-match by eye. An XPath tool turns that into a
question with an exact answer, and the document never needs to fit
in the context window.
The four operations are plain functions – query, validate,
check, inspect – and XmlServer is the handler that
exposes them as MCP tools. Each answer is returned twice: as text
for the model, and as a structured value for a client that wants to
read it without parsing prose.
Structs§
- Check
Output - A well-formed document.
- Document
Args - Arguments of
xml_checkandxml_inspect. - Inspect
Output - The shape of a document.
- Query
Args - Arguments of
xml_query. - Query
Output - What an
XPathexpression selected. - Validate
Args - Arguments of
xml_validate. - Validate
Output - The outcome of validating a document against a schema.
- Violation
- One schema violation.
- XmlServer
- The MCP server: the four tools over
rmcp.