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
Out of Scope
- Adding new MCP tools
- Changes to the MCP tool API surface
Technical Notes
src/mcp/ contains: server.ts (entry point) and tools/ directory
- Key dep:
@modelcontextprotocol/sdk v1.0 — should move here from root package.json
- MCP tool handlers must continue to use
withErrorHandling() from src/mcp/errors.ts
Summary
Part of #488. Extract
src/mcp/into a standalone@libscope/mcppackage, isolating the@modelcontextprotocol/sdkdependency from library consumers who don't use MCP.Problem / Motivation
@modelcontextprotocol/sdkis 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/intopackages/mcp/with its ownpackage.json. The package depends on@libscope/corefor 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)@libscope/mcplibscope/mcpentry point (dist/mcp/server.js) continues to resolve for backwards compatibilityOut of Scope
Technical Notes
src/mcp/contains:server.ts(entry point) andtools/directory@modelcontextprotocol/sdkv1.0 — should move here from rootpackage.jsonwithErrorHandling()fromsrc/mcp/errors.ts