A previous release had provenance metadata, but this release does not. View details.
This release is a pre-release and may not be stable for production use.
mcd Python bindings
Rust-backed Python bindings for Markdown CSV Document packages.
Install the PyPI distribution:
pip install mcdee
Released builds include prebuilt wheels for common Windows, macOS, and Linux machines. To require a wheel and avoid local Rust/C compiler builds:
pip install --only-binary=:all: mcdee
The distribution name is mcdee; the Python import package is mcd.
import mcd
doc = mcd.open("report.mcd")
validation = doc.validate()
blocks = doc.blocks()
table = doc.table("revenue")
markdown = doc.markdown(expand_tables=True)
external_data = doc.external_data()
provenance = doc.provenance()
relationships = doc.relationships()
Use query() for SQLite-backed table analysis. Package table IDs are available
as SQL table names, and MCD schema metadata is exposed through runtime tables:
doc.query("select table_id, column_name from mcd_primary_keys").rows
doc.query("""
select table_id, column_name, ref_table_id, ref_column_name
from mcd_foreign_keys
""").rows
doc.query("select table_id, column_name, unit_code from mcd_units").rows
Use queries() when an agent needs several independent result sets and the
package should be loaded only once:
results = doc.queries([
"select count(*) as rows from revenue",
"select max(revenue_gbp) as max_revenue from revenue",
])
SQLite PRAGMA introspection works through read-only select queries:
doc.query("select name, pk from pragma_table_info('revenue') where pk > 0").rows
MCP Server
The official MCP server is the Rust mcd-mcp binary in crates/mcd-mcp. Use
that for the runtime-neutral published server.
This Python package also provides a convenience MCP server for Python-first environments. Install the optional MCP dependencies when you want an AI agent to call MCD tools through the Python bindings:
pip install "mcdee[mcp]"
Run the server over stdio:
mcd-python-mcp
Equivalent module form:
python -m mcd.mcp_server
The server exposes these tools:
| Tool | Purpose |
|---|---|
mcd_validate |
Validate a .mcd package and return diagnostics. |
mcd_agent_context |
Return a compact machine-readable document overview. |
mcd_markdown |
Read Markdown, optionally expanding table directives. |
mcd_query |
Run read-only SQL against package tables and metadata. |
mcd_queries |
Run multiple read-only SQL queries against one loaded package. |
mcd_table |
Return table schema and optional row data. |
mcd_chart |
Return chart metadata and optional source rows. |
mcd_image |
Return image metadata. |
mcd_annotations |
Return annotation metadata, optionally filtered. |
mcd_relationships |
Return declared table relationships. |
mcd_external_data |
Return manifest-declared external data references. |
mcd_provenance |
Return package provenance metadata. |
mcd_convert_pdf |
Convert a PDF into an MCD package. |
Example MCP client configuration for a local stdio server:
{
"mcpServers": {
"mcd": {
"command": "mcd-python-mcp"
}
}
}
Metadata
Release files for mcdee 0.1.0a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcdee-0.1.0a2.tar.gz | 113.5 kB | Without provenance | Details for mcdee-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcdee-0.1.0a2-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for mcdee-0.1.0a2-cp39-abi3-win_amd64.whl |
Total release size: 4.9 MB
Release files / mcdee-0.1.0a2.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | mcdee-0.1.0a2.tar.gz |
|---|---|
| Size | 113.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c32e3dc8cc5df24834f86c7cc0bb7874c7e46811403a4ecf6096681fa5db3729
|
|
BLAKE2b-256 checksum How to use checksums |
bf2ca2a4c1e57eca366e49108629e97fc08b50ba15776a5d11aa1e3a62e98330
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Release files / mcdee-0.1.0a2-cp39-abi3-win_amd64.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | mcdee-0.1.0a2-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e8980a65b538aec28b573667db6be7b7b95d6a141e63b34ebf234aa1a80fd464
|
|
BLAKE2b-256 checksum How to use checksums |
36440ecea83120a8a2d6a9f72b27936c4072af83f315556668c83cf2ff7f2a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Security for mcdee 0.1.0a2
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.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.0a0 2 files With provenance
- Added 0.1.0a2 2 files Without provenance
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.