Skip to content

Standard header name used in mcp #320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

CrazyHZM
Copy link
Contributor

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

CrazyHZM added 2 commits June 17, 2025 22:39
# Conflicts:
#	mcp-spring/mcp-spring-webflux/src/main/java/io/modelcontextprotocol/client/transport/WebClientStreamableHttpTransport.java
/**
* Standard header name used in MCP JSON-RPC request and responses.
*/
public static final class Headers {
Copy link
Member

Choose a reason for hiding this comment

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

I feel that this belongs around something like McpHttpTransport interface rather than in the McpSpec, which is more about the JSON-RPC layer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The primary purpose here is to provide users with the MCP standard header name information. The MCP-Session-Id does belong to the transport category. Of course, I have omitted the last-event-id here. At present, I think defining these header names as part of the MCPSchema is the most reasonable approach because I haven't thought of any other more reasonable alternatives. These header names are indeed mentioned in the Specification. Do you have any better suggestions? @chemicL

Copy link
Member

@chemicL chemicL left a comment

Choose a reason for hiding this comment

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

Thanks, please review the comments.

CrazyHZM added 2 commits June 19, 2025 00:35
# Conflicts:
#	mcp-spring/mcp-spring-webflux/src/main/java/io/modelcontextprotocol/client/transport/WebClientStreamableHttpTransport.java
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