Releases: graph-memory/graphmemory
Releases · graph-memory/graphmemory
v1.6.2
Released: March 2026
New
- OAuth 2.0 Authorization Code + PKCE — Claude.ai and other browser-based OAuth clients can now authenticate via the full Authorization Code flow with PKCE (
S256). EndpointGET /authorizeredirects to the session-awareGET /api/oauth/authorize; if the user has an active UI session they are immediately redirected back with an authorization code. If not logged in, redirects to/ui. - Refresh tokens —
POST /oauth/tokennow supportsgrant_type=refresh_token. Tokens are self-contained signed JWTs using the configuredrefreshTokenTtl(default7d). Access and refresh tokens use the configuredaccessTokenTtl/refreshTokenTtlfromgraph-memory.yaml. - Updated OAuth discovery —
/.well-known/oauth-authorization-servernow includesauthorization_endpoint,response_types_supported: ["code"],code_challenge_methods_supported: ["S256"], andrefresh_tokeningrant_types_supported.
v1.6.1
Released: March 2026
Fixes
- Express
trust proxy— enabledtrust proxyso thatX-Forwarded-ForandX-Forwarded-Protoheaders from reverse proxies (nginx, etc.) are correctly trusted. Fixes real IP detection for rate limiting andSecurecookie behavior behind HTTPS proxies.
v1.6.0
Released: March 2026
Highlights
- OAuth 2.0 for AI chat clients — Graph Memory now implements the OAuth 2.0
client_credentialsflow. AI chat clients that support OAuth connectors (Claude.ai, etc.) can authenticate automatically — no manual API key headers required. Client ID =userId, Client Secret =apiKeyfrom config. - Tool naming consistency — all 58 MCP tools audited and renamed to consistent
graph_verb_nounprefixes. Parameter names, defaults, and descriptions aligned across MCP tools and REST endpoints. - Array syntax for
includepatterns — theincludefield in graph config now accepts a YAML array in addition to a single glob string, matching the existingexcludebehavior. - Cleaner MCP responses — internal graph fields (
fileEmbedding,pendingLinks,pendingImports,pendingEdges,version), null values, and empty arrays stripped from all MCP tool responses to reduce noise and token usage.
New Endpoints
GET /.well-known/oauth-authorization-server— RFC 8414 OAuth discovery metadataPOST /oauth/token— OAuth 2.0client_credentialsgrant; returns a short-lived Bearer JWT (1 hour, typeoauth_access)
Security
- Auth before project lookup — MCP handler now checks authentication before resolving the project, preventing unauthenticated callers from enumerating which project IDs exist via 404 vs 401 responses
WWW-Authenticate: Beareron 401 — MCP endpoints include the RFC 6750 required header on all 401 responses, enabling OAuth clients to trigger automatic re-authentication
Fixes
docs_get_node— removedfileEmbedding,pendingLinks,mtimefrom responsecode_get_symbol— removedfileEmbedding,pendingImports,pendingEdgesfrom responsenotes_get,tasks_get,skills_get— removedversion; null fields and empty arrays strippednotes_list— removed content preview field (not in tool description)
Tests
- 33 new tests in
oauth.test.ts: unit tests forsignOAuthTokenandresolveUserFromBearer, supertest coverage of discovery and token endpoints, integration tests against a real HTTP server forWWW-Authenticateheader behavior
Documentation
docs/authentication.md— added OAuth 2.0 section with endpoint reference and token formatsite/docs/security/authentication.md— new OAuth 2.0 subsection and "Connecting Claude.ai" guidesite/docs/guides/mcp-clients.md— new Claude.ai section with connector setup instructions
v1.5.0
Released: March 2026
Highlights
- Code Browsing UI — new dedicated Code section in the Web UI. Browse indexed files, expand to see symbols with kind chips and signature snippets, view full source code and graph relations (imports, extends, contains), navigate between symbols. Semantic search with clickable results.
- Graph Visualization Removed — the Cytoscape.js force-directed graph page has been removed from the UI along with the
GET /api/projects/:id/graphexport endpoint. Code browsing and search provide better navigation. - Prompt Builder Unlocked — empty graphs can now be toggled on in the prompt builder. Previously, graphs with 0 nodes were disabled and couldn't be included in generated prompts.
Security
- Upload filename validation — attachment uploads now validate
file.originalnamethroughattachmentFilenameSchemain all three routers (knowledge, tasks, skills), preventing path traversal via crafted filenames - Relation schema length limits — added
.max()constraints tofromId,toId,kind, andprojectIdincreateRelationSchema,createTaskLinkSchema, andcreateSkillLinkSchema - Code edges encapsulation — new
getSymbolEdges()public method onCodeGraphManagerreplaces direct_graphaccess in the REST endpoint
New Endpoints
GET /api/projects/:id/code/symbols/:symbolId/edges— returns all incoming and outgoing edges for a code symbol (imports, contains, extends, implements)
UI Changes
- New Code list page: file list with symbol counts, expandable symbols with kind/export chips and signature preview
- New Code detail page: metadata, signature, source code, relations (in-graph edges + cross-graph links), file siblings
- Code search results in unified Search page are now clickable and navigate to symbol detail
- Docs TOC entries now show content snippets (first 120 chars)
- Removed Graph page, graph entity, Cytoscape/cytoscape-fcose dependencies
- Fixed RelationManager navigation for code links (was routing to removed graph page)
- Cleaned orphaned
cytoscape-fcose.d.tstype declaration and vitevendor-graphchunk config
Tests
- Added 3 tests for code symbol edges endpoint (edges returned, leaf symbol, unknown symbol)
- Added 7 tests for skill attachment CRUD (upload, list, download, delete, 404, no-file, empty-list)
- Removed graph export tests (endpoint removed)
Documentation
- Updated docs/: removed graph visualization references, added Code endpoints and Code browsing sections
- Updated site/: search-graph → "Search & Code Browsing", updated getting-started, quick-start, knowledge-tasks-skills
- Updated UI help: fixed RelationManager code link navigation
v1.4.0
Released: March 2026
Highlights
- Code-Optimized Embedding Model — code graph now defaults to
jinaai/jina-embeddings-v2-base-codevia newcodeModelconfig field. Separate inheritance chain:graphs.code.model → project.codeModel → server.codeModel → code defaults. - Full Body in Code Embeddings — code symbols now embed
signature + docComment + body(was signature + docComment only). Functions without JSDoc are now visible to semantic search. - Edge-Specific BFS Decay — code graph BFS uses per-edge-type decay:
contains(0.95),extends/implements(0.85),imports(0.70). Reflects that class→method is a tighter relationship than a cross-file import. - Hybrid File Search — file-level searches (
search_files,search_topic_files,search_all_files) now use BM25 + vector hybrid (was vector-only). Exact filename queries like "embedder.ts" now work reliably. - Embedding API Model Selection —
POST /api/embedacceptsmodel: "default" | "code"to select which embedding model to use. Both models loaded at startup whenembeddingApiis enabled. - Graph Data Versioning — persisted graphs now store
GRAPH_DATA_VERSION. Version mismatch triggers automatic re-index (alongside existing embedding fingerprint check).
Search Improvements
- BFS
queue.shift()replaced with index pointer — O(1) dequeue instead of O(n) array shift - File paths normalized for embedding:
src/lib/search/code.ts→src lib search code tsfor better tokenization embedding.maxCharsdefault raised from 8000 to 24000, matching ~8k token model capacity
Configuration
- New
codeModelfield at server/project/workspace levels with its own inheritance chain - New
embedding.remoteModelfield:"default"or"code"— auto-set to"code"for code graph with remote embedding - New
CODE_EDGE_DECAYconstants in defaults for per-edge-type BFS decay GRAPH_DATA_VERSION = 2— bump when changing embedding content or stored format
Breaking Changes
- Code graph default model changed from
Xenova/bge-m3tojinaai/jina-embeddings-v2-base-code— existing code graphs will be automatically re-indexed on first startup embedding.maxCharsdefault changed from 8000 to 24000- Embedding API
embeddingApiModelNameoption replaced withembeddingApiModelNames: { default, code }
v1.3.4
Released: March 2026
Bug Fixes
- Fix UI 404 when Node is installed via nvm/fnm/volta — the
sendmodule's defaultdotfiles: 'ignore'policy rejectedsendFilepaths containing dot-directories (.nvm,.fnm,.volta), causing the SPA fallback to silently fail. Now passesdotfiles: 'allow'tosendFile.
v1.3.3
Released: March 2026
Highlights
- Security Audit — comprehensive security audit and hardening across the entire codebase (~90 files changed). Fixed 4 HIGH, 4 MEDIUM, and 4 LOW severity findings.
Security
- Path traversal via entity IDs —
sanitizeEntityId()applied to all file mirror operations, preventing directory traversal through crafted note/task/skill IDs - Path traversal via attachments — attachment tools now reject operations when
projectDiris not configured; usefs.realpathSync()to prevent case-insensitive and symlink-based bypasses - Insecure graph deserialization —
validateGraphStructure()validates JSON structure beforegraph.import()in all 6 graph load functions, preventing injection of arbitrary nodes/edges - Stored XSS via Markdown — added
rehype-sanitizeto MDEditor preview pane to strip dangerous HTML - Symlink following in indexer —
scan()now skips symbolic links, preventing indexing of files outside the project directory - Input size limits — added
.max()constraints to all 58 MCP tool Zod schemas and REST list schemas, preventing memory exhaustion via oversized inputs - AuthGate fail-open — UI now redirects to login on network error instead of showing the full interface
- Error message disclosure — removed user-supplied IDs from MCP tool error messages (18 handlers)
- Log injection — added
sanitizeForLog()to allprocess.stderr.writecalls in file-mirror.ts - scrypt cost increased —
SCRYPT_COSTraised from 16384 to 65536 per OWASP 2023 recommendations - projectDir disclosure — removed server filesystem path from project list API response
Improvements
- Graph export size — stripped
body,pendingImports,pendingEdgesfrom/api/graphresponse, reducing payload by 50-100 MB on large projects - PromiseQueue rewrite — replaced
.then()chain with array-based drain loop to prevent memory growth under sustained mutation load
v1.3.2
Released: March 2026
Highlights
- Signature Extraction Fix —
sliceBeforeBodynow uses ASTbodyNode.startPosition.columninstead ofindexOf('{'), fixing truncated signatures for functions with destructured params or type annotations containing braces. - API Key Security —
apiKeyremoved fromGET /api/auth/statusresponse to prevent exposure in DevTools/proxy logs. New dedicatedGET /api/auth/apikeyendpoint (requires JWT cookie). - Cookie Secure Flag — New
server.cookieSecureconfig option for explicit control over cookieSecureattribute, replacing unreliableNODE_ENVguessing. - Indexer Race Condition Fix —
dispatchRemovenow enqueues removals into serial queues instead of executing synchronously, preventing races with in-flight indexing tasks.
Fixes
sliceBeforeBody— usebodyNode.startPosition.columnfor accurate body brace detection; fixes signatures like({ data }: { data: string }) =>andparse(cfg: { key: string })_wikiIndex— cache now invalidated when.mdfiles are added or removed during watch mode; previously[[NewFile]]wiki links wouldn't resolve until restartdispatchRemove— enqueued to serial queues (docs/code/files) to prevent race with in-flightindexDocFile/indexCodeFiletasks during rapid file changesdispatchAdd— added missingdocGraphnull check (consistent withdispatchRemove)- Default
codeInclude— expanded from**/*.{js,ts,jsx,tsx}to**/*.{js,ts,jsx,tsx,mjs,mts,cjs,cts}to cover ES module and CommonJS variants - File index removal now logged (
[indexer] removed file ...) for debugging parity with docs/code removal - CORS
credentials: truenow always enabled (was missing in zero-config mode, breaking cookie auth behind reverse proxy) - CLI version now read from
package.jsoninstead of hardcoded
Security
apiKeyno longer returned in/api/auth/status— useGET /api/auth/apikeyinsteadserver.cookieSecureconfig for explicitSecurecookie flag (fallback:NODE_ENV !== 'development')- CORS credentials always enabled for cookie-based auth support
Documentation
- Deep audit of docs/, site/, UI help, and example config — fixed stale test counts, missing endpoints (
/api/workspaces,/api/auth/apikey), wrong embed API format, missing server settings in config tables - Added
cookieSecureto all config references (docs, site, UI help, example YAML) - Updated
codeIncludedefault pattern across all documentation sources
v1.3.1
Highlights
- Code Audit Bugfixes — 10 bugs fixed from deep codebase audit: Unicode signature extraction, import-based symbol disambiguation, BM25 body truncation, embedding codec optimization, attachment limits, graph persistence recovery, WebSocket cleanup.
- Embedding API Base64 —
POST /api/embednow supportsformat: "base64"for compact transfer (~2x smaller than JSON number arrays). - REST Embedding Stripping — GET endpoints for notes/symbols/docs no longer return raw embedding vectors.
- Centralized Defaults — All magic numbers extracted to
src/lib/defaults.ts(~80 constants).
Fixes
buildSignature— line-based slicing instead of byte offsets; correct for Cyrillic/emoji in JSDocgetDocComment— usepreviousNamedSiblingfor robustness across tree-sitter grammarsresolvePendingEdges— disambiguate via import edges when multiple classes share the same namefloat32ToBase64— O(n)Buffer.frominstead of O(n²) string concatenation- BM25 body truncation to 2000 chars prevents
avgDldistortion from large code files - Parser caches (
_pathMappings,_wikiIndex) cleared between projects in multi-project mode - Graph
loadGraphrecovers from interrupted saves via.tmpfile fallback - WebSocket
attachWebSocketreturns cleanup function for listener removal
Security
- Attachment limits enforced: 10 MB per file, 20 per entity (note/task/skill)
- REST endpoints strip embedding vectors from responses (matching MCP tool behavior)
v1.3.0
Release Notes — v1.3.0
Date: 2026-03-21
Previous release: v1.2.0 (2026-03-19)
Commits: 21
Changes: 186 files changed, 11,054 insertions, 1,223 deletions
Tests: 1,507 tests across 36 suites (all passing)
Highlights
MCP Authentication & Per-User Access Control
MCP endpoints were previously open to anyone who knew the URL. Now:
- API key authentication on MCP session creation (
Authorization: Bearer <apiKey>) - If users are configured, a valid API key is required; otherwise backward-compatible (no auth)
- Per-user tool visibility — mutation tools are hidden from users with read-only access (
r) on a graph - Users with
denyaccess don't see the graph's tools at all - Timing-safe API key comparison (reuses existing
resolveUserFromApiKey)
Per-Graph Readonly Mode
New readonly: boolean option in graph config:
projects:
my-project:
graphs:
knowledge:
readonly: true # searchable, but all mutation tools hidden- Mutation MCP tools not registered (clients don't see them)
- REST mutations return 403 Forbidden
- File mirror (
.notes/,.tasks/,.skills/) skips readonly graphs - Tools explorer respects readonly (defense-in-depth)
- Readonly overrides per-user
rwaccess — it's a graph-level lock
Mega Prompt Builder
New UI feature — Simple and Advanced modes for generating AI prompts from project context:
- Simple mode: quick prompt generation from selected context
- Advanced mode: tab-based UI with granular content selection, code/docs sources, and preview
- Content audit and quality improvements
Connect MCP Dialog
New "Connect" button in the UI header:
- Config snippets for .mcp.json, Claude CLI, Cursor, and Windsurf
- Auto-detects and pre-fills API key when auth is enabled
- Copy-to-clipboard for each config variant
Code Parser — 6-Phase Audit
Deep audit of tree-sitter code parsing and related systems:
- Phase 1: Fix TSX grammar loading, WASM memory leak, symbol extraction accuracy
- Phase 2: Graph structure, indexer robustness, import resolution improvements
- Phase 3: Search quality — symbol matching,
includeBodysupport - Phase 4: Docs link extraction, wiki-link caching
- Phase 5: Persistence safety, embedding vector compression, stop words
- Phase 6: Embedder test fixes, search quality end-to-end tests
UI Bundle Optimization
- Vendor code splitting via Vite
manualChunks— react, mui, mui-icons, markdown, md-editor, graph - Lazy loading of
@uiw/react-md-editor(~679 kB) viaReact.lazy - Initial bundle reduced from 1,942 kB to ~653 kB
Security
- MCP auth: Bearer API key required when users are configured
- Readonly enforcement: mutation tools hidden from MCP, 403 on REST, mirror watcher skipped
- Security hardening: input validation, safe graph operations (full project audit)
- License change: ISC → Elastic License 2.0 (ELv2) — source-available, self-hosting allowed, managed service prohibited
Server Startup
- HTTP server now starts after all initialization and indexing completes
- Startup banner shows all project/workspace MCP endpoints when ready
Testing
- +267 new tests (1,240 → 1,507)
- REST API coverage: all 70 endpoints tested
- MCP auth tests (config parsing, readonly, user access)
- MCP readonly tests (tool visibility, canAccess/canMutate)
- REST readonly tests (403 on mutations, 200 on reads)
- Code parser, docs, graphs, search — comprehensive coverage
- Search quality end-to-end tests
Documentation
Updated docs across the board:
configuration.md— readonly mode, examplesauthentication.md— MCP auth section, per-user tool visibilityapi-mcp.md— auth requirements, readonly tool hidingapi-rest.md— readonly in project list responsesecurity.md— MCP auth, readonly as defense-in-depthtesting.md— updated test counts and patternsnpm-package.md— license update- UI help guides — readonly mentions in knowledge, task, skill tool docs
Community
- CONTRIBUTING.md — development workflow, project structure, test patterns, guidelines
- CODE_OF_CONDUCT.md — Contributor Covenant 2.1
- SECURITY.md — vulnerability reporting policy (GitHub Security Advisories + email)
Breaking Changes
- License: Changed from ISC to Elastic License 2.0. Self-hosting and modification are permitted; offering as a managed/hosted service is not.
- MCP auth: If
usersare configured ingraph-memory.yaml, MCP clients now requireAuthorization: Bearer <apiKey>header. Existing setups without users are unaffected.
Upgrade Notes
- Update MCP client configs to include API key header if auth is enabled
- Review graph configs — add
readonly: trueto graphs that should be read-only - Review license terms if distributing or hosting the software