This release is a pre-release and may not be stable for production use.
MCParser
Dependency parsing with a team of LLM agents. MCParser annotates text in the Universal Dependencies CoNLL-U format (segmentation, lemma, UPOS, XPOS, FEATS, HEAD, DEPREL and optionally enhanced DEPS), using a treebank you trust, such as a UD training file, as the examples.
One agent looks after each CoNLL-U column, and a scorer gives every cell a confidence. Cells the treebank makes near-certain are settled by plain code without calling a model. The remaining low-confidence cells are refined over several rounds. All access to the data goes through an MCP server, so the same corpus tools also work from Claude Desktop and other projects.
It is aimed at low-resource and historical languages, where a small treebank and a capable LLM together beat either alone, and where you want to see why a cell has the value it has. Every edit is logged with the agent that made it.
Installation
MCParser needs Python 3.11 or later.
pip install --pre mcparser # alpha release; or: uv tool install --prerelease allow mcparser
export ANTHROPIC_API_KEY=... # the default models are Anthropic's
From a clone of the repository: uv sync, then prefix the commands below with uv run. Other model providers (OpenAI, Google, Bedrock, Groq, Mistral, xAI, OpenRouter) are installed with extras, for example pip install "mcparser[openai]". See Models and providers.
Quick start
# 1. Raw text (one sentence per line, or YAML with 'text' fields) -> CoNLL-U with a frequency baseline
mcparser init input.txt -o pred.conllu -s ud-train.conllu
# 2. Try one sentence first to see what it costs
mcparser run pred.conllu -s ud-train.conllu --sentence SENT_ID --rounds 1
# 3. Annotate everything, stopping at a spending limit (run again to continue)
mcparser run pred.conllu -s ud-train.conllu --rounds 3 --max-cost 20
# 4. Compare with gold annotation using the CoNLL 2018 metrics
mcparser evaluate pred.conllu gold.conllu
-s names the trusted CoNLL-U files (read-only examples). The prediction file is edited in place and every run can be resumed. mcparser settings prints all settings (models for each role, confidence threshold, rounds, batch sizes, cost limit).
How well does it work?
On 100 held-out Ancient Greek (PROIEL) dev sentences, annotated from raw tokens with the default models (Opus 5.5 for segmentation, lemma and syntax, Sonnet 5.5 for UPOS, FEATS and scoring, Haiku 5.5 for XPOS) in two rounds, scored by the official CoNLL 2018 script’s metrics:
UPOS |
XPOS |
UFeats |
Lemmas |
UAS |
LAS |
CLAS |
MLAS |
|---|---|---|---|---|---|---|---|
97.95 |
97.87 |
94.18 |
99.02 |
92.04 |
89.09 |
87.18 |
77.56 |
The run cost about $7.80 ($0.078 per sentence, $0.006 per word). Cost per sentence depends on language and length; it is roughly $0.03 to $0.12 with Sonnet for the strong roles and one round. Differences of about 1.5 points on a hundred sentences are noise. Results on four complete dev files, the cost breakdown and the caveats are in Results.
Using it from Claude Desktop
mcparser mcp config -s train=ud-train.conllu -s pred=pred.conllu:rw
prints the mcpServers entry to add to claude_desktop_config.json. Sources are [NAME=]PATH[:ro|rw[:CONFIDENCE]]: read-only sources hold trusted examples and writable sources hold predictions. mcparser mcp serve runs the server directly (stdio or streamable HTTP; --read-only removes the editing tools).
From Python
import anyio
from mcparser.agents.team import AgentTeam
from mcparser.corpus import CorpusStore
from mcparser.pipeline import Pipeline
from mcparser.settings import Settings
store = CorpusStore()
store.add_source("train", "train.conllu")
store.add_source("pred", "pred.conllu", mode="rw")
settings = Settings(rounds=2, max_cost=20)
team = AgentTeam(store, "pred", settings)
report = anyio.run(Pipeline(store, "pred", team, settings).run)
The corpus store (search, validation, editing, confidence) is also usable without any agents or model. See the API reference.
Limitations
LLM output varies from run to run, and the agents inherit the treebank’s own inconsistencies. Check a sample of the output before relying on it, and use the confidence scores to decide what to review by hand.
Cost grows with the number of words, and long sentences are expensive. Use --max-sentences, --sentence and --max-cost while you tune a setup.
Only the Anthropic models have been tested in real runs. Other providers are supported through pydantic-ai but are untested here.
The tokeniser in init is simple (whitespace and punctuation). Clitics and multiword tokens are left to the segmentation agent.
Documentation
Full documentation: https://rbturnbull.github.io/mcparser (build it locally with uv run --group docs sphinx-build -W docs docs/_build/html). Design notes for contributors are in AGENTS.md, and changes in CHANGELOG.md.
Contributing
uv sync --all-groups
uv run pytest # the tests never call a model; 100% line and branch coverage is required
See CONTRIBUTING.md. Please report bugs and ideas on the issue tracker.
Licence
Apache 2.0, see LICENSE. The vendored CoNLL 2018 evaluation script in tests/official/ is under the Mozilla Public Licence 2.0.
Metadata
Release files for mcparser 0.2.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcparser-0.2.0a1.tar.gz | 620.3 kB | Without provenance | Details for mcparser-0.2.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcparser-0.2.0a1-py3-none-any.whl | Python 3 | none | any | Details for mcparser-0.2.0a1-py3-none-any.whl |
Total release size: 741.9 kB
Release files / mcparser-0.2.0a1.tar.gz
| Download URL | mcparser-0.2.0a1.tar.gz |
|---|---|
| Size | 620.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da603706fe6f6602e77c6d1caa84681b3f58b437e05cfd672a77efe8e128f035
|
|
BLAKE2b-256 checksum How to use checksums |
2efa57c16a194550d008cc2a0599f45b103ab5997070d8e8d84d7d3383453a06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcparser-0.2.0a1-py3-none-any.whl
| Download URL | mcparser-0.2.0a1-py3-none-any.whl |
|---|---|
| Size | 121.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e700f75925464205ea318a87b533a0b744a641f9045e3efbb169c77b43e8415b
|
|
BLAKE2b-256 checksum How to use checksums |
b88475e79aa168580f068b96f782fad91251a6b93eef22d814b82963169f8464
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mcparser 0.2.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.