# Molpha MCP server

> Lets AI agents fetch signed oracle data, publish it on Solana, and build verifier calldata for EVM and Starknet.

- Repository: https://github.com/molpha/mcp
- Page: https://hostedmcp.org/servers/molpha/mcp
- Transport: stdio
- Stars: 2
- License: MIT
- Latest version: 0.1.2

## Install

### Claude Code

```sh
claude mcp add --env 'SIGNER_BACKEND=<SIGNER_BACKEND>' --env 'PRIVY_APP_ID=<YOUR_PRIVY_APP_ID>' --env 'PRIVY_APP_SECRET=<YOUR_PRIVY_APP_SECRET>' --env 'PRIVY_WALLET_ID=<YOUR_PRIVY_WALLET_ID>' --env 'TURNKEY_API_PRIVATE_KEY=<YOUR_TURNKEY_API_PRIVATE_KEY>' --env 'TURNKEY_API_PUBLIC_KEY=<YOUR_TURNKEY_API_PUBLIC_KEY>' --env 'TURNKEY_ORGANIZATION_ID=<YOUR_TURNKEY_ORGANIZATION_ID>' mcp -- npx -y @molpha/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@molpha/mcp"
      ],
      "env": {
        "SIGNER_BACKEND": "<SIGNER_BACKEND>",
        "PRIVY_APP_ID": "<YOUR_PRIVY_APP_ID>",
        "PRIVY_APP_SECRET": "<YOUR_PRIVY_APP_SECRET>",
        "PRIVY_WALLET_ID": "<YOUR_PRIVY_WALLET_ID>",
        "TURNKEY_API_PRIVATE_KEY": "<YOUR_TURNKEY_API_PRIVATE_KEY>",
        "TURNKEY_API_PUBLIC_KEY": "<YOUR_TURNKEY_API_PUBLIC_KEY>",
        "TURNKEY_ORGANIZATION_ID": "<YOUR_TURNKEY_ORGANIZATION_ID>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@molpha/mcp"
      ],
      "env": {
        "SIGNER_BACKEND": "<SIGNER_BACKEND>",
        "PRIVY_APP_ID": "<YOUR_PRIVY_APP_ID>",
        "PRIVY_APP_SECRET": "<YOUR_PRIVY_APP_SECRET>",
        "PRIVY_WALLET_ID": "<YOUR_PRIVY_WALLET_ID>",
        "TURNKEY_API_PRIVATE_KEY": "<YOUR_TURNKEY_API_PRIVATE_KEY>",
        "TURNKEY_API_PUBLIC_KEY": "<YOUR_TURNKEY_API_PUBLIC_KEY>",
        "TURNKEY_ORGANIZATION_ID": "<YOUR_TURNKEY_ORGANIZATION_ID>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@molpha/mcp"],"env":{"SIGNER_BACKEND":"<SIGNER_BACKEND>","PRIVY_APP_ID":"<YOUR_PRIVY_APP_ID>","PRIVY_APP_SECRET":"<YOUR_PRIVY_APP_SECRET>","PRIVY_WALLET_ID":"<YOUR_PRIVY_WALLET_ID>","TURNKEY_API_PRIVATE_KEY":"<YOUR_TURNKEY_API_PRIVATE_KEY>","TURNKEY_API_PUBLIC_KEY":"<YOUR_TURNKEY_API_PUBLIC_KEY>","TURNKEY_ORGANIZATION_ID":"<YOUR_TURNKEY_ORGANIZATION_ID>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@molpha/mcp"
      ],
      "env": {
        "SIGNER_BACKEND": "<SIGNER_BACKEND>",
        "PRIVY_APP_ID": "<YOUR_PRIVY_APP_ID>",
        "PRIVY_APP_SECRET": "<YOUR_PRIVY_APP_SECRET>",
        "PRIVY_WALLET_ID": "<YOUR_PRIVY_WALLET_ID>",
        "TURNKEY_API_PRIVATE_KEY": "<YOUR_TURNKEY_API_PRIVATE_KEY>",
        "TURNKEY_API_PUBLIC_KEY": "<YOUR_TURNKEY_API_PUBLIC_KEY>",
        "TURNKEY_ORGANIZATION_ID": "<YOUR_TURNKEY_ORGANIZATION_ID>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add mcp --env 'SIGNER_BACKEND=<SIGNER_BACKEND>' --env 'PRIVY_APP_ID=<YOUR_PRIVY_APP_ID>' --env 'PRIVY_APP_SECRET=<YOUR_PRIVY_APP_SECRET>' --env 'PRIVY_WALLET_ID=<YOUR_PRIVY_WALLET_ID>' --env 'TURNKEY_API_PRIVATE_KEY=<YOUR_TURNKEY_API_PRIVATE_KEY>' --env 'TURNKEY_API_PUBLIC_KEY=<YOUR_TURNKEY_API_PUBLIC_KEY>' --env 'TURNKEY_ORGANIZATION_ID=<YOUR_TURNKEY_ORGANIZATION_ID>' -- npx -y @molpha/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "@molpha/mcp"]

[mcp_servers.mcp.env]
SIGNER_BACKEND = "<SIGNER_BACKEND>"
PRIVY_APP_ID = "<YOUR_PRIVY_APP_ID>"
PRIVY_APP_SECRET = "<YOUR_PRIVY_APP_SECRET>"
PRIVY_WALLET_ID = "<YOUR_PRIVY_WALLET_ID>"
TURNKEY_API_PRIVATE_KEY = "<YOUR_TURNKEY_API_PRIVATE_KEY>"
TURNKEY_API_PUBLIC_KEY = "<YOUR_TURNKEY_API_PUBLIC_KEY>"
TURNKEY_ORGANIZATION_ID = "<YOUR_TURNKEY_ORGANIZATION_ID>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'SIGNER_BACKEND=<SIGNER_BACKEND>' -e 'PRIVY_APP_ID=<YOUR_PRIVY_APP_ID>' -e 'PRIVY_APP_SECRET=<YOUR_PRIVY_APP_SECRET>' -e 'PRIVY_WALLET_ID=<YOUR_PRIVY_WALLET_ID>' -e 'TURNKEY_API_PRIVATE_KEY=<YOUR_TURNKEY_API_PRIVATE_KEY>' -e 'TURNKEY_API_PUBLIC_KEY=<YOUR_TURNKEY_API_PUBLIC_KEY>' -e 'TURNKEY_ORGANIZATION_ID=<YOUR_TURNKEY_ORGANIZATION_ID>' mcp npx -- -y @molpha/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@molpha/mcp"
      ],
      "env": {
        "SIGNER_BACKEND": "<SIGNER_BACKEND>",
        "PRIVY_APP_ID": "<YOUR_PRIVY_APP_ID>",
        "PRIVY_APP_SECRET": "<YOUR_PRIVY_APP_SECRET>",
        "PRIVY_WALLET_ID": "<YOUR_PRIVY_WALLET_ID>",
        "TURNKEY_API_PRIVATE_KEY": "<YOUR_TURNKEY_API_PRIVATE_KEY>",
        "TURNKEY_API_PUBLIC_KEY": "<YOUR_TURNKEY_API_PUBLIC_KEY>",
        "TURNKEY_ORGANIZATION_ID": "<YOUR_TURNKEY_ORGANIZATION_ID>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SIGNER_BACKEND` | yes | no | Signing backend: memory (local keypair) or keychain (Privy / Turnkey). |
