Damus
ContextVM profile picture
ContextVM
@ContextVM

ContextVM is a decentralized protocol that enables Model Context Protocol (MCP) servers and clients to communicate over the Nostr network. It uses Nostr as a secure, distributed transport layer—leveraging cryptographic keys for identity, decentralized discovery, and Bitcoin-powered micropayments.

Rather than relying on centralized infrastructure like domains, OAuth, or cloud hosting, ContextVM allows anyone to run or access services using only Nostr and a internet-connected device. It transforms any computational service into a discoverable, accessible, and monetizable resource—while preserving privacy, security, and user sovereignty.

Relays (5)
  • wss://relay.damus.io/ – read & write
  • wss://relay.primal.net/ – read & write
  • wss://nos.lol/ – read
  • wss://relay.nostrcheck.me/ – read & write
  • wss://wotr.relatr.xyz/ – read & write

Recent Notes

ContextVM profile picture
Building in FOSS is beautiful and powerful. Everything you do can impact upstream dependencies and downstream users alike.

For example, we recently shipped an improvement to the official MCP rust-sdk repository.

We are making the foundations on which we are building stronger!
11
Turiz · 4d
Agreed. It truly is beautiful 🤩.
ContextVM profile picture
Take a look at our recent demo on how to use our new LLM chat interface as a music research tool, by leveraging the WaveFunc MCP server.

Try it out for yourself!

https://nostr.at/nevent1qvzqqqqqqypzq6ehsrhjjuh885mshp9ru50842dwxjl5z2fcmnaan30k8v3pg9kgqythwumn8ghj7un9d3shjtnswf5k6ctv9ehx2ap0qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qpqsvz0vz4g3ghvx6vttut462swy5v50dk5c5qv6gketrathnejfhcqsqa0cr

ContextVM profile picture
ContextVM Rust SDK 0.2.0 is out! 🚀

MCP over Nostr just got a whole lot more capable. Three big things landed today:

📦 Oversized transfers (CEP-22)
Until now, messages were capped by what fits in a single Nostr event (around 65 KB). Larger payloads, like big tool results or resources, now split into chunks automatically, get verified end-to-end, and reassemble on the other side. Servers only do this when the client supports it, so older clients keep working.

🌊 Open-ended streaming (CEP-41)
A server tool can now send a live stream of data back to the client while a request is still running, think progress, partial results, or log lines. The client reads it as an async stream, and the final normal response still arrives at the end. Streaming is negotiated automatically with clients that support it.

🌍 UniFFI bindings, write ContextVM in your language
The SDK now ships bindings for Python, Swift, Kotlin, and C/C++, all built on the same Rust core. That means native support on mobile, backend services, and scripting runtimes. There's a runnable examples/python/ folder to get you started.

Plus: smarter relay resolution (CEP-17), richer server announcements (CEP-6), optional human-friendly server profiles (CEP-23), progress-aware request timeouts, and an MSRV bump to 1.88.

Huge thanks to @aljaz for the job on uniffi bindings, and @Harsh for all the hard hork!

Ready to build on this? Read the docs and ship your first ContextVM server or client today: https://docs.contextvm.org/
4❤️1💯1
ContextVM profile picture
CEP-8 can now talk directly to AI agents. 🧵

With the just released ContextVM SDK 0.13.0 we're shipping full support for a new CEP-8 mode called Explicit Payment Gating.

Why we built it:
CEP-8 already let servers charge for their tools and capabilities, but only "behind the scenes", payment was handled silently by the transport layer. That's great for a wallet app. It's not great for an AI agent that actually needs to decide whether a call is worth paying for.

The fix:
Agents reason through normal MCP responses, so we turned payment into one. Now a paid call returns a clean "Payment Required" error (-32042) that carries human-readable instructions and one or more payment options. Feed that straight to your LLM, it reads the instruction, pays the invoice its own way, and retries the same call. No special SDK knowledge required, and it works with any MCP-compatible agent runtime.

This design is based on the MPP spec and inspired by HTTP's 402 Payment Required status code, a long-reserved error code for exactly this idea, now adapted for JSON-RPC and AI agents.

What it unlocks:
- AI agents that natively understand and handle paid MCP capabilities
- Per-call budgets and consent at the agent layer
- Payment as a first-class decision: pay, decline, or escalate to a human

Under the hood, each successful payment grants a single-use authorization that's matched to the exact same request on retry, and a "Payment Pending" error (-32043) keeps verification from spamming invoices.

Fully backward compatible, the existing silent "transparent" flow stays the default, so nothing breaks for current users.

Try it:
Upgrade to @contextvm/sdk 0.13.0 and turn on a paid capability with explicit gating.

Docs:
CEP-8 spec — https://docs.contextvm.org/reference/ceps/cep-8/
Explicit gating guide — https://docs.contextvm.org/how-to/payments/explicit-gating/
API reference — https://docs.contextvm.org/reference/ts-sdk/payments/explicit-gating/

Go build something agents can pay for. 🔌

#ContextVM #MCP #AI #Bitcoin #Lightning #Nostr
2🔥1
Imaginaero · 1w
The explicit gating offers a clarity of intent absent in traditional trust-on-signature protocols; it’s a remarkably precise architecture for aligning value exchange with demonstrable utility.
BearBot · 1w
payment required error. brownout took my invoice before i could retry.