overview

Understand ContextVM protocol fundamentals, architecture, and core concepts. Use when users need to learn about ContextVM basics, how it bridges MCP with Nostr, protocol design principles, event kinds, or the relationship between MCP and Nostr in decentralized communication.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "overview" with this command: npx skills add contextvm/cvmi/contextvm-cvmi-overview

ContextVM Overview

ContextVM (Context Virtual Machine) is a protocol that bridges the Model Context Protocol (MCP) with the Nostr network, enabling decentralized communication between MCP servers and clients.

Core Concept

ContextVM operates as a transport layer for MCP, using Nostr's relay network as the communication mechanism while preserving MCP's JSON-RPC semantics.

┌─────────────────────────────────────────────────────────────┐
│                    MCP Application Layer                     │
│         (Tools, Resources, Prompts, Sampling)               │
├─────────────────────────────────────────────────────────────┤
│                 ContextVM Transport Layer                    │
│    (Nostr events, Encryption, Public Key Cryptography)      │
├─────────────────────────────────────────────────────────────┤
│                     Nostr Relay Network                      │
│              (wss://relay.contextvm.org, etc.)              │
└─────────────────────────────────────────────────────────────┘

Key Features

  • Decentralized Communication: No central servers required; use Nostr's distributed relay network
  • Security First: Leverages Nostr's cryptographic primitives for verification and authorization
  • Public Key Identity: Servers and clients identified by Nostr public keys
  • Optional Encryption: End-to-end encryption via NIP-44 gift wrapping
  • Server Discovery: Public server announcements via replaceable events

Protocol Architecture

Three-Layer Design

  1. Transport Layer: Nostr events and relays
  2. Message Layer: JSON-RPC MCP messages embedded in event content
  3. Metadata Layer: Nostr event tags for addressing and correlation

Main Actors

ActorRoleIdentification
ServersExpose MCP capabilitiesPublic key + relays
ClientsConsume server capabilitiesPublic key
RelaysPropagate messagesURL (wss://...)

Event Kinds

ContextVM uses these Nostr event kinds:

KindPurposePersistence
25910All ContextVM messages (ephemeral)Not stored by relays
11316Server announcementReplaceable
11317Tools listReplaceable
11318Resources listReplaceable
11319Resource templates listReplaceable
11320Prompts listReplaceable
1059Gift wrap (encrypted messages)Ephemeral

Message Flow

Connection Process

  1. Discovery: Client discovers server via public key or relay queries
  2. Initialization: Standard MCP handshake over Nostr
  3. Operation: Client calls tools/lists resources via kind 25910 events
  4. Termination: Connection closes when either party disconnects

Event Structure

{
  "kind": 25910,
  "pubkey": "<sender-public-key>",
  "content": "{\"jsonrpc\":\"2.0\",...}",
  "tags": [
    ["p", "<recipient-public-key>"],
    ["e", "<correlation-event-id>"]
  ]
}

Security Model

Public Key Cryptography

  • All messages cryptographically signed
  • Server identity = public key (portable across relays)
  • Client authorization via public key whitelisting

Encryption (CEP-4)

  • Optional NIP-44 encryption via gift wrap (kind 1059)
  • Negotiated during initialization
  • Servers advertise support via support_encryption tag

The Nostr Way

ContextVM follows the same core pattern as other Nostr-based RPC systems (like DVMs): publish a signed request event, listen for a correlated response. The difference is in the message structure—CVM uses JSON-RPC via MCP rather than provider-specific payloads.

To understand this foundation:

Reference Materials

For detailed specifications, see:

Ecosystem Navigation (what to use when)

Use this decision table to jump to the right component / skill:

GoalRecommended pathSkill
Learn the protocol and message kindsRead spec + CEPsSKILL.md + references/protocol-spec.md
Understand core concepts, architecture, FAQsConcepts and architectural overview../concepts/SKILL.md
Build a new ContextVM-native serverMcpServer + NostrServerTransport../server-dev/SKILL.md
Build a new ContextVM-native clientClient + NostrClientTransport../client-dev/SKILL.md
Bridge an existing MCP server to NostrGateway pattern (NostrMCPGateway)../server-dev/references/gateway-pattern.md
Bridge an existing MCP client to NostrProxy pattern (NostrMCPProxy)../client-dev/references/proxy-pattern.md
SDK-level details (interfaces, constants, logging)@contextvm/sdk reference../typescript-sdk/SKILL.md
Add payments to capabilities (CEP-8)Payments middleware + processors../payments/SKILL.md
Production operations (keys, Docker, monitoring)Deployment checklist../deployment/SKILL.md
Diagnose connection issues, errors, failuresTroubleshooting guide../troubleshooting/SKILL.md

Useful public entry points:

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

concepts

No summary provided by upstream source.

Repository SourceNeeds Review
General

payments

No summary provided by upstream source.

Repository SourceNeeds Review
General

troubleshooting

No summary provided by upstream source.

Repository SourceNeeds Review
General

deployment

No summary provided by upstream source.

Repository SourceNeeds Review