Skip to main content
Glama
otskit-mcp

otskit-mcp

@otskit/mcp

CI npm version npm downloads TypeScript Node Coverage Quality Gate License

OpenTimestamps MCP server - stamp, upgrade, and verify Bitcoin timestamps via AI agents.

Exposes a set of tools to any MCP-compatible agent so it can timestamp documents, monitor confirmation status, and verify proofs against the Bitcoin blockchain - all from a conversation.

This is an independent implementation of the OpenTimestamps protocol. It is not affiliated with, endorsed by, or maintained by the OpenTimestamps project.

Note on confirmation times: After stamping, a proof is pending until Bitcoin confirms it. Confirmations typically arrive within ~60 minutes, but can take several hours during network congestion. Use ots-mcp watch or upgrade_timestamp to monitor. A pending proof is not a failed proof.

Install

npm install -g @otskit/mcp

Related MCP server: vtimestamp-mcp-write

Agent setup

ots-mcp setup claude        # Claude Desktop
ots-mcp setup claude-code   # Claude Code CLI
ots-mcp setup codex         # Codex CLI

Each command writes the MCP entry into the agent's config file, makes a .bak backup if the file already exists, and skips if ots-mcp is already configured. Restart the agent afterwards to apply the changes.

CLI commands

Command

Description

ots-mcp serve

Start the MCP server (stdio transport)

ots-mcp stamp <sha256>

Stamp a SHA-256 hash against Bitcoin calendars

ots-mcp upgrade <id>

Check if a pending stamp has been confirmed

ots-mcp verify <id>

Verify a stamp against Bitcoin

ots-mcp list [status]

List stamps (pending / confirmed / failed)

ots-mcp watch [minutes]

Monitor pending stamps and attempt due upgrades (default: 30 min, minimum: 15 min)

ots-mcp check-pending

Run one upgrade pass over all pending stamps

ots-mcp scheduler install|remove|status

Manage OS-level scheduler for auto-upgrades

ots-mcp backup [dest]

Backup the SQLite database

ots-mcp setup <claude|claude-code|codex>

Configure MCP for an agent

MCP tools exposed to agents

Tool

Description

create_timestamp

Stamp a SHA-256 hash against 4 public OTS calendars

upgrade_timestamp

Check if a pending stamp has been confirmed in Bitcoin

verify_timestamp

Verify a stamp - proves hash existed before a given Bitcoin block

verify_external_proof

Verify a whitelisted local file against its external .ots proof, without changing the local stamp store

inspect_timestamp

Inspect a stored proof file without network calls

list_pending

List stamps with status, retry count, and filters

watch

Open a terminal window monitoring pending stamps and attempting due upgrades

hash_file

Compute the SHA-256 of a local file and return it as a 64-char hex string (no network calls)

stamp_file

Compute SHA-256 of a local file and stamp it on Bitcoin in one step

Data directory

All data is stored in ~/.ots-mcp/:

~/.ots-mcp/
  ots-mcp.db       # SQLite database (stamps, proof files)
  config.json      # Optional config overrides
  ots-mcp.log      # Log file

Configuration

Create ~/.ots-mcp/config.json to override defaults:

{
  "stamp_enabled": true,
  "scheduler_interval_minutes": 30,
  "retry_max_attempts": 20,
  "calendar_timeout_ms": 10000,
  "calendars": [
    "https://alice.btc.calendar.opentimestamps.org",
    "https://bob.btc.calendar.opentimestamps.org",
    "https://finney.calendar.eternitywall.com",
    "https://btc.calendar.catallaxy.com"
  ]
}

Development

npm run build    # production build
npm run dev      # watch mode
npm test         # run tests

Dependencies

Requires Node.js >= 20.

Available Tools

9 tools
create_timestampA

Creates a verifiable Bitcoin timestamp for a SHA-256 hash using the OpenTimestamps protocol. Submits the hash to four public OTS calendars (alice.btc, bob.btc, finney, catallaxy) and stores a pending proof locally. Returns a stamp ID to track confirmation status. Confirmation typically takes ~60 minutes but can take several hours during network congestion.

Inputs: hash (required).

hash_fileA
Read-onlyIdempotent

Computes the SHA-256 hash of a local file and returns it as a 64-character hex string. Purely local — no network calls, no data stored. Use this to get the hash before calling create_timestamp, or to verify the integrity of a file independently.

Inputs: path (required).

inspect_timestampA
Read-onlyIdempotent

Reads a stored proof file from disk without any network calls. Returns proof metadata including size, number of calendar attestations (pending promises from OTS servers) and Bitcoin attestations. has_bitcoin_attestation reports only what the file claims — it is a structural check, not evidence that Bitcoin backs the claim. Use verify_timestamp, which checks the block header on-chain, before telling a user that a stamp is confirmed.

Inputs: id (required).

list_pendingA
Read-onlyIdempotent

Lists stamp records from the local database with their current status, retry count, and next scheduled upgrade time. Filter by status (pending, confirmed, failed), page through results, or find stamps older than N hours. Use this to monitor the state of all timestamped hashes.

Inputs: limit, offset, status, older_than_hours.

stamp_fileA

Convenience tool that hashes a local file and stamps it on Bitcoin in one step. Computes the SHA-256 of the file, then submits it to four public OTS calendars. The file contents are never sent externally — only the hash is. Returns a stamp ID for tracking confirmation.

Inputs: path (required).

upgrade_timestampA
Idempotent

Attempts to upgrade a pending OpenTimestamps proof by fetching the latest merkle tree from the calendars. If Bitcoin has included the timestamp, the proof becomes confirmed and the bitcoin_block is recorded. Safe to call repeatedly — if not yet confirmed, it schedules the next retry automatically.

Inputs: id (required).

verify_external_proofA
Read-onlyIdempotent

Verifies an external OpenTimestamps .ots file against its covered local file. Both paths must pass the configured directory whitelist; the covered file uses the preservation size cap and the receipt has a separate 1 MiB cap. It does not read or modify the local stamp store. A confirmed result proves the file hash existed before the reported Bitcoin block; it does NOT prove authorship, content truth, legal validity, or preservation of linked assets.

Inputs: file_path (required), proof_path (required).

verify_timestampA
Read-onlyIdempotent

Verifies a timestamp proof against the Bitcoin blockchain via an Esplora API. Proves that a specific hash existed before a given Bitcoin block height. Does NOT affirm document authorship, content truth, or legal validity — it only provides a cryptographic proof of existence at a point in time.

Inputs: id (required).

watchA

Opens a new terminal window that continuously monitors pending stamps and attempts due upgrades at each interval. Useful for long-running monitoring sessions after stamping. The window remains open so the user can watch confirmation progress in real time. Minimum interval is 15 minutes to avoid hammering OTS calendars.

Inputs: interval_minutes.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool maps to a distinct stage of the timestamping workflow: hashing, stamping, monitoring, upgrading, and verifying. Even the overlapping create_timestamp and stamp_file are clearly differentiated as hash-based vs. file convenience operations.

    Naming Consistency4/5

    Most tools follow a clear verb_noun snake_case pattern such as hash_file, create_timestamp, and verify_external_proof. The single-verb watch and adjective-based list_pending are minor deviations from an otherwise predictable scheme.

    Tool Count5/5

    Nine tools is a well-scoped count for an OpenTimestamps-based server. Each tool serves a meaningful step in the lifecycle without unnecessary redundancy, and the convenience tools are justified by common workflows.

    Completeness5/5

    The tool set covers the full OpenTimestamps lifecycle: hashing, creating timestamps, stamping files, listing pending proofs, upgrading, and verifying both internal and external proofs. No critical missing operation is apparent for the domain.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to create document timestamps on a VerusID, writing directly to the Verus blockchain via a local or remote daemon.
      42 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Append-only evidence receipts for AI records: seal, verify, cite, chain-check, anchor status. A seal proves a record existed at a time, not that its contents are true. Five tools over stdio with npx -y apex-psi-mcp — no account, no key, verification free forever.
      5
      826 npm
      1
      MIT