Skip to main content
Glama
attestedintelligence

AGA-mcp-server

aga_export_bundle

Package artifacts, receipts, and Merkle proofs for offline verification to ensure tamper-evident continuity and cryptographic attestation.

Instructions

Package artifact + receipts + Merkle proofs for offline verification. (Claim 9)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the `aga_export_bundle` tool. It retrieves the latest artifact, checkpoint, and receipts, generates inclusion proofs, and creates a bundle for offline verification.
    export async function handleExportBundle(_args: Record<string, never>, ctx: ServerContext) {
      const artifact = await ctx.storage.getLatestArtifact();
      if (!artifact) return ctx.error('No artifact');
      const cp = await ctx.storage.getLatestCheckpoint();
      if (!cp) return ctx.error('No checkpoint. Call aga_create_checkpoint first.');
      const receipts = await ctx.storage.getReceiptsByArtifact(hashArtifact(artifact));
      const batchEvents = await ctx.storage.getEvents(cp.batch_start_sequence, cp.batch_end_sequence);
      const proofs = receipts
        .filter(r => r.sequence_number >= cp.batch_start_sequence && r.sequence_number <= cp.batch_end_sequence)
        .map(r => eventInclusionProof(batchEvents, r.sequence_number));
      const bundle = generateBundle(artifact, receipts, proofs, cp, ctx.portalKP);
      return ctx.json({
        success: true,
        bundle,
        offline_verifiable: true,
        receipt_count: receipts.length,
        proof_count: proofs.length,
      });
    }
  • src/server.ts:200-205 (registration)
    The registration of the `aga_export_bundle` tool within the MCP server using the `governedTool` helper.
    // 10. aga_export_bundle (governed)
    governedTool('aga_export_bundle',
      'Package artifact + receipts + Merkle proofs for offline verification. (Claim 9)',
      {},
      async () => handleExportBundle({} as any, ctx),
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/attestedintelligence/aga-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server