Skip to content

Add initialize request metadata support#1046

Closed
smf-h wants to merge 1 commit into
modelcontextprotocol:mainfrom
smf-h:ix-initialize-request-meta
Closed

Add initialize request metadata support#1046
smf-h wants to merge 1 commit into
modelcontextprotocol:mainfrom
smf-h:ix-initialize-request-meta

Conversation

@smf-h

@smf-h smf-h commented Jun 29, 2026

Copy link
Copy Markdown

Summary

  • add optional _meta support for MCP initialize requests
  • expose initialize-request metadata on async and sync client builders
  • propagate metadata through lifecycle initialization while defensively copying user-provided maps

Validation

  • .\mvnw.cmd -pl mcp-core "-Dtest=LifecycleInitializerTests,McpAsyncClientTest,McpSyncClientTest" test
  • Result: BUILD SUCCESS; Tests run: 37, Failures: 0, Errors: 0, Skipped: 0

Fixes #940

@Kehrlann

Kehrlann commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

I'm wondering whether we should really implement #940 . If we do, we need to decide how to implement it.
Let's start the discussion there, and, if need be, we can open a PR later on.

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.

McpClient should allow passing _meta in InitializeRequest

2 participants