-
Notifications
You must be signed in to change notification settings - Fork 0
feat: extract @libscope/mcp — MCP server for Claude/Claude Desktop #495
Copy link
Copy link
Open
Labels
Description
Summary
Part of #488. Extract src/mcp/ into a standalone @libscope/mcp package, isolating the @modelcontextprotocol/sdk dependency from library consumers who don't use MCP.
Problem / Motivation
@modelcontextprotocol/sdk is a heavy dependency that's irrelevant to any consumer not integrating with Claude Desktop or the MCP protocol. Today it's bundled into the main package install. Extracting it means library consumers who just want semantic search no longer pay for it.
Proposed Solution
Move src/mcp/ into packages/mcp/ with its own package.json. The package depends on @libscope/core for all data access and exposes a single entry point: the MCP server.
Acceptance Criteria
-
@libscope/mcpbuilds independently and@modelcontextprotocol/sdkis a dependency of this package only (not@libscope/core) - All MCP tools (document management, search, Q&A, webhooks, ratings, tags, links, saved searches) function correctly when the server is started via
@libscope/mcp - The existing
libscope/mcpentry point (dist/mcp/server.js) continues to resolve for backwards compatibility - MCP server starts cleanly and passes existing integration tests
Out of Scope
- Adding new MCP tools
- Changes to the MCP tool API surface
Technical Notes
src/mcp/contains:server.ts(entry point) andtools/directory- Key dep:
@modelcontextprotocol/sdkv1.0 — should move here from rootpackage.json - MCP tool handlers must continue to use
withErrorHandling()fromsrc/mcp/errors.ts
Reactions are currently unavailable