MCP server providing HTTP/JSON access to all Privateness CLI functionality for team development workflows.
- Complete CLI Coverage: All 40+ privateness-cli commands organized by category
- Multiple API Styles: Category-based routes, generic commands, and legacy RPC
- Environment Integration: Supports all privateness-cli environment variables
- Team Development: Self-hosted API for internal tooling
- Port 7332: Avoids common port conflicts
- Node.js 14.0.0 or higher
- privateness-cli in your PATH or specified via environment variable
- Privateness node running (default: http://127.0.0.1:6660)
git clone this repository
cd privateness-mcp-server
npm install
Configure using environment variables (same as privateness-cli):
export PORT=7332 # Server port (default: 7332)
export PRIVATENESS_CLI_PATH=privateness-cli # Path to privateness-cli
export RPC_ADDR=http://127.0.0.1:6660 # RPC node address
export RPC_USER=username # RPC username (if enabled)
export RPC_PASS=password # RPC password (if enabled)
export COIN=privateness # Coin name
export DATA_DIR=./data # Data directory
npm start
# or for development:
npm run dev
GET /health- Server health and statisticsGET /endpoints- List all available commands by category
POST /wallet/walletCreate- Create new walletPOST /wallet/listWallets- List all walletsPOST /wallet/listAddresses- List wallet addressesPOST /wallet/addPrivateKey- Add private key to walletPOST /wallet/encryptWallet- Encrypt walletPOST /wallet/showSeed- Show wallet seed
POST /address/addressGen- Generate addressesPOST /address/addressBalance- Check address balancePOST /address/addressOutputs- Display address outputsPOST /address/verifyAddress- Verify address format
POST /balance/walletBalance- Check wallet balancePOST /balance/walletOutputs- Display wallet outputsPOST /balance/walletHistory- Show wallet transaction history
POST /transaction/send- Send coinsPOST /transaction/createRawTransaction- Create raw transactionPOST /transaction/signTransaction- Sign transactionPOST /transaction/broadcastTransaction- Broadcast transactionPOST /transaction/pendingTransactions- Get pending transactions
POST /blockchain/status- Node statusPOST /blockchain/blocks- Get block informationPOST /blockchain/lastBlocks- Get recent blocksPOST /blockchain/version- Get version info
POST /system/showConfig- Show configurationPOST /system/checkdb- Verify database
POST /cmd/:command- Execute any privateness-cli commandPOST /rpc- Legacy RPC passthrough
All endpoints accept JSON with parameters and flags:
{
"params": ["param1", "param2"],
"flags": {
"wallet": "my-wallet.wlt",
"password": "secret",
"amount": "100"
}
}
curl -X POST http://localhost:7332/wallet/walletCreate \
-H "Content-Type: application/json" \
-d '{"flags": {"wallet": "team-wallet.wlt", "label": "Team Wallet"}}'
curl -X POST http://localhost:7332/balance/walletBalance \
-H "Content-Type: application/json" \
-d '{"flags": {"wallet": "team-wallet.wlt"}}'
curl -X POST http://localhost:7332/transaction/send \
-H "Content-Type: application/json" \
-d '{
"flags": {
"wallet": "team-wallet.wlt",
"to": "recipient_address",
"amount": "10.5"
}
}'
curl -X POST http://localhost:7332/address/addressGen \
-H "Content-Type: application/json" \
-d '{"flags": {"num": "5", "coin": "privateness"}}'
curl -X POST http://localhost:7332/blockchain/status \
-H "Content-Type: application/json" \
-d '{}'
Wallet creation, management, encryption, and key operations.
Address generation, verification, and balance checking.
Wallet balance, outputs, and transaction history.
Creating, signing, broadcasting, and managing transactions.
Node status, blocks, and network information.
Configuration, database verification, and help.
Detailed error responses include:
- Error message
- stderr output from privateness-cli
- Exit code
- Command name for context
- Network Security: Run behind HTTPS reverse proxy for production
- Access Control: Use firewall rules to limit access
- Credentials: Secure RPC credentials if authentication enabled
- Local Development: Designed for team development workflows
npm run dev # Auto-reload on changes
MIT