
Gmem
io.github.yksanjoPublished by GitHub account yksanjov1.1.0Updated Oct 24, 2026
Persistent, Solana-aware project memory for AI coding agents. Typed entities + git-aware diffs.
Overview
Local MCP server giving AI coding agents persistent, Solana- and EVM-aware project memory: programs, IDLs, decisions, audit findings and deployments.
- What you can do
- Recall and write typed memory entries (Program, Account, Instruction, Decision, Finding, Integration, Contract), ranked by BM25 plus recency
- List stored decisions and diff memory state between two timestamps or git refs
- Ingest an Anchor workspace, capturing IDL hashes and git HEAD per program and cluster
- Ingest a Hardhat workspace, mapping deployments to canonical chains with ABI hashes
- Read the active Solana CLI cluster, RPC URL and keypair pubkey, and score agent wallets from Helius activity
- When to use it
- Useful when an assistant works repeatedly on the same Solana or EVM project and keeps losing context between sessions — deployed program IDs, PDA seeds, architectural decisions, audit findings. It suits Anchor and Hardhat developers who want that context stored locally instead of pasted into each session.
- Requirements
- Runs as a local Node.js process, installed globally from npm or via npx. A project with Anchor.toml or a workspace Cargo.toml (or a Hardhat workspace) for auto-ingest. The GMEM_DB environment variable optionally overrides the database path, which otherwise defaults to a per-project file under the home directory. Agent activity scoring needs HELIUS_API_KEY or an apiKey argument, or a fixture path for offline runs.
Installation
In SourceWeft
- Open Gmem in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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.
Source: README.md at commit 152aaf7
Tools
0Version history
1- v1.1.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
