Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Summary

SchemaCache is now always created in NewHTTPMcpHandler, not passed as an option. Streamable HTTP servers always need schema caching for per-request MCP server creation.

Why

Review feedback on #1993: schema cache isn't a config—it's an architectural requirement for HTTP mode. Making it optional adds complexity without value.

What changed

  • Removed WithSchemaCache option function and SchemaCache field from HandlerOptions
  • Schema cache now created directly in NewHTTPMcpHandler constructor
  • Removed schema cache creation and WithSchemaCache call from RunHTTPServer

MCP impact

  • No tool or API changes

Internal refactor only—removes optional parameter that should always be set.

Prompts tested (tool changes only)

N/A

Security / limits

  • No security or limits impact

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed

Internal implementation change with no external API impact.

Original prompt

Pull Request: #1993

Look at making this just an opinionated default and don't make it optional. It's not really a config, we always will want schemacache to be defined in streamable http server instances.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
@SamMorrowDrums SamMorrowDrums marked this pull request as ready for review February 11, 2026 09:58
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner February 11, 2026 09:58
Copilot AI review requested due to automatic review settings February 11, 2026 09:58
Copilot AI changed the title [WIP] Set schemacache as required for streamable HTTP server Make SchemaCache an opinionated default in HTTP handlers Feb 11, 2026
@SamMorrowDrums SamMorrowDrums merged commit 0e71f57 into sammorrowdrums/add-schema-cache-http Feb 11, 2026
2 checks passed
@SamMorrowDrums SamMorrowDrums deleted the copilot/set-schemacache-default-value branch February 11, 2026 09:58
Copilot AI requested a review from SamMorrowDrums February 11, 2026 09:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converts the SchemaCache from an optional configuration to an opinionated default by creating it directly in the NewHTTPMcpHandler constructor. This simplifies the API while ensuring the performance optimization is always present for the streamable HTTP server, which creates a new MCP server instance for each request.

Changes:

  • Removed WithSchemaCache option function and SchemaCache field from HandlerOptions
  • Moved schema cache instantiation from RunHTTPServer into NewHTTPMcpHandler constructor
  • Removed unused mcp import from pkg/http/server.go

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/http/server.go Removed schema cache creation and WithSchemaCache option call; removed unused mcp import
pkg/http/handler.go Removed SchemaCache field from HandlerOptions and WithSchemaCache option function; moved schema cache creation into NewHTTPMcpHandler constructor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants