-
Notifications
You must be signed in to change notification settings - Fork 1.8k
createMcpHonoApp should support generics for Env (Bindings and Variables) #1877
Copy link
Copy link
Open
Labels
P3Nice to haves, rare edge casesNice to haves, rare edge casesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementIssue is actionable, needs maintainer decision on whether to implementv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Metadata
Metadata
Assignees
Labels
P3Nice to haves, rare edge casesNice to haves, rare edge casesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementIssue is actionable, needs maintainer decision on whether to implementv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
NOTE: This issue is a feedback for v2 alpha.
https://github.com/modelcontextprotocol/typescript-sdk/blob/%40modelcontextprotocol/hono%402.0.0-alpha.2/packages/middleware/hono/src/hono.ts#L44
Currently, createMcpHonoApp returns a plain Hono instance with BlankEnv(
{}).This makes it difficult to access typed environment variables (like c.env.DB in Cloudflare D1) within MCP handlers without resorting to unsafe type casting.
It would be great if we could pass Env types like: