
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
pi-mdxml-context
Advanced tools
Pi extension that converts Markdown context to XML-like structure at model send time
Convert Markdown context to XML-like structure at model send time while keeping the original Markdown in session history.
pi-mdxml-context is a Pi extension for agent workflows where Markdown is convenient for humans, but explicit XML-like boundaries can make complex context easier for models to parse.
It converts loaded Markdown context files and recent Markdown tool results before each model request. Saved session history stays in Markdown; conversion happens only in the provider-bound context.
Install the published npm package with Pi:
pi install npm:pi-mdxml-context
Pin a specific version when you want reproducible installs:
pi install npm:pi-mdxml-context@0.1.13
Install into the current project instead of your user Pi settings:
pi install npm:pi-mdxml-context -l
Or install from GitHub:
pi install git:github.com/eiei114/pi-mdxml-context
Try it without permanently installing:
pi -e npm:pi-mdxml-context
After install, reload Pi if needed:
/reload
Check that conversion is active:
/mdxml:status
Preview XML-like output for a Markdown file:
/mdxml:preview path/to/file.md
For commands, output shape, runtime hooks, and safety behavior, see docs/usage.md.
| Command | Description |
|---|---|
/mdxml:on | Enable send-time conversion. |
/mdxml:off | Disable send-time conversion. |
/mdxml:status | Show conversion state and recent stats. |
/mdxml:preview <path> | Preview XML-like output for a Markdown file. |
/mdxml:preview recent:N | Preview XML-like output for a recent Markdown tool result. |
Conversion is enabled by default after the extension loads. Use /mdxml:off to disable it immediately.
| Path | Purpose |
|---|---|
index.ts | Pi TypeScript extension entrypoint |
tests/ | Converter, runtime hook, and preview tests |
docs/ | Usage and release docs (usage.md, release.md) |
README.md | Public entrypoint (this file) |
CHANGELOG.md | Version history |
CODE_OF_CONDUCT.md | Contributor Covenant code of conduct |
CONTRIBUTING.md | Contribution guidelines |
SECURITY.md | Vulnerability reporting |
LICENSE | MIT license |
npm install
npm run check
npm test
Before opening a PR with publishable changes, bump package.json and update CHANGELOG.md in the same PR. CI runs npm run version:check on pull requests.
This package uses npm Trusted Publishing with GitHub Actions OIDC — no NPM_TOKEN is required.
On main, a version bump in package.json triggers Auto Release, which creates the semver tag and GitHub Release, then dispatches Publish to npm (publish.yml).
See docs/release.md for setup details and tag-to-npm verification steps. See CHANGELOG.md for semver history.
Pi packages run with your local permissions. Review extensions before installing third-party packages.
For vulnerability reporting, see SECURITY.md.
MIT
FAQs
Pi extension that converts Markdown context to XML-like structure at model send time
The npm package pi-mdxml-context receives a total of 59 weekly downloads. As such, pi-mdxml-context popularity was classified as not popular.
We found that pi-mdxml-context demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.