Trestle MCP
MCP server to easily use compliance-trestle (OSCAL tool) from OpenCode, Claude, or any MCP-compliant client.
mcp-name: io.github.oscal-compass/compliance-trestle-mcp
Getting Started
This project can be used in the following two ways:
- Usage from a coding agent (OpenCode): Use Trestle-MCP from OpenCode via MCP.
- Usage from CLI (MCP Client): Invoke Trestle-MCP directly using an MCP CLI client.
Choose the option that best fits your workflow.
Usage from OpenCode
-
Add the following to
opencode.jsonin your workspace:{ "mcp": { "trestle": { "type": "local", "command": ["uvx", "--from", "compliance-trestle-mcp==<version>", "trestle-mcp"], "environment": { "TRESTLE_MCP_TOOLS": "all" }, "enabled": true } } }
Replace
<version>with the release you want; drop==<version>to track the latest.TRESTLE_MCP_TOOLSchooses how much of the command surface to expose —allis every tool, and the default without it is the authoring lifecycle. See Choosing which tools are exposed. -
Open OpenCode, confirm the
trestletools are listed, and execute as needed.https://github.com/user-attachments/assets/a85b0927-4981-41d1-9a03-f22becb7a6e2
Usage from CLI (MCP Client)
Step 1: Write your mcp.json config
{
"mcpServers": {
"trestle": {
"command": "uvx",
"args": ["--from", "./trestle-mcp-tmp", "trestle-mcp"]
}
}
}
Save this as mcp.json in your current directory.
Step 2: List Available Tools
uvx mcp-cli tools --config-file mcp.json
Sample output (tools available):
13 Available Tools
┌─────────┬───────────────────────────────────┬───────────────────────────────────────────────────────────────────┐
│ Server │ Tool │ Description │
├─────────┼───────────────────────────────────┼───────────────────────────────────────────────────────────────────┤
│ trestle │ trestle_init │ Initialize a trestle working directory. │
│ trestle │ trestle_import │ Import an existing OSCAL model into the trestle workspace. │
│ trestle │ trestle_validate │ Validate a standalone OSCAL file against the OSCAL schema. │
│ trestle │ trestle_author_catalog_generate │ Generate Catalog controls in markdown form from a catalog. │
│ trestle │ trestle_author_catalog_assemble │ Assemble markdown files of controls into a Catalog json file. │
│ trestle │ trestle_author_profile_generate │ Generate markdown documentation set for controls in a profile. │
│ trestle │ trestle_author_profile_assemble │ Assemble markdown controls into a Profile JSON file. │
│ trestle │ trestle_author_profile_resolve │ Resolve an OSCAL profile to a resolved profile catalog. │
│ trestle │ trestle_author_component_generate │ Generate component markdown from a component-definition. │
│ trestle │ trestle_author_component_assemble │ Assemble markdown controls into a component-definition json file. │
│ trestle │ trestle_task_csv_to_oscal_cd │ Convert a CSV file to an OSCAL component definition. │
│ trestle │ trestle_task_csv_to_oscal_mc │ Convert a CSV file to an OSCAL mapping collection. │
│ trestle │ trestle_task_xlsx_to_oscal_poam │ Convert a FedRAMP XLSX spreadsheet to an OSCAL POA&M. │
└─────────┴───────────────────────────────────┴───────────────────────────────────────────────────────────────────┘
Those 13 are the default selection. The server implements 29 tools in all: 28
that groups can select, plus trestle_remove, which is registered only when
named explicitly. See
Choosing which tools are exposed, and
Commands deliberately not covered
for the parts of the trestle CLI that have no tool and why.
Step 3: Execute a Tool (e.g., trestle_init)
Start MCP interactive shell:
uvx mcp-cli interactive --config-file mcp.json
Then run, for example:
> execute trestle_init '{"params": {}}'
Typical result:
✓ ✅ Tool executed successfully
{
"result": {
...
"content": [
{
"type": "text",
"text": "✅ Trestle workspace initialized successfully"
}
]
}
}
You'll see folders as follows:
assessment-plans catalogs plan-of-action-and-milestones system-security-plans
assessment-results component-definitions profiles
Choosing which tools are exposed
Every tool a server registers costs the caller context: an MCP client loads each tool's name, input schema and description into the model's context window on every session. This server covers the trestle command surface an agent should drive, but exposes only the authoring lifecycle unless you ask for more, so a session carries the part of that surface it will actually call and the rest is one setting away.
The selection is a comma-separated list of group names and/or individual tool
names, read from the --tools flag or the TRESTLE_MCP_TOOLS environment
variable. The flag wins over the environment variable. Naming something that
does not exist fails at startup with the list of valid names, rather than
starting up with the tool quietly missing — and the flag has to be spelled in
full, so a config file carrying --tool is rejected instead of guessed at.
| Value | Tools | tools/list chars |
Meaning |
|---|---|---|---|
authoring |
13 | 47,342 | The curated authoring lifecycle. The default. |
core |
12 | 39,668 | The top-level trestle commands |
author |
11 | 39,684 | Every trestle author subcommand wrapper |
task |
5 | 20,318 | Every trestle task wrapper, including the generic runner |
all |
28 | 99,668 | Everything a group can select |
trestle_author_ssp_generate |
1 | 4,630 | Any single tool, by its registered name |
The default is less than half the size of all, and selections combine, so you
pay only for what you name. Measure any selection yourself with
python scripts/tool_context_cost.py; see
What each tool selection costs in context for the
current figures per selection and per tool, and for how to narrow the default
further.
core, author and task mirror the trestle CLI's own command structure, so
which tool is in which group follows from the CLI. authoring is the one
curated preset that cuts across them.
Tools no group selects. trestle_remove deletes an element from a model in
place, with no backup, so no group selects it — all included. It is registered
only when the selection names it exactly, e.g. authoring,trestle_remove.
Default (the authoring lifecycle) — no configuration needed:
{
"mcpServers": {
"trestle": {
"command": "uvx",
"args": ["--from", "compliance-trestle-mcp", "trestle-mcp"]
}
}
}
Everything, via the environment variable:
{
"mcpServers": {
"trestle": {
"command": "uvx",
"args": ["--from", "compliance-trestle-mcp", "trestle-mcp"],
"env": { "TRESTLE_MCP_TOOLS": "all" }
}
}
}
A mixed selection, via the flag — the authoring lifecycle plus SSP generation and the generic task runner:
{
"mcpServers": {
"trestle": {
"command": "uvx",
"args": [
"--from", "compliance-trestle-mcp", "trestle-mcp",
"--tools", "authoring,trestle_author_ssp_generate,trestle_task_run"
]
}
}
}
The examples above use the mcpServers shape most MCP clients take. OpenCode
spells the same things differently — mcp rather than mcpServers, command
as one array instead of a command plus args, and environment rather than
env — so the "everything" selection looks like
the entry at the top of this README.
Run trestle-mcp --help for the group list, and watch stderr on startup for the
line reporting the selection and how many tools it registered.
Tool List & Quick Reference
Tools marked (default) are in the authoring preset.
core — top-level trestle commands
trestle_init(default): Initialize a trestle workspacetrestle_import(default): Import OSCAL models (Catalog/Profile/etc.) from a file or URLtrestle_validate(default): Validate a standalone OSCAL file (any top-level model, e.g. POA&M) against the OSCAL schema (and trestle's semantic checks)trestle_create: Create a sample OSCAL model, or a new element inside an existing model filetrestle_assemble: Assemble a split model into a single file underdisttrestle_split: Split subcomponents of a model into separate filestrestle_merge: Merge split subcomponents back into a modeltrestle_describe: Describe the contents of a model file, optionally at an element pathtrestle_replicate: Copy a top-level model to a new name, optionally with fresh uuidstrestle_href: List or repoint the import hrefs of a profiletrestle_partial_object_validate: Validate a single OSCAL object held in a filetrestle_version: Report the trestle and OSCAL versions, or a model's own document version (metadata.version, not its OSCAL version)
author — trestle author subcommands
trestle_author_catalog_generate(default): Generate markdown controls from a catalogtrestle_author_catalog_assemble(default): Assemble markdown controls back into a catalog JSONtrestle_author_profile_generate(default): Generate markdown for profilestrestle_author_profile_assemble(default): Assemble markdown controls into profile JSONtrestle_author_profile_resolve(default): Resolve a profile to a catalogtrestle_author_profile_inherit: Derive a profile from a parent profile and a leveraged SSPtrestle_author_component_generate(default): Generate markdown from a component definitiontrestle_author_component_assemble(default): Assemble markdown back into a component definitiontrestle_author_ssp_generate: Generate SSP markdown from a profile and component definitionstrestle_author_ssp_assemble: Assemble SSP markdown into a system-security-plan JSONtrestle_author_ssp_filter: Filter an SSP by profile, components, implementation status or control origination
task — trestle task wrappers
trestle_task_csv_to_oscal_cd(default): Convert a CSV mapping file into an OSCAL component definitiontrestle_task_csv_to_oscal_mc(default): Convert a CSV crosswalk into an OSCAL mapping collectiontrestle_task_xlsx_to_oscal_poam(default): Convert a FedRAMP-format XLSX spreadsheet into an OSCAL Plan of Action and Milestones (POA&M)trestle_task_list: List the available trestle tasks, or describe one task's configuration keystrestle_task_run: Run any trestle task from a configuration dictionary
trestle_task_run covers every task the installed trestle provides, including
ones with no typed tool here. Prefer the typed tools where they exist: they
validate their arguments and document the input format.
Not covered
The signing and provenance commands (sign, verify, generate-manifest,
sign-manifest, verify-manifest, canonicalize), the beta feature-flag
command, and the markdown governance commands (author docs, author folders,
author headers, author jinja) have no tools here. The reasons are recorded
in the development guide.
For advanced use, refer to the official compliance-trestle docs; to add or change a tool here, see the development guide.
Troubleshooting & Help
- Make sure uvx is installed and on your PATH.
- If you see command/module errors, check the MCP server path in
mcp.jsonis correct.
We are a Cloud Native Computing Foundation sandbox project.
The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see Trademark Usage.
OSCAL Compass is an independent open source project. It is not affiliated with, endorsed by, or sponsored by the National Institute of Standards and Technology (NIST) or any other government agency.
OSCAL Compass was originally contributed by IBM.
Metadata
Release files for compliance-trestle-mcp 1.0.0
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 |
|---|---|---|---|---|
| compliance_trestle_mcp-1.0.0.tar.gz | 168.8 kB | With provenance | Details for compliance_trestle_mcp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| compliance_trestle_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for compliance_trestle_mcp-1.0.0-py3-none-any.whl |
Total release size: 248.9 kB
Release files / compliance_trestle_mcp-1.0.0.tar.gz
| Download URL | compliance_trestle_mcp-1.0.0.tar.gz |
|---|---|
| Size | 168.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
764d731130345d3090d9fe0fec5a910370e6100e0f832e157b312ad7a942062b
|
|
BLAKE2b-256 checksum How to use checksums |
60c14ebb0bbb73e33565df99d422b965e8a3ea3576edbf1b3aa82726ed643bd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / compliance_trestle_mcp-1.0.0-py3-none-any.whl
| Download URL | compliance_trestle_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 80.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95dde8d9814738858b114703bbcdd9dc03dbd1b5806cbc541b728fb92617be97
|
|
BLAKE2b-256 checksum How to use checksums |
58429fb5e957f0d6fddd5dba4fa0a829bb3f629119762aafce9ced1ce916c752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for compliance-trestle-mcp 1.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for compliance_trestle_mcp-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA 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.