+ Host your own ContextVM server +
++ Expose any MCP server to the decentralised Nostr network in minutes. + Pick your path below. +
++ The quickest way to get a server running. No code required — CVMI handles + keys, relays, and encryption for you with a single terminal command. +
+ +Check prerequisites
++ You need Node.js 18 or higher installed. That's it — no global installs required. +
+
+ Check your Node version: node --version
+
+ Verify CVMI works
++ No installation needed. Run this once to confirm everything is set up correctly. +
+npx cvmi --help
+
+ + You should see a list of available commands. If you do, you're ready. ++
Start your server
++ This exposes a local filesystem MCP server to the Nostr network. + A cryptographic key pair is auto-generated for you. +
+npx cvmi serve -- npx -y @modelcontextprotocol/server-filesystem /tmp
+
+
+ Your server's public key (npub1...) will print in the terminal.
+ Save it — you'll need it to connect clients.
+
+ Connect a client
++ From any machine with CVMI installed, connect to your server using its public key. + This creates a local stdio proxy that bridges your Nostr-hosted server to any + standard MCP client. +
+npx cvmi use npub1q...
+
+ Optional: configure your server
+
+ Create a .cvmi.json in your project folder to use a persistent
+ private key, specific relays, or required encryption.
+
{`{
+ "serve": {
+ "privateKey": "nsec1...",
+ "relays": ["wss://relay.damus.io"],
+ "encryption": "required",
+ "public": true
+ }
+}`}
+ + Full reference: + + docs.contextvm.org/cvmi/configuration + ++
+ For building custom servers or embedding ContextVM directly into your application. + The SDK gives you full control over transport, signing, and relay management. +
+ +Install the SDK
++ Add the ContextVM TypeScript SDK to your project. +
+npm install @contextvm/sdk
+
+ Understand the core building blocks
++ Before writing code, get familiar with the three concepts every ContextVM + integration is built on: transports, signers, + and relay handlers. +
++ Start with the + + SDK Quick Overview + + — it maps out what each module does and how they fit together. ++
Choose the right transport for your use case
++ The SDK provides two Nostr transports for hosting: +
+NostrServerTransport
++ Used by MCP servers to expose their capabilities through Nostr. + Use this when building a custom server from scratch. +
+ + Server transport docs → + +NostrClientTransport
++ Used by MCP clients to connect to remote servers exposed via Nostr. + Use this when building a custom client. +
+ + Client transport docs → + ++ If you want to expose an already-existing MCP server to Nostr + without rewriting it, use + NostrMCPGateway + instead. To consume a CVM server in a standard MCP host, use + NostrMCPProxy. ++
Follow the client-server tutorial
++ Work through the hands-on example to see a full server and client interaction + in TypeScript before writing your own. +
++ Found under Tutorials → + + Client-Server Communication + + in the docs sidebar. ++
Go live
++ Once built, configure your server with a Nostr private key and relay list + and pass them into your transport options to go live on the network. +
++ Want to charge clients for access? Set up + + Lightning payments via CEP-8 + . ++
+ What's next +
+Add skills
++ Install reference implementations and templates to accelerate development. +
+ + Learn about skills → + +Publish your server
++ Make your server publicly discoverable on the Nostr network. +
+ + Server announcements → + +Add payments
++ Charge clients for using your server via the Lightning Network. +
+ + Set up payments → + +