This release is a pre-release and may not be stable for production use.
Mdtero Public Install Surface
Python/uv CLI, TUI, browser extension, and agent skill bundle for paper-to-Markdown workflows.
Mdtero turns papers into reusable Markdown research packages for humans, local agents, and downstream RAG workflows.
Languages: English | 简体中文
This repository is the public home for the active launch surfaces:
- Python runtime CLI/TUI package
mdtero, installed withuv tool install --force --reinstall git+https://github.com/JonbinC/doi2md.gitduring alpha. - Browser extension for OAuth login, DOI/current-page parse, PDF/EPUB upload, translation, polling, and download.
- Packaged agent skill bundle installed by the Python CLI with
mdtero agent install.
The old npm installer runtime has been retired from this repository. Skill installation is handled by the Python CLI.
Quick Start
uv tool install --force --reinstall git+https://github.com/JonbinC/doi2md.git
mdtero setup
mdtero doctor --json
During alpha, install the known-good public client from GitHub with uv tool install --force --reinstall git+https://github.com/JonbinC/doi2md.git. The old PyPI mdtero package currently points at a retired backend bundle; use uv tool install mdtero only after the public client is republished there.
PyPI version pitfall: legacy CalVer releases such as 2026.4.26.3 sort higher than SemVer alphas like 0.2.0a16. After Trusted Publishing uploads a new 0.2.0a* wheel, yank every 2026.* release on PyPI (or publish a higher SemVer) before uv tool install mdtero will select the new client by default. Until then prefer uv tool install mdtero==0.2.0a16 or the GitHub install command above.
If a machine has no uv, use the installer script:
curl -Ls https://mdtero.com/install.sh | sh
curl -Ls https://mdtero.com/install.sh | sh -s -- --agent codex
The script prefers uv, falls back to pipx install --force git+https://github.com/JonbinC/doi2md.git, then falls back to python3 -m pip install --user --force-reinstall git+https://github.com/JonbinC/doi2md.git. Pass --agent <target> to also install an agent skill.
mdtero setup handles login, optional academic-key configuration, and local agent workspace detection in the interactive flow. It detects local Codex/Claude/Gemini/Hermes/OpenCode workspaces and can install selected agent skills during onboarding. Headless setup with mdtero setup --api-key --json or MDTERO_API_KEY skips agent detection; run mdtero agent install --interactive later on the workstation where the agent lives. Do not put the API key value directly in shell history.
For an agent-first install, create a fresh API key in Mdtero Account/Dashboard, then give the trusted agent this order: install the Python runtime and skill, run mdtero setup --api-key --json, paste the secret only at the secure prompt, verify mdtero doctor --json, ask whether the user has an Elsevier key, then continue with discovery, parse, and translation. Elsevier should be configured first for publisher-heavy English literature reviews when the user has valid ScienceDirect/Elsevier access; it improves routing but does not bypass licensed-access requirements.
Human Workflow
Use this path when you are working directly from a terminal or local workstation:
mdtero discover "thermochemical energy storage" --limit 5 --interactive
mdtero parse 10.48550/arXiv.1706.03762 --trace --wait --timeout 300 --json
mdtero parse --file paper.pdf --trace --wait --timeout 600 --json
mdtero status <task-id> --wait --timeout 300 --json
mdtero download <task-id> paper_md --output-dir ./mdtero-output --json
mdtero translate <parse-task-id> --to zh-CN --wait --timeout 600 --json
mdtero rag query "What are the strongest findings?" --build-if-needed --json
mdtero tui
Use the browser extension when content depends on browser login, campus-network/session-bound access, a publisher challenge page, or current-page capture. The extension can hand the DOI, URL, PDF, EPUB, HTML, or XML artifact back to the CLI so route planning, raw upload, task polling, downloads, and structured failure fields remain visible.
Project Workflow
Use a local Mdtero project when you are handling a paper set:
mdtero project init --name literature-review
mdtero project add 10.48550/arXiv.1706.03762 --json
mdtero project status --json
mdtero project import-bib references.bib --json
mdtero project parse --wait --timeout 300 --json
mdtero project refresh --wait --timeout 300 --json
mdtero project download --output-dir ./mdtero-output --json
Zotero import and sync are conservative:
mdtero config zotero
mdtero zotero import --json
mdtero zotero sync --json
mdtero zotero sync creates Mdtero result notes/tags for succeeded Zotero-origin parse tasks with known Zotero item keys; it does not rewrite Zotero bibliographic metadata.
Agent Workflow
Use JSON and MCP surfaces when a local agent should continue work without scraping terminal tables:
mdtero setup --json
mdtero doctor --json
mdtero mcp briefing --json
mdtero mcp serve
Agent rules:
- Start with
mdtero doctor --jsonbefore parse, project, RAG, or MCP work; it returns safe auth/dependency/academic/Zotero/project/RAG summaries plus safenext_commandswithout echoing secrets. - Follow
next_commandsreturned by setup, doctor, parse, status, project refresh, RAG status, and MCP tools. - Preserve task ids, route diagnostics, quality labels, preferred artifacts, download artifacts, reason codes, action hints, translation attempts, citation contracts, citations, and source nodes.
- Treat copied task handoff JSON and
dashboard_handoff_jsonas starting state, then validate it withtask_statusorserver_rag_statusbefore continuing. - Do not ask users to paste long-lived secrets into prompts when a dashboard-created key or saved config can be used.
- Keep API keys, signed URLs, bearer tokens, storage tokens, and service credentials out of prompts and logs.
The preferred MCP entry point is agent_briefing. It returns account status, project health, ready downloads, blocked items, RAG status, extension/CLI handoff, recommended next commands, and a structured mcp_tool_plan playbook with step, tool, when, arguments, success_signal, and failure_fields. Use the plan to choose project_init, project_add, submit_parse, task_status, download_artifact, request_translation, server_rag_status, server_rag_build, or rag_query.
Runtime Commands
mdtero doctor
mdtero doctor --json
mdtero login
mdtero setup --api-key --json
mdtero config academic
mdtero config academic --elsevier-key <key> --json
mdtero config academic --semantic-scholar-key <key> --json
mdtero project init --json
mdtero project status --json
mdtero project import-bib references.bib --json
mdtero project parse --wait --timeout 300 --json
mdtero project refresh --wait --timeout 300 --json
mdtero project download --output-dir ./mdtero-output --json
mdtero config zotero
mdtero zotero import --json
mdtero zotero sync --json
mdtero discover "thermochemical energy storage" --limit 5 --json
mdtero discover Thermochemical Energy storage Vermiculite --limit 5 --json
mdtero discover "thermochemical energy storage" --limit 5 --page 2 --json
mdtero discover "thermochemical energy storage" --limit 5 --interactive
# In the interactive discovery session: enter numbers to add, `n`/`p` to page server-side, `r <query>` to refine, `a` to add the current page, or `q` to quit.
mdtero discover "thermochemical energy storage" --limit 5 --add --select 1,3 --json
mdtero discover "<query>" --limit 5 --add --select 1,3 --json
mdtero parse 10.48550/arXiv.1706.03762 --json
mdtero parse '10.1016/S0260-8774(02)00304-7' --trace --wait --timeout 300 --json
mdtero parse https://example.org/open-paper --trace --wait --timeout 300 --json
mdtero parse --file paper.pdf --trace --wait --timeout 600 --json
mdtero parse --batch ./papers --wait --timeout 300 --json
mdtero parse-batch dois.txt --wait --download paper_md --output-dir ./mdtero-output --json
mdtero status <task-id> --wait --timeout 300 --json
mdtero download <task-id> paper_md --output-dir ./mdtero-output --json
mdtero download <task-id> paper_md --filename-template "{author}_{year}_{shorttitle}" --output-dir ./mdtero-output --json
mdtero translate <parse-task-id> --to zh-CN --wait --timeout 600 --json
mdtero translate paper.md --to zh-CN --wait --timeout 600 --json
mdtero rag status --json
mdtero rag query "What are the strongest findings?" --build-if-needed --json
mdtero rag build --wait --json
mdtero smoke --json --timeout 600 --interval 2
mdtero smoke --skip-translate --json
mdtero mcp briefing --json
mdtero mcp serve
mdtero agent detect --json
mdtero agent install --interactive
mdtero agent install --target codex
mdtero agent install --all
mdtero tui
Agent Targets
mdtero agent install --target claude_code
mdtero agent install --target codex
mdtero agent install --target gemini_cli
mdtero agent install --target hermes
mdtero agent install --target opencode
mdtero agent detect --json
mdtero agent install --interactive
mdtero agent install --all
mdtero agent uninstall --target codex
Run mdtero agent detect --json first when an agent or script needs a machine-readable list of detected workspaces, current install state, and the exact mdtero agent install --target ... command. For a human setup flow, mdtero agent install --interactive shows detected workspaces and lets you multi-select by number or target name; Enter installs detected pending targets. If --target is omitted, Mdtero detects existing ~/.codex, ~/.claude, ~/.gemini, ~/.hermes, and ~/.opencode directories and installs into the detected workspaces.
OpenClaw keeps the dedicated route:
clawhub install mdtero
RAG And Evidence Contract
The primary server-side RAG path is:
mdtero rag query "What are the strongest findings?" --build-if-needed --json
It can create, bind, import, build, and query from one agent-safe command. Query JSON returns extractive answer, stable citations, raw matches, LlamaIndex-style source_nodes, an evidence_pack.context_markdown, citation_contract.required_for_final_answer, reason_code, and next_commands for agents. Final answers must preserve citations plus source_nodes.
Explicit recovery/debug commands remain available when the one-command path is not enough:
mdtero project ingest --json
mdtero project create-server --json
mdtero project link --server-project-id <id> --json
mdtero rag status --json
mdtero rag build --wait --json
Extension-to-CLI Handoff
Extension-to-CLI handoff is the public recovery contract for publisher challenge pages, campus-network/session-bound access, and browser-saved files:
mdtero doctor --json
mdtero parse <doi-or-url> --trace --wait --timeout 300 --json
mdtero parse --file <paper.pdf|paper.epub|paper.html|paper.xml> --trace --wait --timeout 600 --json
mdtero status <task-id> --wait --timeout 300 --json
mdtero download <task-id> paper_md --output-dir ./mdtero-output --json
mdtero project ingest --json
mdtero rag query "<question>" --build-if-needed --json
mdtero rag query "What are the strongest findings?" --build-if-needed --json
mdtero mcp briefing --json
mdtero mcp serve
This path preserves client_acquisition, raw upload, status polling, reason_code, action_hint, download_artifacts, and next_commands instead of hiding failures inside the browser extension.
Current Alpha Scope
Validated in the current alpha:
- API-key login,
mdtero doctor,mdtero doctor --json, and local config; JSON diagnostics include safe auth/dependency/academic/Zotero/project/RAG summaries plusnext_commandswithout echoing secrets. - Deploy smoke with
mdtero smoke --json; it creates an isolated project, runs discovery, arXiv/DOI parse with task polling, artifact download, server-side RAG build/status/query, validatesmdtero mcp briefing --jsonexposesagent_briefing,server_rag_status,server_rag_build, andrag_query, and returns step-levelreason_code,action_hint, task ids, paths, server project id, plus top-levelprimary_failure,failed_steps, and recoverynext_commandswhen a smoke step fails. - Optional academic-key setup through either the interactive
mdtero config academicflow or headless flags such as--semantic-scholar-key <key> --json; JSON output reports configured keys without echoing secrets. - DOI/arXiv parse with task polling and Markdown/bundle download.
- Batch DOI/URL parse with
mdtero parse-batch dois.txt --wait --download paper_md --output-dir ./mdtero-output --json, writingmanifest.csvandfailed.csv. - PDF upload through the backend document parsing path, returning Markdown and zip artifacts when parsing succeeds.
- Local project init/add/remove/list/status, BibTeX import with de-duplication, project parse/refresh/download, and agent-readable JSON for project management commands.
- Zotero metadata import into a local Mdtero project, plus reverse sync of succeeded parse task notes/tags back to Zotero items imported after
0.2.0a7. - Discovery defaults to local multi-source search (
--sources free_core: OpenAlex, Semantic Scholar, Crossref, arXiv, PubMed, EuropePMC, PMC, bioRxiv/medRxiv, dblp, DOAJ, Zenodo, HAL, IACR, OpenAIRE, ChemRxiv;--sources alladds CORE/CiteSeerX/BASE/SSRN/Google Scholar/Unpaywall/IEEE/ACM). Optional free keys improve quotas. Sci-Hub download is opt-in and disabled by default.mdtero discover "<query>" --limit 5 --interactiveopens a paging/refinement session;--source serveris only a Mdtero API proxy fallback. status, waited parse results, and downloads exposequality_label/quality_warningfor low-content artifacts such asmetadata_only,abstract_only,section_only_fulltext, andlow_confidence_parse; Markdown downloads default toauthor_year_shorttitle.md, append.low_quality.mdfor low-confidence full text, and updatemanifest.csv.- Local route acquisition with
curl_cffifor backend-planned HTML/XML/EPUB/PDF source fetches, withhttpxfallback and visibleclient_acquisitiontrace output. - Server-side translation requests from parse task ids or local Markdown files.
- Local FastMCP project context server, including the
agent_briefingtool for one-call account status, project health, ready downloads, blocked items, RAG status, detected/installed/pending agent skills, recommended next commands, andmcp_tool_plan. - TUI dashboard command palette for copyable setup, discovery, parse, Zotero, RAG, MCP, and agent-install commands, with current next commands highlighted for workstation or local-agent handoff.
- Agent-facing CLI JSON and MCP payloads sanitize signed artifact URLs, bearer/API-key headers, Mdtero API keys, and common token query parameters before returning data to local agents. They keep
reason_code,action_hint,next_commands, and evidence fields visible. - Agent skill installation for Codex, Claude Code, Gemini CLI, Hermes, and OpenCode.
Shared /api/v1 server contract
| Purpose | Route |
|---|---|
| Route planning | /api/v1/route |
| Extension route planning | /api/v1/extension/route |
| DOI/URL parse task | /api/v1/tasks/parse |
| PDF/EPUB/XML/HTML upload | /api/v1/tasks/upload |
| Task status | /api/v1/tasks/{task_id} |
| Artifact download | /api/v1/tasks/{task_id}/download/{artifact} |
| Discovery search | /api/v1/discovery/search |
| Translation task | /api/v1/tasks/translate |
| Server project create/list/read | /api/v1/projects |
| Import parsed Markdown into a server project | /api/v1/projects/{project_id}/tasks/{task_id}/import |
| RAG status | /api/v1/projects/{project_id}/rag/status |
| Build backend RAG | /api/v1/projects/{project_id}/rag/build |
| Query backend RAG | /api/v1/projects/{project_id}/rag/query |
The CLI, extension, dashboard, and MCP briefing expose this contract so browser capture, CLI retry, raw upload, task polling, download, project import, and backend RAG handoff stay aligned.
Product Boundary
Mdtero Account is the control plane for Mdtero API keys, quota, billing, history, and install prompts. Academic source keys stay in local mdtero config academic configuration. The Python client owns local project state, BibTeX/Zotero import, TUI, MCP context, and agent skill installation. The backend owns parsing, discovery fallback, translation, task artifacts, and server-side RAG.
The browser extension stays a browser surface. It does not ship Python dependencies such as curl_cffi, pyzotero, or fastmcp; it only handles browser-context capture and user-selected file upload/download. When a publisher challenge, campus network, or logged-in browser session blocks automatic capture, hand the DOI, URL, or saved PDF/EPUB/XML/HTML file to the Python CLI.
Known boundaries:
mdtero zotero syncis conservative and does not rewrite Zotero bibliographic metadata.mdtero rag query --build-if-needed --jsonis the primary server-side RAG path.mdtero rag build,mdtero project create-server, andmdtero project ingestremain available for explicit recovery/debug workflows.- Parser engine selection is not a public product option. PDF parsing is handled by the backend, with internal fallback behavior owned by the service.
Repo Map
src/mdtero: Python CLI/TUI/client packageextension: MV3 browser extension source, tests, and build outputinstall: website install manifest and install guideskills: agent skill source mirrored into the Python CLI installerREADME_CN.md: Simplified Chinese README
Local Development
uv run --with pytest --with rich --with textual --with httpx --with requests --with curl_cffi --with pyzotero --with fastmcp pytest tests_py -q
uv run --with build python -m build --wheel
npm --prefix extension test
npm --prefix extension run build
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdtero-0.2.0a21.tar.gz.
File metadata
- Download URL: mdtero-0.2.0a21.tar.gz
- Upload date:
- Size: 605.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f1310528429929da909e8938b75d08e02a2d4171b318486fec357e43df62819
|
|
| MD5 |
3a4862d921450e44b8b903490d3568d6
|
|
| BLAKE2b-256 |
c9f369ea1574d67cd4b56629c9f148e7bc97712742f477672c4d7838e08e131d
|
Provenance
The following attestation bundles were made for mdtero-0.2.0a21.tar.gz:
Publisher:
publish-mdtero-pypi.yml on JonbinC/doi2md
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdtero-0.2.0a21.tar.gz -
Subject digest:
2f1310528429929da909e8938b75d08e02a2d4171b318486fec357e43df62819 - Sigstore transparency entry: 2237231896
- Sigstore integration time:
-
Permalink:
JonbinC/doi2md@46c35149076ad105c740a2820c426fed1ccd20b7 -
Branch / Tag:
refs/tags/cli/v0.2.0a21 - Owner: https://github.com/JonbinC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mdtero-pypi.yml@46c35149076ad105c740a2820c426fed1ccd20b7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mdtero-0.2.0a21-py3-none-any.whl.
File metadata
- Download URL: mdtero-0.2.0a21-py3-none-any.whl
- Upload date:
- Size: 223.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58f8172c529d7c0dc220184e04b21137624b8ef6f8859474d0d59f0704cf52f5
|
|
| MD5 |
bed50b9b11183e83953e50046114cc47
|
|
| BLAKE2b-256 |
33f7bac0e56db5de4c34b05fd5038f93a64035109ae2809226647d93c9f2df0f
|
Provenance
The following attestation bundles were made for mdtero-0.2.0a21-py3-none-any.whl:
Publisher:
publish-mdtero-pypi.yml on JonbinC/doi2md
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdtero-0.2.0a21-py3-none-any.whl -
Subject digest:
58f8172c529d7c0dc220184e04b21137624b8ef6f8859474d0d59f0704cf52f5 - Sigstore transparency entry: 2237232130
- Sigstore integration time:
-
Permalink:
JonbinC/doi2md@46c35149076ad105c740a2820c426fed1ccd20b7 -
Branch / Tag:
refs/tags/cli/v0.2.0a21 - Owner: https://github.com/JonbinC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mdtero-pypi.yml@46c35149076ad105c740a2820c426fed1ccd20b7 -
Trigger Event:
push
-
Statement type: