Skip to content

feat(context): restrict MCP sessions to a subset of installed libs via --libs#85

Merged
moshest merged 1 commit into
mainfrom
claude/reply-github-issue-84-11Ih7
May 15, 2026
Merged

feat(context): restrict MCP sessions to a subset of installed libs via --libs#85
moshest merged 1 commit into
mainfrom
claude/reply-github-issue-84-11Ih7

Conversation

@moshest
Copy link
Copy Markdown
Member

@moshest moshest commented May 15, 2026

Summary

  • Adds context serve --libs <names...> to restrict an MCP session to a fixed subset of installed libraries
  • Each spec is name (react) or name@version (react@18.3.1); unknown names or version mismatches abort startup with a per-spec error
  • When --libs is set, get_docs's library enum is filtered to that subset and search_packages / download_package are not registered, so the session is locked to that list

Closes #84.

Test plan

  • pnpm lint
  • pnpm build
  • pnpm test (157 passed, including new parseLibSpec, resolveAllowedLibraries, and end-to-end allowedLibraries filtering tests)
  • README updated with the new option
  • Changeset added (minor)

Generated by Claude Code

…a --libs

`context serve --libs react next@15` filters the get_docs library enum to the
listed packages and hides search_packages / download_package so the session is
locked to that fixed set. Lets users keep many packages installed globally
while exposing only the relevant subset per project (closes #84).
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

🦋 Changeset detected

Latest commit: aed7f66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@neuledge/context Minor
@neuledge/registry Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@moshest moshest merged commit 1d0a5f6 into main May 15, 2026
3 checks passed
@moshest moshest deleted the claude/reply-github-issue-84-11Ih7 branch May 15, 2026 09:53
@github-actions github-actions Bot mentioned this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --libs parameter to filter active libraries

2 participants