js-genai: This package should not require MCP
This package recently added a dependency on @modelcontextprotocol/sdk.
The difference between @google/genai 0.14.1 and 1.3.0 is 59 new packages, including:
- A server (Express)
- A transitive dependency (@modelcontextprotocol/sdk > ajv > uri-js) on a package that has not been maintained for 4 years and has 4 CVEs in its dependencies
- MCP’s already-notorious security posture.
I have no desire to ship all this. Those of us who just want to use Gemini / Vertex should not be burdened with the MCP SDK and all that comes with it.
Please make MCP optional, or move those features to a separate module, so that we can use Gemini without shipping a bunch of security holes.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 17
Commits related to this issue
- feat: Make the MCP SDK an optional peer dependency. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 767675019 — committed to googleapis/js-genai by amirh a year ago
- feat: Make the MCP SDK an optional peer dependency. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 767675019 — committed to googleapis/js-genai by amirh a year ago
- feat: Make the MCP SDK an optional peer dependency. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 767675019 — committed to googleapis/js-genai by amirh a year ago
- feat: Make the MCP SDK an optional peer dependency. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 767716774 — committed to googleapis/js-genai by amirh a year ago
- test: Confirm that dependents with no optional dependencies can build https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773787130 — committed to googleapis/js-genai by amirh a year ago
- test: Confirm that dependents with no optional dependencies can build https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773787130 — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
- fix: Fix build errors when the mcp package is not installed. test: Confirm that dependents without the mcp package can build. https://github.com/googleapis/js-genai/issues/663 PiperOrigin-RevId: 773... — committed to googleapis/js-genai by amirh a year ago
Yeah, same issue here. When removing the MCP package, typescript fails to compile:
@sagarnanera use 1.5.1. its fixed.