Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`createMcpHonoApp` should support generics for Env (Bindings and Variables)

Open Beginner friendly
#1,877 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript

Research direction

Start in packages/middleware/hono/src/hono.ts at the createMcpHonoApp definition linked in the issue, and inspect how its current plain Hono instance uses BlankEnv. Make the returned app accept an Env generic so bindings and variables such as c.env.DB remain typed when using createMcpHonoApp(); verify the resulting type behavior in the existing Hono middleware context.

Written by the indexing model from the issue text.

Description

enhancement needs decision P3 v2

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:

const app = createMcpHonoApp<Env>();
Dominant language
TypeScript
Stars
13.5k
Forks
2.2k
Avg merge
3d 11h
Merged PRs (30d)
32

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/typescript-sdk

All issues in modelcontextprotocol/typescript-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.