Use TREF directly from Claude Code with the MCP server.
claude mcp add tref -- tref-mcp
This registers the TREF MCP server with Claude Code.
Create a new TREF block from content.
// Claude Code will use this automatically
// Example: "Create a TREF block for this code snippet"
Create a child block from an existing parent.
// Preserves lineage and references
Check block integrity - verify ID matches content hash.
// Returns true if block is authentic, false if tampered
List all published TREF blocks.
// Shows block IDs and summaries
Get metadata for a specific block.
// Returns author, timestamp, refs, parent, etc.
Output the content of a block.
// Outputs raw content or JSON format
"Create a TREF block for the following code snippet with a
reference to the original Stack Overflow answer."
"Validate this TREF block and tell me if it's authentic."
"Derive a new block from sha256:abc123... with my
corrections to the algorithm."