Skip to content

Commands

CVMI provides a set of commands for managing skills, running gateways, and connecting to remote servers.

Install ContextVM skills. Skills provide documentation, templates, and reference implementations to help you work with the ContextVM protocol.

Terminal window
npx cvmi add [options]
OptionDescription
--skill <name>Install a specific skill by name

Interactive installation (browse and select skills):

Terminal window
npx cvmi add

Install a specific skill:

Terminal window
npx cvmi add --skill overview
npx cvmi add --skill typescript-sdk
npx cvmi add --skill server-dev
npx cvmi add --skill client-dev

Install multiple skills:

Terminal window
npx cvmi add --skill overview --skill payments --skill deployment

Expose an MCP server as a gateway on the Nostr network. This allows Nostr clients to connect to your MCP server.

Terminal window
npx cvmi serve [options] -- <command> [args...]
OptionDescription
-e, --env <key=value>Pass environment variables to the spawned MCP server (repeatable)
--config <path>Use a custom configuration file

Serve a local stdio MCP server:

Terminal window
npx cvmi serve -- npx -y @modelcontextprotocol/server-filesystem /tmp

Serve with environment variables:

Terminal window
npx cvmi serve -e LOG_LEVEL=debug -- npx -y @modelcontextprotocol/server-filesystem /tmp

Serve a remote HTTP MCP server (configured via config file or environment):

Terminal window
npx cvmi serve

With debug logging:

Terminal window
LOG_LEVEL=debug npx cvmi serve -- npx -y @modelcontextprotocol/server-filesystem /tmp

cvmi serve spawns the MCP server directly (no shell). Prefer passing the command and its arguments as separate tokens:

Terminal window
# Correct - separate tokens
npx cvmi serve -- npx -y @modelcontextprotocol/server-filesystem /tmp
# Also works - CVMI will auto-split for you
npx cvmi serve -- "npx -y @modelcontextprotocol/server-filesystem /tmp"

Use a server from Nostr as a local stdio proxy. This allows standard MCP clients to connect to Nostr-based MCP servers.

Terminal window
npx cvmi use <serverPubkey> [options]
ArgumentDescription
serverPubkeyThe Nostr public key of the server (npub1… or hex)

Connect to a server by public key:

Terminal window
npx cvmi use npub1q...

Connect with specific logging:

Terminal window
LOG_LEVEL=warn npx cvmi use npub1q...

The use command is particularly useful when:

  • You have an MCP client that only supports stdio transport
  • You want to connect to a remote server published on Nostr
  • You’re testing or debugging Nostr-based MCP servers

The following commands are planned for future releases:

Compile a server to code (ctxcn). This will allow you to compile ContextVM configurations into deployable code bundles.

Call methods from a server directly from the command line. Useful for testing and scripting server interactions.

Inspect server schema and capabilities. Get detailed information about available tools, resources, and methods on a server.

All commands support these global options:

OptionDescription
--config <path>Specify a custom configuration file
--helpDisplay help for the command
--versionDisplay version information

See the Configuration page for details on environment variables that affect command behavior.