| `PRIVY_APP_ID` | no | yes | Privy app ID. Required for KEYCHAIN_BACKEND=privy. |
| `PRIVY_APP_SECRET` | no | yes | Privy app secret. Required for KEYCHAIN_BACKEND=privy. |
| `PRIVY_WALLET_ID` | no | yes | Privy wallet ID. Required for KEYCHAIN_BACKEND=privy. |
| `TURNKEY_API_PRIVATE_KEY` | no | yes | Turnkey API private key. Required for KEYCHAIN_BACKEND=turnkey. |
| `TURNKEY_API_PUBLIC_KEY` | no | yes | Turnkey API public key. Required for KEYCHAIN_BACKEND=turnkey. |
| `TURNKEY_ORGANIZATION_ID` | no | yes | Turnkey organization ID. Required for KEYCHAIN_BACKEND=turnkey. |
| `GATEWAY_ENDPOINTS` | no | no | Comma-separated Molpha gateway URLs. Leave empty to use the SDK default. |
| `KEYCHAIN_BACKEND` | no | no | Keychain provider: privy or turnkey. Required when SIGNER_BACKEND=keychain. |
| `MOLPHA_DRY_RUN` | no | no | Preview all write and spend operations without submitting them. |
| `MOLPHA_EVM_NETWORKS` | no | no | Comma-separated EVM verifier networks. |
| `MOLPHA_MAX_EXECUTES_PER_DAY` | no | no | Process-local daily Solana submit cap. |
| `MOLPHA_STARKNET_NETWORKS` | no | no | Comma-separated Starknet verifier networks. |
| `MOLPHA_X402_GATEWAY_PDA` | no | no | Optional settling gateway PDA (base58) to skip discovery when the escrow is already funded. |
| `MOLPHA_X402_MAX_PRICE_USDC` | no | no | Refuse to fund an x402 round priced above this amount (decimal USDC). |
| `MOLPHA_X402_MAX_SPEND_PER_DAY_USDC` | no | no | Process-local daily x402 spend cap (decimal USDC). |
| `OWNER_KEYPAIR` | no | no | Path to a Solana JSON keypair file. Required when SIGNER_BACKEND=memory. |
| `PRIVY_WALLET_ADDRESS` | no | no | Solana address for the Privy wallet. |
| `SOLANA_RPC` | no | no | Solana RPC endpoint. |
| `TURNKEY_WALLET_ADDRESS` | no | no | Solana address for the Turnkey wallet. |

## Tools (13)

- `get_capabilities`
- `derive_source_id`
- `describe_feed`
- `get_latest_value`
- `describe_access`
- `get_x402_status`
- `list_providers`
- `get_provider`
- `quote_source_payment`
- `execute_subscription_round`
- `execute_x402_round`
- `build_verifier_calldata`
- `submit_attestation`

## FAQ

### What does Molpha do with HTTP API responses?

Molpha converts HTTP API responses into threshold-signed payloads that can be verified on Solana, EVM, and Starknet.

### Is the Molpha MCP server safe for production use immediately?

No, the current release targets Solana Devnet and Sepolia verifier networks and should be treated as testnet software rather than a production security boundary.

### How can I prevent accidental spending when using the local server?

You can use the MOLPHA_DRY_RUN environment variable to keep every write as a preview until you explicitly turn it off.
