Skip to content

Commit a2ba833

Browse files
committed
chore: bump to v1.7.0, add Redis to docker-compose, consolidate changelog
1 parent b1f1d40 commit a2ba833

6 files changed

Lines changed: 96 additions & 59 deletions

File tree

demo-projects/graph-memory.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ server:
66
host: "127.0.0.1"
77
port: 3000
88
sessionTimeout: 1800
9+
redis:
10+
enabled: false
11+
url: "redis://localhost:6379"
12+
prefix: "mgm:"
13+
embeddingCacheTtl: "30d"
914
model:
1015
name: "Xenova/bge-m3"
1116
pooling: "cls"

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ services:
1010
- models:/data/models
1111
environment:
1212
- NODE_ENV=production
13+
depends_on:
14+
redis:
15+
condition: service_healthy
16+
17+
redis:
18+
image: redis:7-alpine
19+
restart: unless-stopped
20+
volumes:
21+
- redis-data:/data
22+
healthcheck:
23+
test: ["CMD", "redis-cli", "ping"]
24+
interval: 10s
25+
timeout: 3s
26+
retries: 3
1327

1428
volumes:
1529
models:
30+
redis-data:

docs/docker.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,28 @@ services:
3535
- /path/to/my-app:/data/projects/my-app
3636
- models:/data/models
3737
restart: unless-stopped
38+
depends_on:
39+
redis:
40+
condition: service_healthy
41+
42+
redis:
43+
image: redis:7-alpine
44+
restart: unless-stopped
45+
volumes:
46+
- redis-data:/data
47+
healthcheck:
48+
test: ["CMD", "redis-cli", "ping"]
49+
interval: 10s
50+
timeout: 3s
51+
retries: 3
3852

3953
volumes:
4054
models:
55+
redis-data:
4156
```
4257
58+
> Redis is optional. Remove the `redis` service and `depends_on` if you don't need shared session store or embedding cache. See [configuration.md](configuration.md#redis) for the `server.redis` settings.
59+
4360
```bash
4461
docker compose up -d
4562
```
@@ -70,6 +87,9 @@ server:
7087
host: "0.0.0.0" # Bind to all interfaces (required in Docker)
7188
port: 3000
7289
modelsDir: "/data/models" # Match the volume mount
90+
redis:
91+
enabled: true
92+
url: "redis://redis:6379" # Service name from docker-compose
7393
7494
projects:
7595
my-app:
@@ -183,6 +203,24 @@ services:
183203
- /path/to/app1:/data/projects/app1
184204
- /path/to/app2:/data/projects/app2
185205
- models:/data/models
206+
depends_on:
207+
redis:
208+
condition: service_healthy
209+
210+
redis:
211+
image: redis:7-alpine
212+
restart: unless-stopped
213+
volumes:
214+
- redis-data:/data
215+
healthcheck:
216+
test: ["CMD", "redis-cli", "ping"]
217+
interval: 10s
218+
timeout: 3s
219+
retries: 3
220+
221+
volumes:
222+
models:
223+
redis-data:
186224
```
187225

