
Gmem
io.github.yksanjo由 GitHub 帳號 yksanjo 發布v1.1.0更新於 Oct 24, 2026
Persistent, Solana-aware project memory for AI coding agents. Typed entities + git-aware diffs.
概覽
本機 MCP 伺服器,為 AI 編碼助理提供持久的 Solana 與 EVM 專案記憶:程式、IDL、決策、稽核發現與部署狀態。
- 可以做什麼
- 檢索與寫入具型別的記憶條目(Program、Account、Instruction、Decision、Finding、Integration、Contract),依 BM25 加時間新近度排序
- 列出已存決策,並依 ISO 時間戳或 git 參照比對兩個時點的記憶差異
- 匯入 Anchor 工作區,依程式與叢集記錄 IDL 雜湊與 git HEAD
- 匯入 Hardhat 工作區,將部署對應到標準鏈並記錄 ABI 雜湊
- 讀取目前 Solana CLI 的叢集、RPC 位址與金鑰對公鑰,並依 Helius 活動為代理錢包評分
- 適用情境
- 適合助理長期反覆處理同一個 Solana 或 EVM 專案、卻每次工作階段都遺失脈絡的情況,例如已部署的程式 ID、PDA 種子、架構決策與稽核發現。適合希望把這些脈絡保存在本機、而非每次工作階段重新貼上的 Anchor 與 Hardhat 開發者。
- 執行需求
- 以本機 Node.js 程序執行,可從 npm 全域安裝或以 npx 啟動。自動匯入需要專案含 Anchor.toml 或工作區 Cargo.toml(或 Hardhat 工作區)。環境變數 GMEM_DB 可覆寫資料庫路徑,預設依專案存放在家目錄下的獨立檔案。代理活動評分需要 HELIUS_API_KEY 或 apiKey 參數,也可用 fixture 路徑離線執行。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gmem,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
gmem
Persistent project memory for Solana AI agents.
A Model Context Protocol (MCP) server that gives AI coding agents — Claude Code, Cursor, or anything that speaks MCP — durable, Solana-aware memory of a project across sessions: program IDs, IDLs, PDA seeds, deployment state, architectural decisions, audit findings. So agents stop forgetting what they built yesterday.
Status: v1.2 — stable, with EVM support and agent trust scoring. Nine MCP tools, real implementations (no stubs), backward-compatible wire format:
-
Storage: SQLite via better-sqlite3, one db file per project (auto-resolved from
Anchor.toml/ workspaceCargo.toml, override withGMEM_DB) -
Ranking: SQLite FTS5 BM25 with a recency boost
-
Versioning: append-only — every write inserts a new
(kind, natural_id, version)row; reads return the latest; full history available via the in-processStoreAPI -
Anchor ingest:
gmem.ingest_anchorparsesAnchor.toml, captures IDL sha256s, records git HEAD assourceCommitper Program -
Solana CLI context:
gmem.solana_contextreads~/.config/solana/cli/config.yml, classifies the cluster, derives the active keypair's pubkey (secret never leaks).gmem.writeon a Decision auto-attributesauthor+authorCluster -
Git-aware diff:
gmem.diffaccepts both ISO timestamps and git refs (HEAD, HEAD~3, branch names, full and short SHAs) -
EVM support (v1.1):
gmem.ingest_hardhatparses Hardhat /hardhat-deployworkspaces, classifies networks into canonical chain ids (base-mainnet 8453, optimism-mainnet 10, polygon-mainnet 137, arbitrum-one 42161, ethereum-mainnet 1, plus testnets), captures a reorder-invariant ABI SHA-256. NewContractentity kind for EVM smart contracts. -
License: MIT
-
Spec: see
SPEC.md -
Entity schemas: see
schema/
Why
Solana has moved decisively toward an agent-first developer experience. The Foundation's
awesome-solana-ai repo indexes a strong layer of stateless reference skills —
solana-dev-skill, magicblock-dev-skill, metaplex-skill, helius-phantom-skill,
solana-game-skill, and more — that teach agents how to do things. The Solana
Developer MCP exposes documentation. What's missing is the layer above: persistent
project memory.
Today every Claude Code session on a Solana project starts cold. The agent doesn't remember the program ID it deployed yesterday, the PDA seeds it chose two weeks ago, the audit finding from last sprint, or why a specific Jupiter integration was rejected. The developer compensates by pasting context, hand-maintaining NOTES files, or re-explaining the project every session. That is a tax on every agent-assisted Solana developer.
gmem fixes this by being opinionated about Solana primitives — programs, accounts,
instructions, PDAs, IDLs, cluster state, Anchor configs — rather than being a generic
key-value store. It complements every existing skill in awesome-solana-ai rather than
competing with any of them.
Install
Or, to run it without a global install:
The installed binary is still called gmem.
Or, to hack on the source:
Then point your MCP client at it. For Claude Code:
Tools exposed (v0.1)
Full input/output JSON schemas are in SPEC.md.
Worked against real Solana projects
The examples/ folder in this repo demonstrates the shape of project memory
with synthetic projects. These companion repos build the same shape from
public Solana programs you've probably heard of, with every entity citing
its source:
- gmem-example-squads-v4 — Squads multisig. Anchor workspace auto-ingest + audit pointers.
- gmem-example-marginfi-v2 —
Marginfi v2 lending. IDL-driven discovery of the embedded Drift integration
(6
drift_*instructions surfaced automatically). - gmem-example-kamino-klend —
Kamino klend. V1/V2 coexistence pattern, first-class flash loans, on-chain
referrer state, sustained per-minor-release audit cadence — all recorded as
Decisionentries.
Each repo is npm install && npm run build-runnable; the resulting gmem.db
is committed for direct inspection.
Out of scope for v1.0
To keep the v1 scope honest, gmem v1.0 does NOT include: hosted multi-user sync,
cross-project search, agent reputation, on-chain memory anchoring. These are tracked in
ROADMAP.md for v1.x / v2.
Roadmap
- v0.1 — Open spec + JSON schemas + MCP server stub
- v0.2 — SQLite backend, BM25 ranking, append-only versioning
- v0.3 — Anchor workspace auto-ingest
- v0.4 — Solana CLI context capture + Decision auto-attribution
- v0.5 — git ref resolution in
gmem.diff - v1.0 — Stable release with three worked examples (DeFi vault,
cNFT mint, AI agent) — see also
PR #168 in
solana-foundation/awesome-solana-ai - v1.1 — EVM / Hardhat support (Base, Optimism, Polygon, Arbitrum, Ethereum, plus testnets),
new
Contractentity,gmem.ingest_hardhattool, worked example 04-evm-vault - v1.2 — Agent trust scoring: new
Agententity,gmem.ingest_agent_activity+gmem.score_agenttools, worked example 05-agent-reputation, MCP Registry surface (server.json1.2.0)
Contributing
This is an early-stage spec. The most useful thing right now is feedback on
SPEC.md — does the entity model cover the Solana primitives that matter
to your project? Open an issue or PR.
License
MIT — see LICENSE.
來源:README.md,提交 152aaf7
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
