Persistent, Solana-aware project memory for AI coding agents. Typed entities + git-aware diffs.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-yksanjo-gmem": {
"args": [
"-y",
"@yksanjo/gmem"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Persistent project memory for Solana AI agents.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@yksanjo/gmem' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @yksanjo/gmem against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in other
Pi Coding Agent extension (CLI-first) — routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.
97% token reduction for AI coding sessions — zero deps, 21 languages, MCP server
App framework, testing framework, and inspector for MCP Apps.
MCP proxy that compresses prose fields (tool descriptions, etc.) using caveman rules. Same accuracy, fewer context tokens.
MCP Security Weekly
Get CVE alerts and security updates for io.github.yksanjo/gmem and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.1 — stable, with EVM support. Seven 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 / workspace Cargo.toml, override with GMEM_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-process Store API
Anchor ingest: gmem.ingest_anchor parses Anchor.toml, captures IDL sha256s,
records git HEAD as sourceCommit per Program
Solana CLI context: gmem.solana_context reads ~/.config/solana/cli/config.yml,
classifies the cluster, derives the active keypair's pubkey (secret never leaks).
gmem.write on a Decision auto-attributes author + authorCluster
Git-aware diff: gmem.diff accepts both ISO timestamps and git refs (HEAD, HEAD~3,
branch names, full and short SHAs)
EVM support (v1.1): gmem.ingest_hardhat parses Hardhat / hardhat-deploy workspaces,
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. New Contract entity kind for EVM smart contracts.
License: MIT
Spec: see SPEC.md
Entity schemas: see schema/
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.
npm install -g @yksanjo/gmem
Or, to run it without a global install:
npx @yksanjo/gmem
The installed binary is still called gmem.
Or, to hack on the source:
git clone https://github.com/yksanjo/gmem.git ~/gmem
cd ~/gmem && npm install && npm run build
Then point your MCP client at it. For Claude Code:
// ~/.claude/mcp_servers.json
{
"mcpServers": {
"gmem": {
"command": "node",
"args": ["/absolute/path/to/gmem/dist/index.js"],
"env": { "GMEM_DB": "~/.gmem/memory.db" }
}
}
}
| Tool | Purpose |
|---|---|
gmem.recall(query) | Retrieve memory entries relevant to a natural-language query, ranked by BM25 + recency |
gmem.write(entity) | Persist a typed memory entry (Program / Account / Instruction / Decision / Finding / Integration); append-only |
gmem.diff(from, to) | Show how memory state changed between two points in time — accepts ISO timestamps OR |