Stamp
HTTPS URL Endpoint:
https://stamp-mcp.terradev.cloud
The concierge MCP for agentic workflows: the small tools agents reach for constantly -- NTP time and clock drift, UUIDs, diffs, safe arithmetic -- behind one endpoint. Zero dependencies, fully synchronous, raw JSON-RPC 2.0 over stdio -- no MCP library, no asyncio.
A single NTP query tells you where your clock is right now. Drift history
tells you where it is going: a clock that is consistently 200ms fast and
accelerating is a different problem than one that is stable at 200ms fast.
get_time takes the measurement; every call appends to a local log;
get_drift reads the log and reports the trend.
Install
pip install stamp-mcp
Use with Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"stamp": {
"command": "stamp-mcp"
}
}
}
Or run the module directly:
{
"mcpServers": {
"stamp": {
"command": "python3",
"args": ["-m", "stamp_mcp"]
}
}
}
Tools
get_time-- one NTP query: UTC time, this clock's offset in ms, network delay, stratum. Appends the sample to the drift log. Optional argument:server(defaulttime.cloudflare.com).get_drift-- analyzes the drift log: sample count, timespan, current/mean/stddev offset, drift rate in ms/day (least-squares fit), first-half vs. second-half rates, and a verdict:stable,drifting, oraccelerating. Optional argument:serverto filter samples.generate_uuid-- random UUIDv4s for records, sessions, and identifiers. Optional argument:count(1-1000, default 1).diff-- unified diff betweentext_aandtext_b, with added/removed line counts and anidenticalflag. Optional argument:context(lines of context, default 3).calculate-- safe math evaluator:+ - * / // % **, parentheses, functions (abs round min max sqrt floor ceil exp log log2 log10 pow sin cos tan), constantspi e tau inf. The expression is parsed to an AST and only whitelisted nodes are computed -- noeval(), no names, no arbitrary code. Required argument:expression.attest-- wrap any JSON payload in a tamper-evident record: a UUID, a timestamp (NTP-verified when reachable, local clock otherwise -- the record'stime_sourcesays which), and asha256over the canonical record. Required argument:payload. Optional:server.verify-- recompute an attested record's hash and compare. Returnsvalidpass/fail plus a reason; any modified field -- payload, timestamp, id -- breaks it. Required argument:attested.
The drift log
Every get_time call appends one JSON line to ~/.stamp/drift.jsonl
(override with STAMP_DRIFT_LOG). The file is capped at 10,000 samples.
Call get_time periodically -- a cron job, a heartbeat, or just asking
Claude "check the clock" now and then -- and get_drift turns the
accumulated offsets into a trend.
Hosted endpoint (streamable HTTP)
The same dispatch() also serves MCP's streamable-HTTP transport via
stamp_mcp/http_server.py -- still zero dependencies (http.server):
stamp-mcp-http # binds 127.0.0.1:8000
STAMP_PORT=9000 stamp-mcp-http # custom port
POST /mcp-- JSON-RPC requests (single or batch); notifications get202, requests get200 application/json.GET /mcp--405(no SSE streams; nothing server-initiated exists).GET /health--200for proxies and monitors.
TLS is terminated by a reverse proxy, not Python. The production layout
is two containers on one AWS instance, wired by docker-compose.yml:
stamp-- the server, built fromDockerfile, exposed only to the internal compose network. Drift log persists in thestamp-datavolume.caddy-- official Caddy image, terminates HTTPS atstamp-mcp.terradev.cloud(automatic Let's Encrypt once DNS points at the instance) and reverse-proxies tostamp:8000.
deploy/ also has a non-container path (stamp-mcp.service systemd unit,
deploy.sh) if you ever want to run it bare-metal.
Connecting to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ntp-scratch": {
"command": "/usr/bin/python3",
"args": ["/Users/theowolfenden/CascadeProjects/mcp-from-scratch/server.py"]
}
}
}
Restart Claude Desktop, then ask it "what tools do you have?" -- get_time
should appear. If it doesn't, check the logs at
~/Library/Logs/Claude/mcp*.log -- a stray print or missing flush is the
usual culprit.
The wire protocol, in one glance
>>> {"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
<<< {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05",...}}
>>> {"jsonrpc":"2.0","method":"notifications/initialized"} (no reply)
>>> {"jsonrpc":"2.0","id":2,"method":"tools/list"}
<<< {"jsonrpc":"2.0","id":2,"result":{"tools":[...]}}
>>> {"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"get_time","arguments":{}}}
<<< {"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"..."}]}}
DISCLAIMER Stamp queries public NTP infrastructure (Cloudflare, stratum 3) and is suitable for general agentic workflows. It is not intended for use cases requiring certified atomic precision, legal timestamp authority, or regulated audit trails. Use in production systems is at the implementer's risk.
Metadata
Release files for stamp-mcp 0.5.2
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 | |
|---|---|---|---|---|
| stamp_mcp-0.5.2.tar.gz | 19.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stamp_mcp-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.5 kB
Release files / stamp_mcp-0.5.2.tar.gz
| Download URL | stamp_mcp-0.5.2.tar.gz |
|---|---|
| Size | 19.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4177d9baa765d451c0e9a5e88a6f42a2b0d391c4106b3f15ef33fc552155e617
|
|
BLAKE2b-256 checksum How to use checksums |
bac7858e28a9d5fe14057fad79e25f03b7a72e93e4a95cfbf6c1f47cc50d58e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / stamp_mcp-0.5.2-py3-none-any.whl
| Download URL | stamp_mcp-0.5.2-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ddc887ad8ad8f6d5d7262c0228b580889fd29d96ee7ca954089705204ae29a5
|
|
BLAKE2b-256 checksum How to use checksums |
06f28b2447612de921a3456e40a6932d4a4599a96ec9e50efdb9248903c3ee0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for stamp-mcp 0.5.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.