Molpha MCP

v0.1.2
io.github.molpha/mcp Checked 1 day ago Published 4 months ago

MCP server that lets AI agents create, fetch, verify, and publish Molpha oracle data.

Values you need

VariableWhat it is
SIGNER_BACKENDrequired Signing backend: memory (local keypair) or keychain (Privy / Turnkey). Default: memory
OWNER_KEYPAIRoptional Path to a Solana JSON keypair file. Required when SIGNER_BACKEND=memory.
KEYCHAIN_BACKENDoptional Keychain provider: privy or turnkey. Required when SIGNER_BACKEND=keychain.
PRIVY_APP_IDoptional secret Privy app ID. Required for KEYCHAIN_BACKEND=privy.
PRIVY_APP_SECREToptional secret Privy app secret. Required for KEYCHAIN_BACKEND=privy.
PRIVY_WALLET_IDoptional secret Privy wallet ID. Required for KEYCHAIN_BACKEND=privy.
PRIVY_WALLET_ADDRESSoptional Solana address for the Privy wallet.
TURNKEY_API_PUBLIC_KEYoptional secret Turnkey API public key. Required for KEYCHAIN_BACKEND=turnkey.
TURNKEY_API_PRIVATE_KEYoptional secret Turnkey API private key. Required for KEYCHAIN_BACKEND=turnkey.
TURNKEY_ORGANIZATION_IDoptional secret Turnkey organization ID. Required for KEYCHAIN_BACKEND=turnkey.
TURNKEY_WALLET_ADDRESSoptional Solana address for the Turnkey wallet.
SOLANA_RPCoptional Solana RPC endpoint. Default: https://api.devnet.solana.com
GATEWAY_ENDPOINTSoptional Comma-separated Molpha gateway URLs. Leave empty to use the SDK default.
MOLPHA_EVM_NETWORKSoptional Comma-separated EVM verifier networks. Default: evm-sepolia
MOLPHA_STARKNET_NETWORKSoptional Comma-separated Starknet verifier networks. Default: starknet-sepolia
MOLPHA_DRY_RUNoptional Preview all write and spend operations without submitting them. Default: false
MOLPHA_MAX_EXECUTES_PER_DAYoptional Process-local daily Solana submit cap. Default: 100
MOLPHA_X402_MAX_PRICE_USDCoptional Refuse to fund an x402 round priced above this amount (decimal USDC). Default: 1
MOLPHA_X402_MAX_SPEND_PER_DAY_USDCoptional Process-local daily x402 spend cap (decimal USDC). Default: 10
MOLPHA_X402_GATEWAY_PDAoptional Optional settling gateway PDA (base58) to skip discovery when the escrow is already funded.

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mcp -e SIGNER_BACKEND=memory -- npx -y --package=@molpha/mcp@0.1.2 molpha-mcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp": {
      "args": [
        "-y",
        "--package=@molpha/mcp@0.1.2",
        "molpha-mcp"
      ],
      "command": "npx",
      "env": {
        "SIGNER_BACKEND": "memory"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp": {
      "args": [
        "-y",
        "--package=@molpha/mcp@0.1.2",
        "molpha-mcp"
      ],
      "command": "npx",
      "env": {
        "SIGNER_BACKEND": "memory"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "SIGNER_BACKEND",
      "id": "signer-backend",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp": {
      "args": [
        "-y",
        "--package=@molpha/mcp@0.1.2",
        "molpha-mcp"
      ],
      "command": "npx",
      "env": {
        "SIGNER_BACKEND": "${input:signer-backend}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "--package=@molpha/mcp@0.1.2", "molpha-mcp"]
env = { "SIGNER_BACKEND" = "memory" }

For AI agents

  1. Ask the user for: SIGNER_BACKEND. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: molpha_get_capabilities, molpha_describe_feed, molpha_derive_feed, molpha_agent_status, molpha_fetch_verified, molpha_get_latest, molpha_verify, molpha_execute.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json