googleapis / googleapis/js-genai

Type declarations require the optional MCP peer

Open
#1,908 3 comments 0 reactions 1 assignee Claimed by @Varun-S10 View on GitHub
api:gemini-api priority: p2 type: bug
Dominant language
TypeScript
Stars
1.7k
Forks
274
Avg merge
2d 7h
Merged PRs (30d)
39

Description

@google/genai 2.19.0 marks @modelcontextprotocol/sdk as an optional peer, but dist/node/node.d.ts imports it unconditionally.

Consumers that do not use MCP receive an unresolved type warning for @modelcontextprotocol/sdk/client/index.js.

Could the declarations avoid requiring the optional peer when MCP is not installed?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.