Skip to content

ContextVM/dummy-paid-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dummy-paid-server

A ContextVM MCP server demonstrating paid tool capabilities using CEP-8 payments.

Overview

This server exposes an add tool over the Nostr network via ContextVM, with each invocation costing 1 satoshi. It demonstrates how to build monetized MCP servers using the @contextvm/sdk.

Features

  • Nostr Transport: Exposes tools over the decentralized Nostr network
  • Paid Capabilities: CEP-8 payment integration via Lightning Network (NWC)
  • Simple Tool: Basic add operation for testing payments

Getting Started

Prerequisites

  • Bun runtime
  • A Nostr private key for the server (optional)
  • NWC (Nostr Wallet Connect) connection string for receiving payments

Installation

bun install

Configuration

Set the following environment variables:

Variable Description
SERVER_PRIVATE_KEY Nostr private key (hex format)(optional)
NWC_SERVER_CONNECTION NWC connection string (bolt11/UD-URI)
RELAYS Comma-separated list of relay URLs (optional)

Example:

export SERVER_PRIVATE_KEY="your-hex-private-key"
export NWC_SERVER_CONNECTION="nostr+walletconnect://..."

Running

bun run index.ts

Tools

add

Adds two numbers together.

Cost: 1 satoshi per call

Parameters:

  • a (number): First number
  • b (number): Second number

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors