Skip to main content
The local server runs next to your MCP client over stdio and holds a signer, so one tool call runs a round, pays for it or publishes to Solana. Use it for unattended agents and for private API sources. It needs Node.js 24 or later and nothing to clone or build.

Run levels

The server reports its run level in get_capabilities:

Set up

1

Try it read-only

No wallet needed:
2

Choose a signer

Use a dedicated testnet wallet for the agent.Put the settings in a .env file together with MOLPHA_DRY_RUN=true. Point OWNER_KEYPAIR at a file; never paste a key array into a client config.
3

Check the setup

Run the doctor from the folder that holds .env:
It checks the signer, wallet, Solana RPC and gateway, then prints a ready-to-paste config for each client with secrets left as placeholders.
4

Connect your client

For Privy or Turnkey, swap in the settings from the signer table.
5

Turn on spending

Fund the wallet with Devnet SOL and Devnet USDC (Circle faucet, USDC on Solana Devnet). Pick how rounds are paid:
  • x402 needs no setup: each round is paid from the wallet’s USDC.
  • A subscription is created once from the CLI, because subscribing debits USDC. Preview it, then run it without --dry-run:
    --max-price-usdc is a cap in USDC base units (6 decimals). Use provision extend to extend a subscription.
Then set MOLPHA_DRY_RUN=false in the client config and restart the server.
Claude Code users can also install the Molpha skill, which teaches the agent the safe workflow and how to write Solana, EVM and Starknet consumers:

Guardrails

While MOLPHA_DRY_RUN=true, a write call that passes dryRun: false is refused with dry_run_locked. Only you can turn spending on, by editing the config; an agent cannot do it from a conversation. Daily caps are per process and reset on restart. For a hard limit, also set a policy on the wallet (Privy and Turnkey support this).

Configuration

Signer variables are in the signer table. Paying paywalled sources is covered in the tool reference.

Local-only features

  • One-call writes. execute_subscription_round, execute_x402_round and submit_attestation sign with the server’s wallet. Round tools accept autoSubmit: true to publish to Solana in the same call, and dryRun: true to preview.
  • Private API secrets. execute_subscription_round accepts encryptSecrets for {{secret.<name>}} placeholders. The values are encrypted for the nodes; the gateway never sees them.