Skip to main content
The Molpha MCP server gives AI agents a typed interface for discovering the network, deriving feeds, requesting threshold-signed payloads, verifying them, and publishing updates to Solana. New here? Start with the AI agent quickstart for the Brebeneskul setup path. The server runs locally over Model Context Protocol stdio and uses @molpha/sdk for gateway and on-chain operations. Package: @molpha/mcp. Source: Molpha/mcp.
The current release targets Solana Devnet and Sepolia verifier networks. Write tools spend Devnet SOL and may consume subscription quota or x402 escrow funds unless dry-run mode is enabled.

Tool reference

EVM and Starknet execution is not performed by the MCP server. It returns verifier addresses and contract-ready arguments for those chains. Solana is the only leg this server settles — via molpha_execute or molpha_fetch_verified with autoSubmit: true. There is no standalone Solana verify-simulation path; submit, then read with molpha_get_latest.

molpha_fetch_verified payment

Set autoSubmit: true and include "solana" in chains to settle the Solana leg in the same call. encryptSecrets is not yet supported on the x402 path — use payment: "subscription" for feeds with encrypted secrets. Call molpha_agent_status before x402 spend to inspect escrow balance, committed amount, and the quoted next price for a given quorum.

Architecture

The MCP server is an adapter and policy boundary. The signed DataUpdate remains the trust anchor:
  1. An MCP client invokes a typed tool over stdio.
  2. The selected wallet signs gateway authentication messages and owner transactions.
  3. Nodes independently fetch the feed’s committed API configuration and aggregate a signature after reaching quorum.
  4. The server returns the signed artifact and chain-specific verifier arguments.
  5. A consumer verifies the payload against its registry version before using the value.
Subscription and extension operations are kept in a separate CLI because they debit USDC. Pay-per-request agent access uses the gateway’s x402/escrow endpoints; see Access Models.

Setup

Prerequisites

  • Node.js 24 or later
  • An MCP client such as Cursor, Claude Desktop, or Codex
  • A Solana wallet funded with Devnet SOL
  • Devnet USDC for subscription or x402 operations — use Circle’s faucet (select USDC on Solana Devnet)
1

Clone and build

Or install the published package @molpha/mcp and point your client at its molpha-mcp binary.
2

Choose a signer

Local keypair (simplest for development):
Leave GATEWAY_ENDPOINTS empty to use the SDK default (https://dev-gateway.molpha.io). See the Gateway HTTP API and Gateways guide.Hosted signers — set SIGNER_BACKEND=keychain and one of:The same wallet must be used for provisioning and MCP runtime operations. Feeds are wallet-owned.
3

Validate the setup

The doctor validates the compiled server, signer, wallet, and Solana RPC, then prints client configuration snippets with absolute paths.
4

Bootstrap a subscription

Preview the transaction first, then subscribe with an explicit maximum USDC price:
20000000 is 20 USDC at 6 decimals. This is a safety cap; the transaction aborts if the on-chain price is higher.Skip this step if you only plan to use payment: "x402" or "auto" without a subscription.
5

Connect your MCP client

Point the client to the compiled stdio entry point, or install the Claude Desktop MCPB (see below).
Restart the client after saving the configuration. Then ask it to call molpha_get_capabilities. If tool names look stale, restart or reload the MCP server so the client refreshes its tool list.
Never commit .env, wallet keypairs, Privy secrets, or Turnkey credentials. Prefer absolute paths in MCP configuration because clients may start the server from a different working directory.

Example prompts

Inspect the network
Use Molpha to inspect the current oracle capabilities. Summarize the registry version, node count, supported chains, gateway endpoints, and verifier addresses. Do not make any writes.
Derive a feed
Derive a Molpha feedId for https://api.example.com/v1/finalized/price using the JSON path $.price and 3 required signatures. Show me the API config hash, the derived feedId, and any determinism warnings. Do not send a transaction.
Use an endpoint whose response is stable enough for independent nodes to reproduce. Fast-moving ticker APIs can return different values to different nodes and fail to reach quorum. Fetch and verify
For that same feed, fetch a signed result with payment: "auto" and a maximum age of 60 seconds, for the EVM chain. Summarize the signed value, timestamp, registry version, quorum, and EVM verifier call, and tell me whether it was paid for via subscription or x402. Treat the signed artifact as the trust anchor; do not trust the value by itself.
Check x402 spend before paying
Call molpha_agent_status for 3 required signatures. Tell me the escrow’s USDC balance, committed amount, and quoted next price before I authorize any x402 spend.
Preview a Solana update
Read the latest value for Molpha feed <FEED_ID>. If I provide a newer signed result, preview molpha_execute with dryRun: true, explain the fee-paying wallet and exact write, and wait for my confirmation before submitting it to Solana.

Guardrails

The counters reset when the MCP server restarts. Use durable policy and wallet controls in addition to these guardrails for higher-risk environments.

Troubleshooting

node dist/src/server.js waits for JSON-RPC on stdin and normally prints nothing. Launch it through an MCP client, then call molpha_get_capabilities.
Run npm run build, use an absolute path to dist/src/server.js, and restart the client. npm run doctor prints a resolved configuration snippet.
The running server is feed-based (derive_feed, describe_feed, agent_status). Restart or reload the MCP server so the client refreshes its tool descriptors.
Run the provisioning CLI with the same signer used by the MCP server, or use payment: "x402" / "auto" for a self-funded round.
Check that the endpoint returns deterministic, settled data. Every selected node must derive a byte-identical normalized value for the round to aggregate successfully.

Next steps

Agent quickstart

Derive a feed, fetch verified data, and optionally submit to Solana.

How Molpha works

Follow a value from an HTTP response to a cross-chain aggregate signature.

Feeds

Learn how API configurations are committed and feeds are identified.

Verifier overview

Understand verification across Solana, EVM, and Starknet.