Expose project-scoped context as an MCP resource - #412
Closed
Lauritz-Timm wants to merge 6 commits into
Closed
Conversation
Lauritz-Timm
force-pushed
the
feat/mcp-memory-resources
branch
from
July 30, 2026 18:09
5e09e17 to
e0af3dd
Compare
Lauritz-Timm
force-pushed
the
feat/mcp-memory-resources
branch
from
July 30, 2026 19:20
e0af3dd to
4a1f74b
Compare
This was referenced Jul 30, 2026
Lauritz-Timm
force-pushed
the
feat/mcp-memory-resources
branch
from
July 30, 2026 19:41
4a1f74b to
8b45b68
Compare
This was referenced Jul 30, 2026
Lauritz-Timm
force-pushed
the
feat/mcp-memory-resources
branch
from
August 4, 2026 19:01
8b45b68 to
87c1336
Compare
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expose one bounded active-project context resource through MCP.
Motivation
MCP resources are useful for context loading, but local transport does not justify exposing all memories, topics, memoirs, and graph links. The resource must remain project-scoped and bounded.
Changes
icm://context/currentcontext-<project>, andcontexte-<project>topicsttlMs: 0for reads-32602for invalid modern resource requestsCompatibility and safety
Modern clients receive result, cache, and server metadata. Legacy clients retain the plain MCP resource shape and existing error behavior. Existing tools are unchanged.
Validation
cargo test -p icm-mcp --locked --offline cargo clippy -p icm-mcp --all-targets --locked --offline -- -D warnings cargo fmt --all -- --checkThe suite covers fixed listings, empty templates and context, localized project topics, cross-project and preference exclusion, truncation, malformed and unknown URIs, both error-code eras, internal errors, and cache policy.
Manual smoke test:
Expected: one fixed resource and a bounded Markdown snapshot for the current project.