Commit graph servers/src/memory
Author SHA1 Message Date
GitHub Actions
6dd0a683e1 Automatic update of packages
Some checks failed
Python / detect-packages (push) Has been cancelled
TypeScript / detect-packages (push) Has been cancelled
Python / Test (push) Has been cancelled
Python / Build (push) Has been cancelled
TypeScript / Test (push) Has been cancelled
TypeScript / Build (push) Has been cancelled
2026-07-04 23:04:26 +00:00
cliffhall
1a4ecb7575 ci(release): switch npm publishing to OIDC trusted publishing
The NPM_TOKEN used by publish-npm is dead (npm classic-token sunset) —
both June release attempts failed publishing with a disguised auth error
(E404 on the publish PUT) after PyPI legs succeeded. Each
@modelcontextprotocol/* package's npm trusted publisher is being bound to
this workflow (release.yml) + the release environment, so publish-npm now
authenticates via OIDC instead of a token:

- add id-token: write permission to publish-npm (required to mint the
  OIDC token; contents: read added explicitly since setting permissions
  drops the defaults)
- upgrade the npm CLI in the publish job (trusted publishing requires
  npm >= 11.5.1; Node 22 bundles an older npm)
- drop NODE_AUTH_TOKEN from the publish step

Also touch each TypeScript server's README (add everything's missing
License section; link each package's npm page) so scripts/release.py
includes all four packages in the next npm publish matrix — they've been
stranded on npm at 2026.1.26 while PyPI advanced to 2026.6.16.

See #4463 for the rollout plan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AViME1R9ES2UXT1uQDx1TG
2026-07-03 20:16:55 -04:00
Lazreg Raed
7b1170d1da
feat(memory): expose knowledge graph as MCP Resource (#3323)
* feat(memory): expose knowledge graph as MCP Resource

Register the knowledge graph as a readable MCP Resource at
memory://knowledge-graph, enabling clients to discover and read
the graph via the Resources protocol without invoking a tool.

Mutation tools (create_entities, create_relations, add_observations,
delete_entities, delete_observations, delete_relations) now emit
notifications/resources/updated so subscribed clients see live
graph changes.

Resource registration is extracted into the exported
registerKnowledgeGraphResource() function so it can be unit-tested
in isolation, mirroring the everything server's registration
pattern. New tests assert registerResource is called with the
correct kebab-case name, URI, mime type, and that the handler
returns the graph as JSON in the contents array.

Addresses PR #3323 review feedback:
- kebab-case resource name per CLAUDE.md style guide
- single-line comment per CLAUDE.md style guide
- title metadata for client discoverability
- resource update notifications after mutations
- test coverage matching everything/registrations.test.ts pattern
- README documents the new Resource

* feat(memory): support resources/subscribe for the knowledge-graph resource

PR #3323 emitted notifications/resources/updated after every mutation but
the server only advertised resources.listChanged, so resources/subscribe
returned -32601 and a spec-compliant client could never actually subscribe.

Declare resources.subscribe, add subscribe/unsubscribe request handlers that
track subscribed URIs, and only emit notifications/resources/updated when the
client has subscribed to that URI.

Co-authored-by: Lazreg Raed <lazregraed222@gmail.com>

---------

Co-authored-by: olaservo <olahungerford@gmail.com>
2026-06-16 18:40:51 -07:00
olaservo
0588ec098e fix(security): bump vulnerable deps; harden git_add (defense-in-depth)
Real fixes (deps):
- python (git/fetch/time): idna 3.10->3.18 (GHSA-65pc), starlette
  0.49.1->1.3.1 (GHSA-86qp)
- npm: vitest ^2.1.8->^4.1.8 (critical GHSA-5xrq UI server RCE). vitest 4
  pulls vite 8 (rolldown, no esbuild), clearing the esbuild/vite advisories
  natively. Remaining root overrides: qs>=6.15.2 (GHSA-q8mj, via express),
  hono>=4.12.21 (via @modelcontextprotocol/sdk).
- npm audit: 0 vulnerabilities; all TS (313) + Python (git/fetch/time) suites
  and TS builds pass.

Hardening (git_add):
- The repo already mitigates CVE-2026-27735 by using repo.git.add (the git
  CLI rejects out-of-tree paths, PR #3164's fix), not repo.index.add (which
  did not). Add an explicit path-boundary check in git_add as defense in
  depth plus regression tests asserting the security invariant (out-of-tree
  paths are never staged), guarding against a regression to repo.index.add.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 13:46:02 -07:00
Yash Shah
64b1cb0208
feat(memory): add tool annotations to all knowledge graph tools (#3874)
Add MCP ToolAnnotations to all 9 tools in the memory server, matching
the annotation coverage already present in server-filesystem, server-git,
server-time, and server-sequential-thinking.

- Read tools (read_graph, search_nodes, open_nodes): read-only, idempotent
- Write tools (create_entities, create_relations, add_observations): non-destructive
- Delete tools (delete_entities, delete_observations, delete_relations): destructive, idempotent
- All tools: openWorldHint=false (local JSONL file operations only)

Co-authored-by: Ola Hungerford <olahungerford@gmail.com>
2026-05-30 11:35:20 -07:00
Konstantin Konstantinov
ef51b062f6
bump packages to 1.29.0 SDK 2026-05-11 15:17:39 +03:00
ShionElia
e21dbea731 docs: add Windows npx wrapper examples 2026-03-21 04:10:32 +00:00
DukeDeSouth
ca7ea2253e fix(memory): return relations connected to requested nodes in openNodes/searchNodes
Previously, `openNodes` and `searchNodes` only returned relations where
BOTH endpoints were in the result set (using `&&`). This silently
dropped all relations to/from nodes outside the set — making it
impossible to discover a node's connections without calling `read_graph`
and filtering the entire dataset client-side.

Changed the filter from `&&` to `||` so that any relation with at least
one endpoint in the result set is included. This matches the expected
graph-query semantics: when you open a node, you should see all its
edges, not just edges to other opened nodes.

Fixes #3137

Tests updated and new cases added covering:
- Outgoing relations to nodes not in the open set
- Incoming relations from nodes not in the open set
- Relations connected to a single opened node
- searchNodes returning outgoing relations to unmatched entities

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 20:14:27 -05:00
dependabot[bot]
e95bb9c44b
Bump the npm_and_yarn group across 1 directory with 2 updates
Bumps the npm_and_yarn group with 1 update in the / directory: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk).


Updates `@modelcontextprotocol/sdk` from 1.25.2 to 1.26.0
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/v1.25.2...v1.26.0)

Updates `hono` from 4.11.3 to 4.11.7
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.11.3...v4.11.7)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.26.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: hono
  dependency-version: 4.11.7
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-04 20:38:38 +00:00
Ola Hungerford
760829a778
Merge pull request #3206 from modelcontextprotocol/chore/apache-2.0-license
chore: update licensing to Apache 2.0 for new contributions
2026-02-04 06:00:33 -07:00
Sashank Meka
8af50b9418 remove type from loading 2026-01-13 22:02:20 -05:00
Adam Jones
6b36e3c223
chore: update licensing to Apache 2.0 for new contributions 2026-01-12 22:50:22 +00:00
dependabot[bot]
737ce98e4a
Bump @modelcontextprotocol/sdk
Bumps the npm_and_yarn group with 1 update in the / directory: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk).


Updates `@modelcontextprotocol/sdk` from 1.24.0 to 1.25.2
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/1.24.0...v1.25.2)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.25.2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 16:49:05 +00:00
dependabot[bot]
1c654a4e7d
chore(deps): bump @modelcontextprotocol/sdk
Bumps the npm_and_yarn group with 1 update in the / directory: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk).


Updates `@modelcontextprotocol/sdk` from 1.23.0 to 1.24.0
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/1.23.0...1.24.0)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.24.0
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-02 17:40:23 +00:00
adam jones
d9929014d5
Add mcpName and repository fields for MCP registry (#3068)
Adds metadata required for registering servers in the MCP registry:

- NPM servers (everything, filesystem, memory, sequentialthinking):
  Added mcpName and repository fields to package.json

- PyPI servers (fetch, git, time):
  Added mcp-name comment to README.md

Part of #3047
2025-11-26 14:29:36 +00:00
adam jones
3154518344
Update @modelcontextprotocol/sdk to 1.23.0 in TypeScript servers (#3065)
Update the SDK from ^1.19.1 to ^1.23.0 in all TypeScript reference servers:
- everything
- filesystem
- memory
- sequentialthinking

Also update everything server for SDK breaking changes:
- Update zod to ^3.25.0 (zod v4 compatibility)
- Fix ToolInput/ToolOutput types to use Tool["inputSchema"] instead of
  inferring from zod schemas
- Fix result.content handling to support array format

Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
2025-11-26 12:32:37 +00:00
Adam Jones
350ffeec01
Fix VS Code MCP documentation URLs
Update links to point to the new location at /docs/copilot/customization/mcp-servers
2025-11-25 22:11:56 +00:00
adam jones
b84637314f
fix(memory): convert to modern TypeScript SDK APIs (#3015)
* fix(memory): convert to modern TypeScript SDK APIs

Convert the memory server to use the modern McpServer API instead of
the low-level Server API.

Key changes:
- Replace Server with McpServer from @modelcontextprotocol/sdk/server/mcp.js
- Convert all 9 tools to use registerTool() instead of manual request handlers
- Create reusable Zod schemas for Entity and Relation types
- Use Zod schemas directly in inputSchema/outputSchema
- Add structuredContent to all tool responses
- Fix type literals to use 'as const' assertions

The modern API provides:
- Less boilerplate code (removed ~200 lines of schema definitions)
- Better type safety with Zod
- More declarative tool registration
- Cleaner, more maintainable code

* fix: exclude test files from TypeScript build

Add exclude for test files and vitest.config.ts to tsconfig
2025-11-20 19:09:44 +00:00
olaservo
e68a555943 Add Vitest testing framework and implement tests for memory management features 2025-10-28 20:06:34 -07:00
Ola Hungerford
78af9ddffb
Merge branch 'main' into claude/issue-2361-20250817-1626 2025-10-19 07:45:22 -07:00
olaservo
f6fbfc4c5e Merge remote-tracking branch 'upstream/main' into add-sequentialthinking-tests-update-sdk 2025-10-12 18:09:41 -07:00
olaservo
072e53322b Add tests for sequential thinking and update typescript sdk versions 2025-10-07 23:01:42 -07:00
Aonan Guan
52ab84cd63
Improve memory server schema validation (#2726)
- Add explicit property filtering in saveGraph method
- Add additionalProperties constraints to input schemas
2025-09-18 15:11:12 +01:00
claude[bot]
eb58a522b3 Add clearer console error messages for memory file migration detection
- Added DETECTED message when legacy memory.json file is found
- Added COMPLETED message when migration finishes successfully
- Improves visibility of backward compatibility migration process

Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2025-08-24 03:01:06 +00:00
claude[bot]
53104a65e9 Add backward compatibility for memory.json -> memory.jsonl migration
When no custom MEMORY_FILE_PATH is set and memory.json exists but
memory.jsonl doesn't exist, automatically migrate the old file to
the new format with proper file extension.

This ensures existing users don't lose their data when upgrading
to the version with the corrected .jsonl extension.

Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2025-08-24 02:51:58 +00:00
claude[bot]
9d8c2dfcaf fix: Change memory server default filename from memory.json to memory.jsonl
The Memory MCP server uses JSONL format (JSON Lines) where each line
contains a separate JSON object, but was using a .json file extension.
This caused IDE lint errors and confusion since the file is not valid JSON.

Changes:
- Update default filename in index.ts from memory.json to memory.jsonl
- Update documentation references in README.md
- Maintain backward compatibility for existing MEMORY_FILE_PATH configs

Fixes #2361

Co-authored-by: Ola Hungerford <olaservo@users.noreply.github.com>
2025-08-17 16:28:38 +00:00
Ola Hungerford
1028b32573
Merge pull request #2328 from kunalbabre/main
docs: Update VS Code installation instructions to use mcp.json for issue  #2320
2025-08-07 07:28:32 -07:00
Ola Hungerford
b537504115
Merge branch 'main' into ajoslin/memory 2025-07-16 00:02:04 -07:00
Kunal Babre
55a36ad0dd docs: Clean up VS Code installation instructions
- Remove unnecessary explanatory note about JSON format
- JSON examples already demonstrate the correct format clearly
- Streamlines documentation to focus on essential information
- Maintains reference to official VS Code MCP documentation

The removed note was redundant since both configuration methods 
use identical JSON structure shown in the examples.
2025-07-11 22:53:13 -07:00
Kunal Babre
95a72b792f docs: Add reference to official VS Code MCP documentation
- Add link to official VS Code MCP documentation in all server READMEs
- Enhances existing VS Code installation instructions with authoritative reference
- Provides users with comprehensive documentation for advanced configuration
- Complements the existing two-method approach with additional resources

Affects: everything, filesystem, git, memory, sequentialthinking
2025-07-11 22:45:10 -07:00
Kunal Babre
20eb59590e docs: Update VS Code installation instructions to use mcp.json
- Replace outdated 'Preferences: Open Settings (JSON)' instructions
- Add proper guidance for 'MCP: Open User Configuration' command
- Update JSON examples to remove mcp wrapper key
- Clarify user vs workspace configuration methods
- Fixes issue with outdated documentation across all servers

Affects: sequentialthinking, filesystem, memory, everything, git
2025-07-11 21:36:21 -07:00
Spencer Gray
8868efb9b1
Update README.md
Simple typo fix for an ordered list under the System Prompt section.
2025-07-03 10:03:22 -04:00
allen joslin
063a44a1dd
Merge branch 'main' into ajoslin/memory 2025-05-01 17:04:28 -04:00
David Soria Parra
52db0d9899
Merge pull request #1243 from burkeholland/burkeholland-vscode-install-instructions
Update READMEs with instructions for VS Code installation
2025-04-22 10:56:19 +01:00
olaservo
c093906095 Update server version to match package semantic version 2025-04-21 06:28:25 -07:00
Burke Holland
090b6b7c1a Move VS Code below Claude 2025-04-10 12:10:02 -05:00
Al Joslin
045b15a614 maybe AI makes more sense 2025-04-05 19:55:36 -04:00
Al Joslin
4b9e32d179 explains how not to get confused 2025-04-05 19:52:28 -04:00
Al Joslin
6a50ecadc2 read_graph takes no args 2025-04-05 19:34:29 -04:00
Burke Holland
e6db372447 Update READMEs with instructions for VS Code installation 2025-04-03 16:37:27 -05:00
Jerome
9ff0b02f17
Merge pull request #540 from freiit/patch-1
memory-mcp: add a volume to docker, otherwise memory gets lost
2025-02-03 12:39:42 +13:00
Jerome
ab3a1e0143
Merge pull request #392 from s2005/feature/memory-improvements
Feature/memory improvements
2025-02-02 08:53:42 +13:00
freiit
726f50a4d5
add a volume to docker, otherwise memory gets lost 2025-01-17 11:02:20 +01:00
André Holzmüller
0dd9ac9ea0 fix warnings: - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
On branch erdnax123-patch-2
Changes to be committed:
	modified:   src/aws-kb-retrieval-server/Dockerfile
	modified:   src/brave-search/Dockerfile
	modified:   src/everart/Dockerfile
	modified:   src/everything/Dockerfile
	modified:   src/filesystem/Dockerfile
	modified:   src/gdrive/Dockerfile
	modified:   src/github/Dockerfile
	modified:   src/gitlab/Dockerfile
	modified:   src/google-maps/Dockerfile
	modified:   src/memory/Dockerfile
	modified:   src/postgres/Dockerfile
	modified:   src/sequentialthinking/Dockerfile
	modified:   src/slack/Dockerfile
2025-01-02 12:56:40 -03:00
s2005
05fb0eab36
Add newline before server instance initialization
As it was before
2024-12-21 18:59:17 +01:00
s2005
5d0bee0295 fix(memory): revert back instantiation of KnowledgeGraphManager 2024-12-21 18:54:35 +01:00
s2005
04209ec248 feat(memory): add MEMORY_FILE_PATH environment variable support
- Add environment variable MEMORY_FILE_PATH to configure custom storage location
- Support both absolute and relative paths
- Update documentation with configuration examples
- Bump version to 0.6.3
2024-12-21 18:38:12 +01:00
colinmcneil
49044156e3
Update readmes to use new mcp namespace 2024-12-19 13:11:36 -08:00
colinmcneil
4e8a8d270a
Split production node_modules 2024-12-19 13:11:34 -08:00
colinmcneil
9ff603aef5
Update dockerfiles for npx versions, gdrive env credential paths 2024-12-19 13:11:34 -08:00