188226
Restart the container to apply config changes.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@graphmemory/server",
3-
"version": "1.6.2",
3+
"version": "1.7.0",
44
"description": "MCP server for semantic graph memory from markdown files",
55
"main": "dist/cli/index.js",
66
"bin": {

site/src/pages/changelog.md

Lines changed: 35 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,66 @@ description: Graph Memory release history and version changes.
55

66
# Changelog
77

8-
## v1.6.3
9-
10-
**Released: March 2026**
11-
12-
### New
13-
14-
- **OAuth 2.0 Authorization Code + PKCE** — full browser-based OAuth flow with PKCE (`S256`) support. Discovery manifest points clients to `/ui/auth/authorize`; authenticated users see a **consent page** and can approve without re-entering credentials. Unauthenticated users sign in first at `/ui/auth/signin`.
15-
- **Frontend consent page** — new UI page at `/ui/auth/authorize` for reviewing and approving OAuth authorization requests. Displays the requesting service's hostname from `redirect_uri`.
16-
- **Frontend login page** — new dedicated login page at `/ui/auth/signin` with `returnUrl` redirect, separate from the main UI auth gate.
17-
- **Refresh token support**`POST /oauth/token` with `grant_type=refresh_token` issues a new access token using a previously issued refresh token (JWT type `oauth_refresh`). Enables long-lived sessions without re-authentication.
18-
- **`oauth_refresh` JWT type** — refresh tokens are self-contained signed JWTs with `type: "oauth_refresh"`. They are only accepted at `POST /oauth/token`; presenting one as a Bearer token for API/MCP access returns 401.
19-
- **New OAuth endpoints**`GET /api/oauth/userinfo` (user info), `POST /api/oauth/introspect` (RFC 7662 token introspection), `POST /api/oauth/revoke` (RFC 7009 token revocation), `POST /api/oauth/end-session` (session termination).
20-
- **Redis session store** — session store is now pluggable. Set `server.redis.url` to use Redis for MCP HTTP sessions instead of the default in-memory store. Enables horizontal scaling and survives server restarts.
21-
- **Redis embedding cache** — embedding cache can be backed by Redis (`server.redis.url`). Embeddings computed once are reused across restarts and shared between server instances.
22-
- **Session store abstraction** — internal `SessionStore` interface with `Memory` and `Redis` implementations. Selecting the backend is done via config; no code changes required.
23-
24-
### Updated OAuth discovery
25-
26-
`GET /.well-known/oauth-authorization-server` now includes `authorization_endpoint`, `token_endpoint`, `userinfo_endpoint`, `introspection_endpoint`, `revocation_endpoint`, `end_session_endpoint`, `response_types_supported: ["code"]`, `code_challenge_methods_supported: ["S256"]`, and `refresh_token` in `grant_types_supported`.
27-
28-
---
29-
30-
## v1.6.2
31-
32-
**Released: March 2026**
33-
34-
### New
35-
36-
- **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`). The consent page at `/ui/auth/authorize` handles user approval; `POST /api/oauth/authorize` issues authorization codes for authenticated sessions.
37-
- **Refresh tokens**`POST /oauth/token` now supports `grant_type=refresh_token`. Tokens are self-contained signed JWTs using the configured `refreshTokenTtl` (default `7d`). Access and refresh tokens use the configured `accessTokenTtl`/`refreshTokenTtl` from `graph-memory.yaml`.
38-
- **Updated OAuth discovery**`/.well-known/oauth-authorization-server` now includes `authorization_endpoint`, `response_types_supported: ["code"]`, `code_challenge_methods_supported: ["S256"]`, and `refresh_token` in `grant_types_supported`.
39-
40-
---
41-
42-
## v1.6.1
43-
44-
**Released: March 2026**
45-
46-
### Fixes
47-
48-
- **Express `trust proxy`** — enabled `trust proxy` so that `X-Forwarded-For` and `X-Forwarded-Proto` headers from reverse proxies (nginx, etc.) are correctly trusted. Fixes real IP detection for rate limiting and `Secure` cookie behavior behind HTTPS proxies.
49-
50-
---
51-
52-
## v1.6.0
8+
## v1.7.0
539

5410
**Released: March 2026**
5511

5612
### Highlights
5713

58-
- **OAuth 2.0 for AI chat clients** — Graph Memory now implements the OAuth 2.0 `client_credentials` flow. AI chat clients that support OAuth connectors (Claude.ai, etc.) can authenticate automatically — no manual API key headers required. Client ID = `userId`, Client Secret = `apiKey` from config.
14+
- **Full OAuth 2.0 support** — both `client_credentials` and Authorization Code + PKCE (`S256`) grant types. AI chat clients (Claude.ai, etc.) authenticate via the browser-based consent flow; programmatic clients use client credentials. Discovery at `GET /.well-known/oauth-authorization-server`.
15+
- **Frontend auth pages** — consent page at `/ui/auth/authorize` (shows requesting service hostname, inline login if needed), standalone login page at `/ui/auth/signin` with `returnUrl` redirect.
16+
- **Redis backend** — optional Redis support (`server.redis`) for session store (auth codes, OAuth sessions) and embedding cache. Enables horizontal scaling and survives server restarts. In-memory fallback when disabled.
5917
- **Tool naming consistency** — all 58 MCP tools audited and renamed to consistent `graph_verb_noun` prefixes. Parameter names, defaults, and descriptions aligned across MCP tools and REST endpoints.
60-
- **Array syntax for `include` patterns** — the `include` field in graph config now accepts a YAML array in addition to a single glob string, matching the existing `exclude` behavior.
61-
- **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.
6218

6319
### New Endpoints
6420

6521
- `GET /.well-known/oauth-authorization-server` — RFC 8414 OAuth discovery metadata
66-
- `POST /oauth/token` — OAuth 2.0 `client_credentials` grant; returns a short-lived Bearer JWT (1 hour, type `oauth_access`)
22+
- `POST /api/oauth/authorize` — issue authorization code (JSON request/response)
23+
- `POST /oauth/token` — token exchange for `client_credentials`, `authorization_code`, and `refresh_token` grants
24+
- `GET /api/oauth/userinfo` — returns `{ sub, name, email }` from Bearer token
25+
- `POST /api/oauth/introspect` — RFC 7662 token introspection
26+
- `POST /api/oauth/revoke` — RFC 7009 token revocation
27+
- `POST /api/oauth/end-session` — session termination
28+
29+
### OAuth
30+
31+
- **`oauth_refresh` JWT type** — refresh tokens are self-contained signed JWTs with `type: "oauth_refresh"`, separate from UI `refresh` type. Only accepted at `POST /oauth/token`.
32+
- **Atomic auth code exchange**`SessionStore.getAndDelete()` prevents TOCTOU race conditions on single-use authorization codes.
33+
- **PKCE S256** — code challenge verification required for all Authorization Code flows.
34+
- **Open redirect protection**`returnUrl` on `/ui/auth/signin` validated to allow only relative paths.
6735

6836
### Security
6937

70-
- **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
71-
- **`WWW-Authenticate: Bearer` on 401** — MCP endpoints include the RFC 6750 required header on all 401 responses, enabling OAuth clients to trigger automatic re-authentication
38+
- **Auth before project lookup** — MCP handler checks authentication before resolving the project, preventing project ID enumeration
39+
- **`WWW-Authenticate: Bearer` on 401** — RFC 6750 header on all MCP 401 responses
40+
- **Express `trust proxy`**`X-Forwarded-For` and `X-Forwarded-Proto` correctly trusted behind reverse proxies
41+
42+
### Configuration
43+
44+
- New `server.redis` section: `enabled`, `url`, `prefix`, `embeddingCacheTtl`
45+
- Docker Compose includes Redis service with healthcheck
46+
- `include` field accepts YAML array in addition to single glob string
7247

7348
### Fixes
7449

50+
- **Cleaner MCP responses** — internal fields (`fileEmbedding`, `pendingLinks`, `pendingImports`, `pendingEdges`, `version`), null values, and empty arrays stripped
7551
- `docs_get_node` — removed `fileEmbedding`, `pendingLinks`, `mtime` from response
7652
- `code_get_symbol` — removed `fileEmbedding`, `pendingImports`, `pendingEdges` from response
7753
- `notes_get`, `tasks_get`, `skills_get` — removed `version`; null fields and empty arrays stripped
78-
- `notes_list` — removed content preview field (not in tool description)
7954

8055
### Tests
8156

82-
- 33 new tests in `oauth.test.ts`: unit tests for `signOAuthToken` and `resolveUserFromBearer`, supertest coverage of discovery and token endpoints, integration tests against a real HTTP server for `WWW-Authenticate` header behavior
57+
- 1700 tests across 44 suites
58+
- Full OAuth endpoint coverage: discovery, authorize, token (all 3 grants), userinfo, introspect, revoke, end-session
59+
- Session store unit tests (Memory + Redis mock)
60+
- Embedding cache unit tests (Memory LRU + Redis mock)
8361

8462
### Documentation
8563

86-
- `docs/authentication.md` — added OAuth 2.0 section with endpoint reference and token format
87-
- `site/docs/security/authentication.md` — new OAuth 2.0 subsection and "Connecting Claude.ai" guide
88-
- `site/docs/guides/mcp-clients.md` — new Claude.ai section with connector setup instructions
64+
- Updated all auth docs: `docs/authentication.md`, `docs/security.md`, `docs/api-rest.md`, `docs/configuration.md`
65+
- Updated site docs: `security/authentication.md`, `guides/mcp-clients.md`, `getting-started/configuration.md`
66+
- Updated `README.md` with OAuth and Redis overview
67+
- Updated `docs/docker.md` with Redis compose example
8968

9069
---
9170

0 commit comments

Comments
 (0)