three.ws Solana Memo Media

io.github.nirholasv0.1.0更新於 Oct 10, 2026

Extract validated image data URIs from Solana SPL Memos and return them inline to MCP clients.

已驗證STDIO僅桌面FinanceMedia & Design

概覽

AI 產生的概覽

讀取 Solana SPL Memo 指令,並將其中內嵌的圖片 data URI 以內嵌方式回傳給 MCP 用戶端。

功能
此伺服器依交易簽章取得 Solana 交易,回傳其頂層與內部 Memo 指令中所有支援的圖片,並附上簽署者、slot 與交易版本。它也能掃描某位址最近最多 1,000 個簽章以尋找含 data URI 的 memo,在本機解碼 data URI(不需網路),並回報本機政策、可辨識的 memo 程式以及 RPC 容錯主機。回應包含一筆 JSON 記錄,以及每個資產一個 image 內容區塊,內含 MIME 類型、位元組長度、SHA-256 摘要與尺寸。
適用情境
當你希望助理直接顯示儲存在 Solana memo 中的圖片,而不必手動把 base64 data URI 複製到轉換工具時,它很實用。適合對已知交易簽章或位址相關的 memo 媒體做唯讀檢視。
執行需求
透過 stdio 在本機執行,通常以 npx 與 Node.js 啟動。不需帳號或 API 金鑰;可選的環境變數 SOLANA_RPC_URL 與 SOLANA_RPC_URLS 可指向你自己的 JSON-RPC 端點,否則使用公開 Solana 主網端點。取得與掃描工具需要網路存取。
安裝前請注意
唯讀且免金鑰:不會簽署、傳送、上傳、快取或修改鏈上資料。Memo 文字是任意簽署內容,data URI 只是一種慣例,並非背書;在信任圖片意義之前,應獨立核實簽署者、程式與交易脈絡。僅接受 PNG、JPEG、WebP 與 GIF,SVG 及可執行或文件類媒體會被拒絕,解碼內容上限為 262,144 位元組。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 three.ws Solana Memo Media,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@three-ws/solana-memo-media-mcp

Read and display image data URIs embedded in Solana SPL Memo instructions. Instead of copying a data:image/...;base64,... memo payload into a browser converter, give an AI assistant the transaction signature and receive the validated image inline.

This is a keyless, read-only stdio MCP server. It never signs, sends, uploads, caches, or modifies chain data.

Install

bash
claude mcp add solana-memo-media -- npx -y @three-ws/solana-memo-media-mcp

For Cursor, Claude Desktop, or another stdio MCP client:

json
{  "mcpServers": {    "solana-memo-media": {      "command": "npx",      "args": ["-y", "@three-ws/solana-memo-media-mcp"]    }  }}

Tools

ToolPurpose
extract_solana_memo_mediaFetch one legacy, v0, or v1 transaction and return every supported image in its top-level and inner Memo instructions, with signer, slot, and version.
find_solana_memo_mediaScan up to 1,000 recent signatures for an address (pageable with before). Only signatures whose memo summary holds a data URI are fetched, so a scan costs a handful of RPC calls.
decode_solana_memo_data_uriDecode one already-copied data URI locally. No network call.
get_solana_memo_media_statusShow the local policy, recognized memo programs, and RPC failover hosts. No network call.

Recognized memo programs: SPL Memo v1 (Memo1UhkJRfHyvLMcVLMbLJYfW2tfU8G8H4PqvV6v8), SPL Memo v2 (MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr), and the newer program carried by version 1 transactions (Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH).

Example

Ask an MCP client: "Show any image embedded in Solana transaction <signature>." It calls extract_solana_memo_media with:

json
{ "signature": "<base58 Solana transaction signature>" }

The response is a JSON record plus one MCP image content block per asset. The record carries the signature, fee payer, slot, transaction version, and for each asset its MIME type, byte length, SHA-256, and dimensions. The raw data URI is intentionally not echoed into text output.

Use it from your own code:

js
import { decodeDataUri } from '@three-ws/solana-memo-media-mcp/src/lib/media.js';
const media = decodeDataUri('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgwJ/lwV8YQAAAABJRU5ErkJggg==');console.log(media.mimeType, media.byteLength, media.dimensions, media.sha256);

Full guide: docs/mcp-solana-memo-media.md.

Safety and provenance

An SPL Memo is arbitrary signed text. A data URI is only a convention inside that text, not a Solana media standard and not an endorsement by a wallet, explorer, or this package.

  • Only image/png, image/jpeg, image/webp, and image/gif are accepted.
  • SVG and all executable or document media are rejected.
  • Decoded content is capped at 262,144 bytes.
  • The declared MIME type must match PNG, JPEG, WebP, or GIF file signatures before an image is returned.
  • The server reports a SHA-256 digest so callers can preserve an exact reference.
  • Verify the transaction signer, program, and surrounding transaction context independently before trusting what an image means.

RPC configuration

The server tries SOLANA_RPC_URLS, then SOLANA_RPC_URL, then public Solana mainnet endpoints. You do not need a key for normal use.

VariableRequiredMeaning
SOLANA_RPC_URLSnoComma-separated ordered JSON-RPC failover endpoints.
SOLANA_RPC_URLnoOne primary JSON-RPC endpoint.

Development

bash
npm test --prefix packages/solana-memo-media-mcpnpx -y @modelcontextprotocol/inspector node packages/solana-memo-media-mcp/src/index.js

License: Apache-2.0.

來源:packages/solana-memo-media-mcp/README.md,提交 0e68f46

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v0.1.0最新Oct 10, 2026