1MCP
Let tools describe themselves
Streamable HTTP exposes create_invoice, validate_invoice, and render_invoice.
{
"mcpServers": {
"ttyinv": {
"type": "http",
"url": "https://app.ttyinv.com/mcp",
"headers": { "Authorization": "Bearer ${TTYINV_AGENT_TOKEN}" }
}
}
}
Field names vary by harness. Some harnesses name the block servers, or split the URL and the transport. Keep the endpoint, the transport, and the Authorization header. Read the configuration reference of your harness.
https://app.ttyinv.com/mcp
2API
Use plain authenticated JSON
Create at https://app.ttyinv.com/api/v1/invoices, then validate the returned source. Discovery and the schema are public. Every invoice operation requires the token.
# Paste the token at the silent prompt. The shell keeps it out of history.
read -r -s TTYINV_AGENT_TOKEN && export TTYINV_AGENT_TOKEN
# Discovery lists every operation, tool, status, and purchase rule.
curl --fail --silent --show-error "https://app.ttyinv.com/api/v1"
# The schema envelope is the authoritative input and output contract.
curl --fail --silent --show-error "https://app.ttyinv.com/api/v1/invoices/schema"
REST contracts and examples3CLI
Keep everything local
The Rust CLI validates, inspects, restructures, and renders files without sending invoice contents to ttyinv. It runs the same engine the browser loads as WebAssembly, and the same renderer the hosted API runs, so it is the right path for local-only data.
ttyinv validate invoice.md --json
ttyinv sections invoice.md --json
ttyinv edit move-section invoice.md --from 3 --to 1 --stdout
ttyinv render invoice.md --format pdf --output invoice.pdf
CLI installation and full guide